mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Introduced 'operator const void * ()' in cString
This commit is contained in:
parent
54b4d4e4e7
commit
dc7c5464fc
2
HISTORY
2
HISTORY
@ -5640,3 +5640,5 @@ Video Disk Recorder Revision History
|
||||
- The new function cSkin::SetScrollbar() can be implemented by skins to display
|
||||
a scrollbar in every list menu. The 'classic' and 'sttng' skins have been
|
||||
changed accordingly.
|
||||
- Introduced 'operator const void * ()' in cString to catch cases where operator*()
|
||||
should be used.
|
||||
|
@ -19,6 +19,8 @@ VDR Plugin 'pictures' Revision History
|
||||
|
||||
- Added option -i to pic2mpg to ignore unknown file types.
|
||||
|
||||
2008-02-09: Version 0.0.5
|
||||
2008-02-17: Version 0.0.5
|
||||
|
||||
- Fixed setting the OSD area.
|
||||
- Introduced 'operator const void * ()' in cString to catch cases where operator*()
|
||||
should be used.
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: entry.c 1.2 2008/01/18 15:49:51 kls Exp $
|
||||
* $Id: entry.c 1.3 2008/02/17 13:42:34 kls Exp $
|
||||
*/
|
||||
|
||||
#include "entry.h"
|
||||
@ -37,7 +37,7 @@ int cPictureEntry::Compare(const cListObject &ListObject) const
|
||||
|
||||
cString cPictureEntry::Path(void) const
|
||||
{
|
||||
return parent ? AddDirectory(parent->Path(), name) : name;
|
||||
return parent ? *AddDirectory(parent->Path(), name) : name;
|
||||
}
|
||||
|
||||
void cPictureEntry::Load(void) const
|
||||
|
4
config.c
4
config.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: config.c 1.160 2008/02/10 15:48:17 kls Exp $
|
||||
* $Id: config.c 1.161 2008/02/17 13:39:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -65,7 +65,7 @@ const char *cCommand::Execute(const char *Parameters)
|
||||
cString cmdbuf;
|
||||
if (Parameters)
|
||||
cmdbuf = cString::sprintf("%s %s", command, Parameters);
|
||||
const char *cmd = cmdbuf ? cmdbuf : command;
|
||||
const char *cmd = *cmdbuf ? *cmdbuf : command;
|
||||
dsyslog("executing command '%s'", cmd);
|
||||
cPipe p;
|
||||
if (p.Open(cmd, "r")) {
|
||||
|
4
plugin.c
4
plugin.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: plugin.c 1.27 2008/02/10 16:05:46 kls Exp $
|
||||
* $Id: plugin.c 1.28 2008/02/17 13:32:12 kls Exp $
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
@ -146,7 +146,7 @@ const char *cPlugin::ConfigDirectory(const char *PluginName)
|
||||
if (!cThread::IsMainThread())
|
||||
esyslog("ERROR: plugin '%s' called cPlugin::ConfigDirectory(), which is not thread safe!", PluginName ? PluginName : "<no name given>");
|
||||
buffer = cString::sprintf("%s/plugins%s%s", configDirectory, PluginName ? "/" : "", PluginName ? PluginName : "");
|
||||
return MakeDirs(buffer, true) ? buffer : NULL;
|
||||
return MakeDirs(buffer, true) ? *buffer : NULL;
|
||||
}
|
||||
|
||||
// --- cDll ------------------------------------------------------------------
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinclassic.c 1.22 2008/02/17 12:24:15 kls Exp $
|
||||
* $Id: skinclassic.c 1.23 2008/02/17 13:34:29 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skinclassic.h"
|
||||
@ -149,7 +149,7 @@ void cSkinClassicDisplayChannel::Flush(void)
|
||||
{
|
||||
if (!message) {
|
||||
cString date = DayDateTime();
|
||||
if (!lastDate || strcmp(date, lastDate)) {
|
||||
if (!*lastDate || strcmp(date, lastDate)) {
|
||||
const cFont *font = cFont::GetFont(fontSml);
|
||||
int w = font->Width(date);
|
||||
osd->DrawText(osd->Width() - w - 2, 0, date, Theme.Color(clrChannelDate), Theme.Color(clrBackground), cFont::GetFont(fontSml), w);
|
||||
@ -407,7 +407,7 @@ const cFont *cSkinClassicDisplayMenu::GetTextAreaFont(bool FixedFont) const
|
||||
void cSkinClassicDisplayMenu::Flush(void)
|
||||
{
|
||||
cString date = DayDateTime();
|
||||
if (!lastDate || strcmp(date, lastDate)) {
|
||||
if (!*lastDate || strcmp(date, lastDate)) {
|
||||
const cFont *font = cFont::GetFont(fontOsd);
|
||||
int w = font->Width(date);
|
||||
osd->DrawText(x3 - w - 2, y0, date, Theme.Color(clrMenuDate), Theme.Color(clrMenuTitleBg), font, w);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinsttng.c 1.24 2008/02/17 12:09:38 kls Exp $
|
||||
* $Id: skinsttng.c 1.25 2008/02/17 13:35:09 kls Exp $
|
||||
*/
|
||||
|
||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||
@ -308,7 +308,7 @@ void cSkinSTTNGDisplayChannel::Flush(void)
|
||||
const cFont *font = cFont::GetFont(fontSml);
|
||||
cString date = DayDateTime();
|
||||
int w = font->Width(date);
|
||||
if (!lastDate || strcmp(date, lastDate)) {
|
||||
if (!*lastDate || strcmp(date, lastDate)) {
|
||||
osd->DrawText(x4 - w - 2, y7 - font->Height(), date, Theme.Color(clrChannelDate), frameColor, font, w);
|
||||
lastDate = date;
|
||||
}
|
||||
@ -672,7 +672,7 @@ void cSkinSTTNGDisplayMenu::Flush(void)
|
||||
{
|
||||
if (!message) {
|
||||
cString date = DayDateTime();
|
||||
if (!lastDate || strcmp(date, lastDate)) {
|
||||
if (!*lastDate || strcmp(date, lastDate)) {
|
||||
const cFont *font = cFont::GetFont(fontSml);
|
||||
int w = font->Width(date);
|
||||
osd->DrawText(x4 - w - 2, y7 - font->Height(), date, Theme.Color(clrMenuDate), frameColor, font, w);
|
||||
|
4
svdrp.c
4
svdrp.c
@ -10,7 +10,7 @@
|
||||
* and interact with the Video Disk Recorder - or write a full featured
|
||||
* graphical interface that sits on top of an SVDRP connection.
|
||||
*
|
||||
* $Id: svdrp.c 1.108 2008/02/15 15:10:49 kls Exp $
|
||||
* $Id: svdrp.c 1.109 2008/02/17 13:36:01 kls Exp $
|
||||
*/
|
||||
|
||||
#include "svdrp.h"
|
||||
@ -1420,7 +1420,7 @@ void cSVDRP::CmdPLUG(const char *Option)
|
||||
else {
|
||||
int ReplyCode = 900;
|
||||
cString s = plugin->SVDRPCommand(cmd, option, ReplyCode);
|
||||
if (s)
|
||||
if (*s)
|
||||
Reply(abs(ReplyCode), "%s", *s);
|
||||
else
|
||||
Reply(500, "Command unrecognized: \"%s\"", cmd);
|
||||
|
3
tools.h
3
tools.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.h 1.112 2008/02/16 13:00:16 kls Exp $
|
||||
* $Id: tools.h 1.113 2008/02/17 13:41:27 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@ -156,6 +156,7 @@ public:
|
||||
cString(const char *S = NULL, bool TakePointer = false);
|
||||
cString(const cString &String);
|
||||
virtual ~cString();
|
||||
operator const void * () const { return s; } // to catch cases where operator*() should be used
|
||||
operator const char * () const { return s; } // for use in (const char *) context
|
||||
const char * operator*() const { return s; } // for use in (const void *) context (printf() etc.)
|
||||
cString &operator=(const cString &String);
|
||||
|
Loading…
Reference in New Issue
Block a user