summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--PLUGINS/src/pictures/HISTORY4
-rw-r--r--PLUGINS/src/pictures/entry.c4
-rw-r--r--config.c4
-rw-r--r--plugin.c4
-rw-r--r--skinclassic.c6
-rw-r--r--skinsttng.c6
-rw-r--r--svdrp.c4
-rw-r--r--tools.h3
9 files changed, 21 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index dfdfade7..317df97c 100644
--- a/HISTORY
+++ b/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.
diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY
index 18966579..b0952abf 100644
--- a/PLUGINS/src/pictures/HISTORY
+++ b/PLUGINS/src/pictures/HISTORY
@@ -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.
diff --git a/PLUGINS/src/pictures/entry.c b/PLUGINS/src/pictures/entry.c
index e03858c9..427585e6 100644
--- a/PLUGINS/src/pictures/entry.c
+++ b/PLUGINS/src/pictures/entry.c
@@ -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
diff --git a/config.c b/config.c
index aa72b06c..090a6a1d 100644
--- a/config.c
+++ b/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")) {
diff --git a/plugin.c b/plugin.c
index 9193125e..8fab11fa 100644
--- a/plugin.c
+++ b/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 ------------------------------------------------------------------
diff --git a/skinclassic.c b/skinclassic.c
index 535e63d2..fc09bec7 100644
--- a/skinclassic.c
+++ b/skinclassic.c
@@ -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);
diff --git a/skinsttng.c b/skinsttng.c
index cf67563b..02ab61b5 100644
--- a/skinsttng.c
+++ b/skinsttng.c
@@ -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);
diff --git a/svdrp.c b/svdrp.c
index 38e51942..4317535a 100644
--- a/svdrp.c
+++ b/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);
diff --git a/tools.h b/tools.h
index 4013b2ab..6a107746 100644
--- a/tools.h
+++ b/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);