From 9495aa9923fed16aeb6f49c69ccd249b9e17dba7 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 15 Feb 2008 14:57:48 +0100 Subject: Using cString::sprintf() instead of asprintf() --- PLUGINS/src/skincurses/HISTORY | 4 ++++ PLUGINS/src/skincurses/skincurses.c | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'PLUGINS/src') diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index e5bfa49d..2a037012 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -65,3 +65,7 @@ VDR Plugin 'skincurses' Revision History 2008-01-19: - Updated the Makefile of the skincurses plugin (thanks to Rolf Ahrenberg). + +2008-02-15: + +- Using cString::sprintf() instead of asprintf(). diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index b9a4fc06..da868e7d 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 1.18 2007/08/26 20:16:59 kls Exp $ + * $Id: skincurses.c 1.19 2008/02/15 14:52:03 kls Exp $ */ #include @@ -11,7 +11,7 @@ #include #include -static const char *VERSION = "0.1.4"; +static const char *VERSION = "0.1.5"; static const char *DESCRIPTION = trNOOP("A text only skin"); static const char *MAINMENUENTRY = NULL; @@ -384,10 +384,8 @@ void cSkinCursesDisplayMenu::SetEvent(const cEvent *Event) snprintf(t, sizeof(t), "%s %s - %s", *Event->GetDateString(), *Event->GetTimeString(), *Event->GetEndTimeString()); ts.Set(osd, 0, y, ScOsdWidth, ScOsdHeight - y - 2, t, &Font, clrYellow, clrBackground); if (Event->Vps() && Event->Vps() != Event->StartTime()) { - char *buffer; - asprintf(&buffer, " VPS: %s", *Event->GetVpsString()); + cString buffer = cString::sprintf(" VPS: %s", *Event->GetVpsString()); osd->DrawText(ScOsdWidth - Utf8StrLen(buffer), y, buffer, clrBlack, clrYellow, &Font); - free(buffer); } y += ts.Height(); y += 1; -- cgit v1.2.3