mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Using cString::sprintf() instead of asprintf()
This commit is contained in:
@@ -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().
|
||||
|
@@ -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 <ncurses.h>
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <vdr/plugin.h>
|
||||
#include <vdr/skins.h>
|
||||
|
||||
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;
|
||||
|
Reference in New Issue
Block a user