1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The macros used to control deprecated code or functions have been changed to hold numeric values; the default for DEPRECATED_VDR_CHARSET_OVERRIDE has been set to 0

This commit is contained in:
Klaus Schmidinger 2017-11-02 15:04:56 +01:00
parent d74dd7a60a
commit d8523b0db8
6 changed files with 32 additions and 13 deletions

View File

@ -3446,6 +3446,9 @@ Jasmin Jessich <jasmin@anw.at>
for suggesting to use $(Q) to control Makefile verbosity for suggesting to use $(Q) to control Makefile verbosity
for adding handling DEBUG to the Make.config.template file, in order to control for adding handling DEBUG to the Make.config.template file, in order to control
code optimization code optimization
for suggesting to change the macros used to control deprecated code or functions
to numeric values (0 and 1), so that they can be controlled at compile time, without
having to edit the actual source code
Martin Schirrmacher <schirrmie@gmail.com> Martin Schirrmacher <schirrmie@gmail.com>
for suggesting to provide a way for skin plugins to get informed about the currently for suggesting to provide a way for skin plugins to get informed about the currently

View File

@ -9178,3 +9178,11 @@ Video Disk Recorder Revision History
to prevent possible problems with old data in buffers (thanks to Onur Sentürk). to prevent possible problems with old data in buffers (thanks to Onur Sentürk).
- The function cDevice::GetVideoSystem() (which has been deprecated since version 2.1.6) - The function cDevice::GetVideoSystem() (which has been deprecated since version 2.1.6)
has been finally removed. has been finally removed.
- The macros used to control deprecated code or functions have been changed to hold
numeric values (0 and 1), so that they can be controlled at compile time, without
having to edit the actual source code (suggested by Jasmin Jessich).
- The default for DEPRECATED_VDR_CHARSET_OVERRIDE has been set to 0, which means VDR
no longer reacts on the environment variable VDR_CHARSET_OVERRIDE. You can add
'DEPRECATED_VDR_CHARSET_OVERRIDE=1' when compiling in order to restore this
functionality. However, it is recommended to use the command line option --chartab
instead.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: device.h 4.11 2017/11/02 14:37:02 kls Exp $ * $Id: device.h 4.12 2017/11/02 14:47:33 kls Exp $
*/ */
#ifndef __DEVICE_H #ifndef __DEVICE_H
@ -349,8 +349,10 @@ protected:
public: public:
static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; } static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; }
///< Returns the number of the current channel on the primary device. ///< Returns the number of the current channel on the primary device.
#define DEPRECATED_SETCURRENTCHANNEL #ifndef DEPRECATED_SETCURRENTCHANNEL
#ifdef DEPRECATED_SETCURRENTCHANNEL #define DEPRECATED_SETCURRENTCHANNEL 1
#endif
#if DEPRECATED_SETCURRENTCHANNEL
static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; } static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; }
#endif #endif
static void SetCurrentChannel(int ChannelNumber) { currentChannel = ChannelNumber; } static void SetCurrentChannel(int ChannelNumber) { currentChannel = ChannelNumber; }

8
osd.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osd.h 4.4 2015/04/19 12:18:25 kls Exp $ * $Id: osd.h 4.5 2017/11/02 14:59:19 kls Exp $
*/ */
#ifndef __OSD_H #ifndef __OSD_H
@ -785,8 +785,10 @@ protected:
///< If there are no dirty pixmaps, or if this is not a true color OSD, ///< If there are no dirty pixmaps, or if this is not a true color OSD,
///< this function returns NULL. ///< this function returns NULL.
///< The caller must call DestroyPixmap() for the returned pixmap after use. ///< The caller must call DestroyPixmap() for the returned pixmap after use.
//#define DEPRECATED_GETBITMAP #ifndef DEPRECATED_GETBITMAP
#ifdef DEPRECATED_GETBITMAP #define DEPRECATED_GETBITMAP 0
#endif
#if DEPRECATED_GETBITMAP
public: public:
#endif #endif
cBitmap *GetBitmap(int Area); cBitmap *GetBitmap(int Area);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: skins.h 4.4 2017/06/25 10:02:09 kls Exp $ * $Id: skins.h 4.5 2017/11/02 15:04:56 kls Exp $
*/ */
#ifndef __SKINS_H #ifndef __SKINS_H
@ -244,8 +244,10 @@ public:
///< If the skin displays the Event item in its own way, it shall return true. ///< If the skin displays the Event item in its own way, it shall return true.
///< The default implementation does nothing and returns false, which results in ///< The default implementation does nothing and returns false, which results in
///< a call to SetItem() with a proper text. ///< a call to SetItem() with a proper text.
#define DEPRECATED_SKIN_SETITEMEVENT #ifndef DEPRECATED_SKIN_SETITEMEVENT
#ifdef DEPRECATED_SKIN_SETITEMEVENT #define DEPRECATED_SKIN_SETITEMEVENT 1
#endif
#if DEPRECATED_SKIN_SETITEMEVENT
virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) { return SetItemEvent(Event, Index, Current, Selectable, Channel, WithDate, TimerMatch, true); } virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) { return SetItemEvent(Event, Index, Current, Selectable, Channel, WithDate, TimerMatch, true); }
///< This function is here for comaptibility with older plugins and may be removed ///< This function is here for comaptibility with older plugins and may be removed
///< in a future version. Use the above version of SetItemEvent() with the TimerActive ///< in a future version. Use the above version of SetItemEvent() with the TimerActive

10
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.tvdr.de * The project's page is at http://www.tvdr.de
* *
* $Id: vdr.c 4.19 2017/10/31 09:46:22 kls Exp $ * $Id: vdr.c 4.20 2017/11/02 14:59:50 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -221,8 +221,10 @@ int main(int argc, char *argv[])
int WatchdogTimeout = DEFAULTWATCHDOG; int WatchdogTimeout = DEFAULTWATCHDOG;
const char *Terminal = NULL; const char *Terminal = NULL;
const char *OverrideCharacterTable = NULL; const char *OverrideCharacterTable = NULL;
#define DEPRECATED_VDR_CHARSET_OVERRIDE #ifndef DEPRECATED_VDR_CHARSET_OVERRIDE
#ifdef DEPRECATED_VDR_CHARSET_OVERRIDE #define DEPRECATED_VDR_CHARSET_OVERRIDE 0
#endif
#if DEPRECATED_VDR_CHARSET_OVERRIDE
OverrideCharacterTable = getenv("VDR_CHARSET_OVERRIDE"); OverrideCharacterTable = getenv("VDR_CHARSET_OVERRIDE");
const char *DeprecatedVdrCharsetOverride = OverrideCharacterTable; const char *DeprecatedVdrCharsetOverride = OverrideCharacterTable;
#endif #endif
@ -703,7 +705,7 @@ int main(int argc, char *argv[])
isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown"); isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown");
cCharSetConv::SetSystemCharacterTable(CodeSet); cCharSetConv::SetSystemCharacterTable(CodeSet);
} }
#ifdef DEPRECATED_VDR_CHARSET_OVERRIDE #if DEPRECATED_VDR_CHARSET_OVERRIDE
if (DeprecatedVdrCharsetOverride) if (DeprecatedVdrCharsetOverride)
isyslog("use of environment variable VDR_CHARSET_OVERRIDE (%s) is deprecated!", DeprecatedVdrCharsetOverride); isyslog("use of environment variable VDR_CHARSET_OVERRIDE (%s) is deprecated!", DeprecatedVdrCharsetOverride);
#endif #endif