aboutsummaryrefslogtreecommitdiffstats
path: root/evaluator.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-30 20:57:56 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-30 20:57:56 +0000
commitf040b602703f9aa2849384c9116413f9aecf04b4 (patch)
tree6577cd2c6172763a0223ed7bb933657b1c5b5436 /evaluator.c
parent59a314fd82aefb99aea2e3956248a928f55fa5e4 (diff)
downloadlcd4linux-f040b602703f9aa2849384c9116413f9aecf04b4.tar.gz
[lcd4linux @ 2004-01-30 20:57:55 by reinelt]
HD44780 patch from Martin Hejl dmalloc integrated git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@348 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'evaluator.c')
-rw-r--r--evaluator.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/evaluator.c b/evaluator.c
index 8300943..61f696c 100644
--- a/evaluator.c
+++ b/evaluator.c
@@ -1,4 +1,4 @@
-/* $Id: evaluator.c,v 1.10 2004/01/29 04:40:02 reinelt Exp $
+/* $Id: evaluator.c,v 1.11 2004/01/30 20:57:56 reinelt Exp $
*
* expression evaluation
*
@@ -10,6 +10,10 @@
* FIXME: GPL or not GPL????
*
* $Log: evaluator.c,v $
+ * Revision 1.11 2004/01/30 20:57:56 reinelt
+ * HD44780 patch from Martin Hejl
+ * dmalloc integrated
+ *
* Revision 1.10 2004/01/29 04:40:02 reinelt
* every .c file includes "config.h" now
*
@@ -132,6 +136,10 @@
#include "debug.h"
#include "evaluator.h"
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
// Token types
#define T_DELIMITER 1
@@ -871,6 +879,10 @@ int Eval (char* expression, RESULT *result)
if ((err=setjmp(jb))) {
error ("Evaluator: %s in expression <%s>", ErrMsg[err], expression);
+ if (Token) {
+ free (Token);
+ Token=NULL;
+ }
return -1;
}
@@ -892,5 +904,8 @@ int Eval (char* expression, RESULT *result)
if (*Token=='\0') ERROR (E_EMPTY);
Level01(result);
if (*Token!='\0') ERROR (E_SYNTAX);
+ free (Token);
+ Token=NULL;
+
return 0;
}