diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-05 11:57:38 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-05 11:57:38 +0000 |
commit | 019c4cc3d6d541cff8af4bd1dc29c67648a57322 (patch) | |
tree | 28d19ea8755bff295a35e3ae93b86e1112137497 /processor.c | |
parent | 70505233c857187bc5b0616bb37b4ea055885911 (diff) | |
download | lcd4linux-019c4cc3d6d541cff8af4bd1dc29c67648a57322.tar.gz |
[lcd4linux @ 2004-01-05 11:57:38 by reinelt]
added %y tokens to make the Evaluator useable
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@286 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r-- | processor.c | 20 |
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); + } + } + } |