aboutsummaryrefslogtreecommitdiffstats
path: root/processor.c
diff options
context:
space:
mode:
authorreinelt <>2004-01-05 11:57:38 +0000
committerreinelt <>2004-01-05 11:57:38 +0000
commit769d5b11f35d1a464581d5f8111ad0ed3c78b408 (patch)
tree28d19ea8755bff295a35e3ae93b86e1112137497 /processor.c
parente960f9103cb38626e9709e2310fe8d4c73855812 (diff)
downloadlcd4linux-769d5b11f35d1a464581d5f8111ad0ed3c78b408.tar.gz
[lcd4linux @ 2004-01-05 11:57:38 by reinelt]
added %y tokens to make the Evaluator useable
Diffstat (limited to 'processor.c')
-rw-r--r--processor.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/processor.c b/processor.c
index 04f7cae..dc23cbe 100644
--- a/processor.c
+++ b/processor.c
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.51 2003/11/24 11:34:54 reinelt Exp $
+/* $Id: processor.c,v 1.52 2004/01/05 11:57:38 reinelt Exp $
*
* main data processing
*
@@ -22,6 +22,9 @@
*
*
* $Log: processor.c,v $
+ * Revision 1.52 2004/01/05 11:57:38 reinelt
+ * added %y tokens to make the Evaluator useable
+ *
* Revision 1.51 2003/11/24 11:34:54 reinelt
*
* 'Fixed' Rows which do not scroll by Lars Kempe
@@ -248,6 +251,7 @@
#include "dvb.h"
#include "seti.h"
#include "exec.h"
+#include "expr.h"
#include "imon.h"
#define ROWS 64
@@ -392,6 +396,9 @@ static double query (int token)
case T_EXEC:
return exec[(token>>8)-'0'].val;
+ case T_EXPR:
+ return expr[(token>>8)-'0'].val;
+
case T_IMON_CPU:
return imon.cpu;
@@ -650,6 +657,11 @@ static void print_token (int token, char **p, char *start)
*p+=sprintf (*p, "%.*s",cols-(int)(*p-start), exec[i].s);
break;
+ case T_EXPR:
+ i = (token>>8)-'0';
+ *p+=sprintf (*p, "%.*s",cols-(int)(*p-start), expr[i].s);
+ break;
+
case T_IMON_VER:
*p+=sprintf (*p, "%s", ImonVer());
break;
@@ -816,6 +828,12 @@ static void collect_data (void)
}
}
+ for (i=0; i<=EXPRS; i++) {
+ if (token_usage[T_EXPR]&(1<<i)) {
+ Expr (i, expr[i].s, &exec[i].val);
+ }
+ }
+
}