summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-11 18:17:46 +0000
committerlordjaxom <lordjaxom>2005-01-11 18:17:46 +0000
commit39a4f6eb0663e6abfe9410aff71c1cbfbcf4a7fa (patch)
treed9ec0872ac1ea2db41d99678371e0e6c094fc290
parent938cc4d3dd643dcbdb8ba8d8c6a94692b962018e (diff)
downloadvdr-plugin-text2skin-39a4f6eb0663e6abfe9410aff71c1cbfbcf4a7fa.tar.gz
vdr-plugin-text2skin-39a4f6eb0663e6abfe9410aff71c1cbfbcf4a7fa.tar.bz2
- added and implemented function ne (not equal)
-rw-r--r--xml/function.c8
-rw-r--r--xml/function.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/xml/function.c b/xml/function.c
index f8a447d..f4571c7 100644
--- a/xml/function.c
+++ b/xml/function.c
@@ -1,5 +1,5 @@
/*
- * $Id: function.c,v 1.8 2005/01/07 21:49:55 lordjaxom Exp $
+ * $Id: function.c,v 1.9 2005/01/11 18:17:46 lordjaxom Exp $
*/
#include "xml/function.h"
@@ -10,7 +10,7 @@
#include <vdr/tools.h>
static const char *Internals[] = {
- "not", "and", "or", "equal", "file", "trans", "plugin", "gt", "lt", "ge", "le", NULL
+ "not", "and", "or", "equal", "file", "trans", "plugin", "gt", "lt", "ge", "le", "ne", NULL
};
cxFunction::cxFunction(cxSkin *Skin):
@@ -144,6 +144,7 @@ bool cxFunction::Parse(const std::string &Text)
case fun_or: params = -1; break;
case fun_eq:
+ case fun_ne:
case fun_gt:
case fun_lt:
case fun_ge:
@@ -225,6 +226,9 @@ cxType cxFunction::Evaluate(void) const
case fun_eq:
return mParams[0]->Evaluate() == mParams[1]->Evaluate();
+ case fun_ne:
+ return mParams[0]->Evaluate() != mParams[1]->Evaluate();
+
case fun_gt:
return mParams[0]->Evaluate() > mParams[1]->Evaluate();
diff --git a/xml/function.h b/xml/function.h
index 8c14a48..72b887c 100644
--- a/xml/function.h
+++ b/xml/function.h
@@ -1,5 +1,5 @@
/*
- * $Id: function.h,v 1.7 2005/01/08 00:08:21 lordjaxom Exp $
+ * $Id: function.h,v 1.8 2005/01/11 18:17:46 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_FUNCTION_H
@@ -33,6 +33,7 @@ public:
fun_lt = INTERNAL + 9,
fun_ge = INTERNAL + 10,
fun_le = INTERNAL + 11,
+ fun_ne = INTERNAL + 12,
};
private: