]> www.vanbest.org Git - sasc-ng.git/commitdiff
try to fix compile problem with newer gcc
authorleslie <unknown>
Fri, 4 Jan 2008 19:14:35 +0000 (20:14 +0100)
committerleslie <unknown>
Fri, 4 Jan 2008 19:14:35 +0000 (20:14 +0100)
cam.c
cam.h
data.c
data.h
misc.c
systems/cardclient/cc.c
systems/viaccess/tps.c
systems/viaccess/tps.h

diff --git a/cam.c b/cam.c
index 4030e72d07949383c3dd34c0d20ef2519ecedec5..23ed10407d90611ca65b17e7aa5c971b8a091b8e 100644 (file)
--- a/cam.c
+++ b/cam.c
@@ -691,7 +691,7 @@ void cEcmCache::Flush(void)
   ListUnlock();
 }
 
-bool cEcmCache::ParseLinePlain(char *line)
+bool cEcmCache::ParseLinePlain(const char *line)
 {
   cEcmData *dat=new cEcmData;
   if(dat && dat->Parse(line) && !Exists(dat)) { Add(dat); return true; }
diff --git a/cam.h b/cam.h
index dd4ebf3d274a7a94d9b50a5851212819430a8a3e..852b961fdfb93b598530b11644d44f2cb97f9cbb 100644 (file)
--- a/cam.h
+++ b/cam.h
@@ -45,7 +45,7 @@ class cEcmCache : public cStructListPlain<cEcmData> {
 private:
   cEcmData *Exists(cEcmInfo *e);
 protected:
-  virtual bool ParseLinePlain(char *line);
+  virtual bool ParseLinePlain(const char *line);
 public:
   cEcmCache(void);
   void New(cEcmInfo *e);
diff --git a/data.c b/data.c
index 52983dfb83c4bacdeac543b997faf7aeedb45458..e2f9088c32ea59850eb2ab59ac5f2be47201a741 100644 (file)
--- a/data.c
+++ b/data.c
@@ -319,7 +319,7 @@ void cStructLoader::Load(bool reload)
         cStructItem *it=0;
         if(hasContent) {
           char save=*ls;
-          *ls=0; it=ParseLine(buff); *ls=save;
+          *ls=0; it=ParseLine(skipspace(buff)); *ls=save;
           if(!it) {
             PRINTF(L_GEN_ERROR,"file %s has error in line #%d",path,lineNum);
             ls=buff;
@@ -419,7 +419,7 @@ void cStructLoaderPlain::Load(bool reload)
         }
       if(hasContent) {
         *ls=0;
-        if(!ParseLinePlain(buff))
+        if(!ParseLinePlain(skipspace(buff)))
           PRINTF(L_GEN_ERROR,"file %s has error in line #%d",path,lineNum);
         }
       }
diff --git a/data.h b/data.h
index ff5e37890dd8edaa31357e52d3b126ef73ab7f60..8353a046dca7ffccfeb130410031f45d62e4b079 100644 (file)
--- a/data.h
+++ b/data.h
@@ -155,7 +155,7 @@ public:
 class cStructLoaderPlain : public cStructLoader {
 protected:
   virtual cStructItem *ParseLine(char *line) { return 0; }
-  virtual bool ParseLinePlain(char *line)=0;
+  virtual bool ParseLinePlain(const char *line)=0;
   virtual void PreSave(FILE *f);
   virtual void PostSave(FILE *f) {};
 public:
diff --git a/misc.c b/misc.c
index e0f83e2b4c490584f06b77e0b434d9bf47c044ff..fa9965a2f57e000e203a6ce9375946948cfb65fd 100644 (file)
--- a/misc.c
+++ b/misc.c
 
 #include <ctype.h>
 #include <stdlib.h>
-#include <stdio.h>
 #include <stdarg.h>
-#include <fcntl.h>
 #include <string.h>
-#include <sys/time.h>
 
 #include <vdr/tools.h>
 #include <vdr/thread.h>
index 797d0fcac78a49959be67bfcdc94ce895154f934..feb9816d940e31b38366524880e346a7bfd92798 100644 (file)
@@ -161,7 +161,7 @@ cCardClientLink::cCardClientLink(const char *Name)
 
 class cSystemLinkCardClient : public cSystemLink, public cStructListPlain<cCardClient> {
 protected:
-  virtual bool ParseLinePlain(char *line);
+  virtual bool ParseLinePlain(const char *line);
 public:
   cSystemLinkCardClient(void);
   virtual bool CanHandle(unsigned short SysId);
@@ -259,7 +259,7 @@ cSystem *cSystemLinkCardClient::Create(void)
   return new cSystemCardClient();
 }
 
-bool cSystemLinkCardClient::ParseLinePlain(char *line)
+bool cSystemLinkCardClient::ParseLinePlain(const char *line)
 {
   char name[32];
   int num;
index 39c340b2868d43f16461f81c291556b704569bfa..b03202dc2696e2643fb00daa6e849e654a43ed1d 100644 (file)
@@ -892,7 +892,7 @@ void cTpsKeys::DecryptBin(const unsigned char *in, unsigned char *out)
 }
 */
 
-bool cTpsKeys::ParseLinePlain(char *line)
+bool cTpsKeys::ParseLinePlain(const char *line)
 {
   unsigned char tmp[60];
   if(line[0]=='X') {
@@ -915,7 +915,7 @@ bool cTpsKeys::ParseLinePlain(char *line)
         if(sscanf(&line[2],"%x %x %n",&off,&crc,&len)==2) {
           line+=len+2;
           unsigned char buff[210];
-          if((len=GetHex((const char *)line,buff,200,false))) {
+          if((len=GetHex(line,buff,200,false))) {
             if(crc==crc32_le(0,buff,len) && off>=0 && off+len<=algolen) {
               memcpy(&algomem[off],buff,len);
               algoread+=len;
@@ -934,7 +934,7 @@ bool cTpsKeys::ParseLinePlain(char *line)
     else PRINTF(L_SYS_TPS,"unknown extention during cache load");
     }
   else {
-    if(GetHex((const char *)line,tmp,sizeof(tmp))) {
+    if(GetHex(line,tmp,sizeof(tmp))) {
       unsigned int crc=crc32_le(0,&tmp[4],sizeof(tmp)-4);
       if(*((unsigned int *)tmp)==crc) {
         cTpsKey *k=new cTpsKey;
index 03918954255585407f091aaa67027ba00e79a2ea..0d04baf8f7e1c66fdaa29d8a5ccf4b96e9ffe09c 100644 (file)
@@ -125,7 +125,7 @@ private:
   cString Time(time_t t);
   bool ProcessAu(const cOpenTVModule *mod);
 protected:
-  virtual bool ParseLinePlain(char *line);
+  virtual bool ParseLinePlain(const char *line);
   virtual void PostSave(FILE *f);
 public:
   cTpsKeys(void);