diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-09-29 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-09-29 18:00:00 +0200 |
commit | d08073815d6d9132f7fb5cd9f82877967dc6b0e4 (patch) | |
tree | f93fbe9f18ed2893d88dc4ce6d01d80804d664da /config.h | |
parent | 346f4cd1420bb02bd9cec4059385c9922d64fc3f (diff) | |
download | vdr-patch-lnbsharing-d08073815d6d9132f7fb5cd9f82877967dc6b0e4.tar.gz vdr-patch-lnbsharing-d08073815d6d9132f7fb5cd9f82877967dc6b0e4.tar.bz2 |
Version 1.1.11vdr-1.1.11
- Fixed an incomplete initialization of the filter parameters in eit.c (thanks
to Jeremy Hall).
- Fixed the 'newplugin' script for use with the NEWSTRUCT driver (thanks to
Andreas Schultz for reporting this one). If you have already created a plugin
directory and Makefile with 'newplugin', please apply the following patch to it:
-------------------------------------------------------
--- Makefile 2002/06/10 16:24:06 1.4
+++ Makefile 2002/09/17 15:36:36 1.5
@@ -15,7 +15,12 @@
### The directory environment:
+ifdef NEWSTRUCT
+DVBDIR = ../../../../DVB/include
+DEFINES += -DNEWSTRUCT
+else
DVBDIR = ../../../../DVB/ost/include
+endif
VDRDIR = ../../..
VDRINC = $(VDRDIR)/include
LIBDIR = ../../lib
@@ -34,7 +39,7 @@
INCLUDES = -I$(VDRINC) -I$(DVBDIR)
-DEFINES = -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
-------------------------------------------------------
This is the diff for the 'setup' example that comes with VDR, so your line
numbers may be different.
- Added a missing 'public' keyword in device.h (thanks to Martin Hammerschmid).
- Fixed a race condition when starting 'Transfer Mode'.
- Rearranged the remote control key handling to allow plugins to implement
additional types of remote controls (see PLUGINS.html, section "Remote Control").
The previously used files 'keys.conf' and 'keys-pc.conf' have been replaced
by the file 'remote.conf', which holds the key definitions of all remote controls.
- The LIRC remote control keys are now handled just like the keyboard and RCU keys.
This means that you can use the lircd.conf file as is for your remote control,
without the need of editing it to make the key names the same as used in VDR.
When first starting VDR it will go into the "Learning keys" mode and ask you
to press the various keys. The resulting key assignment will be stored in
the file 'remote.conf'.
Since I have no way of testing the LIRC support, I hope I didn't break it in
the process...
- While learning the remote control keys it is now possible to press the 'Menu'
key to skip the definition of keys that are not available on your particular
RC unit.
- Fixed handling DVD subtitles in the SPU decoder (thanks to Andreas Schultz).
- Avoiding restarts due to 'panic level' when switching channels on the primary
device during EPG scan.
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 82 |
1 files changed, 13 insertions, 69 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.127 2002/09/09 21:35:55 kls Exp $ + * $Id: config.h 1.129 2002/09/29 10:42:17 kls Exp $ */ #ifndef __CONFIG_H @@ -20,7 +20,7 @@ #include "eit.h" #include "tools.h" -#define VDRVERSION "1.1.10" +#define VDRVERSION "1.1.11" #define MAXPRIORITY 99 #define MAXLIFETIME 99 @@ -30,69 +30,8 @@ #define MINOSDHEIGHT 12 #define MAXOSDHEIGHT 21 -enum eKeys { // "Up" and "Down" must be the first two keys! - kUp, - kDown, - kMenu, - kOk, - kBack, - kLeft, - kRight, - kRed, - kGreen, - kYellow, - kBlue, - k0, k1, k2, k3, k4, k5, k6, k7, k8, k9, - kPower, - kVolUp, - kVolDn, - kMute, - kNone, - // The following flags are OR'd with the above codes: - k_Repeat = 0x8000, - k_Release = 0x4000, - k_Flags = k_Repeat | k_Release, - }; - -// This is in preparation for having more key codes: -#define kMarkToggle k0 -#define kMarkMoveBack k4 -#define kMarkMoveForward k6 -#define kMarkJumpBack k7 -#define kMarkJumpForward k9 -#define kEditCut k2 -#define kEditTest k8 - -#define RAWKEY(k) (eKeys((k) & ~k_Flags)) -#define ISRAWKEY(k) ((k) != kNone && ((k) & k_Flags) == 0) -#define NORMALKEY(k) (eKeys((k) & ~k_Repeat)) - #define MaxFileName 256 -struct tKey { - eKeys type; - char *name; - unsigned int code; - }; - -class cKeys { -private: - char *fileName; -public: - unsigned char code; - unsigned short address; - tKey *keys; - cKeys(void); - void Clear(void); - void SetDummyValues(void); - bool Load(const char *FileName = NULL); - bool Save(void); - eKeys Translate(const char *Command); - unsigned int Encode(const char *Command); - eKeys Get(unsigned int Code); - void Set(eKeys Key, unsigned int Code); - }; - #define ISTRANSPONDER(f1, f2) (abs((f1) - (f2)) < 4) class cChannel : public cListObject { @@ -214,6 +153,7 @@ public: template<class T> class cConfig : public cList<T> { private: char *fileName; + bool allowComments; void Clear(void) { free(fileName); @@ -224,13 +164,17 @@ public: cConfig(void) { fileName = NULL; } virtual ~cConfig() { free(fileName); } const char *FileName(void) { return fileName; } - bool Load(const char *FileName, bool AllowComments = false) + bool Load(const char *FileName = NULL, bool AllowComments = false) { Clear(); - fileName = strdup(FileName); + if (FileName) { + free(fileName); + fileName = strdup(FileName); + allowComments = AllowComments; + } bool result = false; - if (access(FileName, F_OK) == 0) { - isyslog("loading %s", FileName); + if (fileName && access(fileName, F_OK) == 0) { + isyslog("loading %s", fileName); FILE *f = fopen(fileName, "r"); if (f) { int line = 0; @@ -238,11 +182,12 @@ public: result = true; while (fgets(buffer, sizeof(buffer), f) > 0) { line++; - if (AllowComments) { + if (allowComments) { char *p = strchr(buffer, '#'); if (p) *p = 0; } + stripspace(buffer); if (!isempty(buffer)) { T *l = new T; if (l->Parse(buffer)) @@ -322,7 +267,6 @@ public: extern cChannels Channels; extern cTimers Timers; -extern cKeys Keys; extern cCommands Commands; extern cSVDRPhosts SVDRPhosts; extern cCaDefinitions CaDefinitions; |