diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-08-11 13:32:23 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-08-11 13:32:23 +0200 |
commit | 9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e (patch) | |
tree | 7d7d8667832651e37cd8de53296d0bcd32dba085 /interface.c | |
parent | b9c4cb0ec9c417c483be2a40cd66f839b063015f (diff) | |
download | vdr-9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e.tar.gz vdr-9a1a16f3d42b2f48b26eb3daef3a195fc0f2a13e.tar.bz2 |
Consistently using malloc/free and new/delete
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/interface.c b/interface.c index c468223f..8d4da216 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.53 2002/08/11 10:47:04 kls Exp $ + * $Id: interface.c 1.54 2002/08/11 11:46:47 kls Exp $ */ #include "interface.h" @@ -85,7 +85,7 @@ eKeys cInterface::GetKey(bool Wait) char *message = SVDRP->GetMessage(); if (message) { Info(message); - delete message; + free(message); } } } @@ -214,12 +214,12 @@ char *cInterface::WrapText(const char *Text, int Width, int *Height) // punch in a newline, so we need to make room for it: if (Delim) p = Delim + 1; // let's fall back to the most recent delimiter - char *s = new char[strlen(t) + 2]; // The additional '\n' plus the terminating '\0' + char *s = MALLOC(char, strlen(t) + 2); // The additional '\n' plus the terminating '\0' int l = p - t; strncpy(s, t, l); s[l] = '\n'; strcpy(s + l + 1, p); - delete t; + free(t); t = s; p = t + l; continue; @@ -400,7 +400,7 @@ void cInterface::QueryKeys(void) char *Prompt; asprintf(&Prompt, tr("Press key for '%s'"), tr(k->name)); WriteText(1, 5, Prompt); - delete Prompt; + free(Prompt); for (;;) { unsigned int ch = GetCh(); if (ch != 0) { |