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; }
private:
cEcmData *Exists(cEcmInfo *e);
protected:
- virtual bool ParseLinePlain(char *line);
+ virtual bool ParseLinePlain(const char *line);
public:
cEcmCache(void);
void New(cEcmInfo *e);
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;
}
if(hasContent) {
*ls=0;
- if(!ParseLinePlain(buff))
+ if(!ParseLinePlain(skipspace(buff)))
PRINTF(L_GEN_ERROR,"file %s has error in line #%d",path,lineNum);
}
}
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:
#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>
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);
return new cSystemCardClient();
}
-bool cSystemLinkCardClient::ParseLinePlain(char *line)
+bool cSystemLinkCardClient::ParseLinePlain(const char *line)
{
char name[32];
int num;
}
*/
-bool cTpsKeys::ParseLinePlain(char *line)
+bool cTpsKeys::ParseLinePlain(const char *line)
{
unsigned char tmp[60];
if(line[0]=='X') {
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;
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;
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);