summaryrefslogtreecommitdiff
path: root/xml
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-21 20:26:25 +0000
committerlordjaxom <lordjaxom>2004-12-21 20:26:25 +0000
commitdaa586ba0112a61d92a57e33e648f00b4105dd65 (patch)
tree9c4bb00087570023bf7706b60d2124ebfedb7d7d /xml
parentc05277882c111760d4e275b8521bb057e913a946 (diff)
downloadvdr-plugin-text2skin-daa586ba0112a61d92a57e33e648f00b4105dd65.tar.gz
vdr-plugin-text2skin-daa586ba0112a61d92a57e33e648f00b4105dd65.tar.bz2
- finished {CurrentRecording}
- improved marquee - added some missing checks
Diffstat (limited to 'xml')
-rw-r--r--xml/string.c8
-rw-r--r--xml/string.h15
-rw-r--r--xml/type.h21
3 files changed, 25 insertions, 19 deletions
diff --git a/xml/string.c b/xml/string.c
index 5d6b397..a037de0 100644
--- a/xml/string.c
+++ b/xml/string.c
@@ -1,5 +1,5 @@
/*
- * $Id: string.c,v 1.2 2004/12/21 18:35:55 lordjaxom Exp $
+ * $Id: string.c,v 1.3 2004/12/21 20:26:25 lordjaxom Exp $
*/
#include "xml/string.h"
@@ -110,9 +110,11 @@ bool cxString::Parse(const std::string &Text) {
else {
char *end;
int n = strtol(attr.c_str(), &end, 10);
- if (end != attr.c_str() && end == '\0')
+ Dprintf("attr: %s, n: %d, end: |%s|\n", attr.c_str(), n, end);
+ if (end != attr.c_str() && *end == '\0') {
+ Dprintf("a number\n");
lastToken.Attrib = n;
- else
+ } else
lastToken.Attrib = attr;
}
diff --git a/xml/string.h b/xml/string.h
index e53bafb..b3b0c8d 100644
--- a/xml/string.h
+++ b/xml/string.h
@@ -1,5 +1,5 @@
/*
- * $Id: string.h,v 1.2 2004/12/21 18:35:55 lordjaxom Exp $
+ * $Id: string.h,v 1.3 2004/12/21 20:26:25 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_STRING_H
@@ -112,10 +112,10 @@ struct txAttrib {
std::string Text;
int Number;
- txAttrib(const std::string &a): Type(aString), Text(a) {}
- txAttrib(int n): Type(aNumber), Number(0) {}
+ txAttrib(const std::string &a): Type(aString), Text(a), Number(0) {}
+ txAttrib(int n): Type(aNumber), Text(""), Number(n) {}
txAttrib(exAttrib t): Type(t), Text(""), Number(0) {}
- txAttrib(void): Type(aNone) {}
+ txAttrib(void): Type(aNone), Text(""), Number(0) {}
friend bool operator== (const txAttrib &A, const txAttrib &B);
friend bool operator< (const txAttrib &A, const txAttrib &B);
@@ -124,13 +124,16 @@ struct txAttrib {
inline bool operator== (const txAttrib &A, const txAttrib &B)
{
return A.Type == B.Type
- && A.Text == B.Text;
+ && A.Text == B.Text
+ && A.Number == B.Number;
}
inline bool operator< (const txAttrib &A, const txAttrib &B)
{
return A.Type == B.Type
- ? A.Text < B.Text
+ ? A.Text == B.Text
+ ? A.Number < B.Number
+ : A.Text < B.Text
: A.Type < B.Type;
}
diff --git a/xml/type.h b/xml/type.h
index c60c404..dea7c05 100644
--- a/xml/type.h
+++ b/xml/type.h
@@ -1,5 +1,5 @@
/*
- * $Id: type.h,v 1.2 2004/12/21 18:35:55 lordjaxom Exp $
+ * $Id: type.h,v 1.3 2004/12/21 20:26:25 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_TYPE_H
@@ -20,24 +20,25 @@ private:
eType mType;
std::string mString;
int mNumber;
- bool mNoCache;
+ bool mCache;
+ uint mUpdateIn;
public:
static cxType True;
static cxType False;
- cxType(void): mType(boolean), mNumber(0), mNoCache(false) {}
- cxType(const char *String): mType(string), mString(String ?: ""), mNoCache(false) {}
- cxType(std::string String): mType(string), mString(String), mNoCache(false) {}
- cxType(int Number): mType(number), mNumber(Number), mNoCache(false) {}
- cxType(time_t Number): mType(number), mNumber(Number), mNoCache(false) {}
- cxType(bool Value): mType(boolean), mNumber(Value ? 1 : 0), mNoCache(false) {}
+ cxType(void): mType(boolean), mNumber(0), mUpdateIn(0) {}
+ cxType(const char *String): mType(string), mString(String ?: ""), mUpdateIn(0) {}
+ cxType(std::string String): mType(string), mString(String), mUpdateIn(0) {}
+ cxType(int Number): mType(number), mNumber(Number), mUpdateIn(0) {}
+ cxType(time_t Number): mType(number), mNumber(Number), mUpdateIn(0) {}
+ cxType(bool Value): mType(boolean), mNumber(Value ? 1 : 0), mUpdateIn(0) {}
const std::string &String(void);
int Number(void) const { return mType == number ? mNumber : 0; }
- void SetNoCache(bool Enable = true) { mNoCache = Enable; }
- bool NoCache(void) const { return mNoCache; }
+ void SetUpdate(uint UpdateIn) { mUpdateIn = UpdateIn; }
+ uint UpdateIn(void) const { return mUpdateIn; }
operator std::string () { return String(); }
operator int () { return Number(); }