Using cString::sprintf() instead of asprintf()

This commit is contained in:
Klaus Schmidinger
2008-02-15 14:57:48 +01:00
parent c8584521f7
commit 9495aa9923
20 changed files with 131 additions and 189 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: interface.c 1.76 2007/08/04 14:39:25 kls Exp $
* $Id: interface.c 1.77 2008/02/10 15:49:15 kls Exp $
*/
#include "interface.h"
@@ -86,10 +86,7 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
DisplayMenu->SetItem(tr("Phase 2: Learning specific key codes"), 2, false, false);
eKeys NewKey = kUp;
while (NewKey != kNone) {
char *Prompt;
asprintf(&Prompt, tr("Press key for '%s'"), cKey::ToString(NewKey, true));
DisplayMenu->SetItem(Prompt, 4, false, false);
free(Prompt);
DisplayMenu->SetItem(cString::sprintf(tr("Press key for '%s'"), cKey::ToString(NewKey, true)), 4, false, false);
cRemote::Clear();
DisplayMenu->Flush();
for (eKeys k = NewKey; k == NewKey; ) {