From c008748638679f10746c70a7f677c0e8906ffa9e Mon Sep 17 00:00:00 2001 From: reinelt Date: Sat, 6 Mar 2004 20:31:16 +0000 Subject: [lcd4linux @ 2004-03-06 20:31:16 by reinelt] Complete rewrite of the evaluator to get rid of the code from mark Morley (because of license issues). The new Evaluator does a pre-compile of expressions, and stores them in trees. Therefore it should be reasonable faster... git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@387 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- plugin_math.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugin_math.c') diff --git a/plugin_math.c b/plugin_math.c index 88e1f65..6988a2b 100644 --- a/plugin_math.c +++ b/plugin_math.c @@ -1,4 +1,4 @@ -/* $Id: plugin_math.c,v 1.3 2004/03/03 03:47:04 reinelt Exp $ +/* $Id: plugin_math.c,v 1.4 2004/03/06 20:31:16 reinelt Exp $ * * math plugin * @@ -22,6 +22,12 @@ * * * $Log: plugin_math.c,v $ + * Revision 1.4 2004/03/06 20:31:16 reinelt + * Complete rewrite of the evaluator to get rid of the code + * from mark Morley (because of license issues). + * The new Evaluator does a pre-compile of expressions, and + * stores them in trees. Therefore it should be reasonable faster... + * * Revision 1.3 2004/03/03 03:47:04 reinelt * big patch from Martin Hejl: * - use qprintf() where appropriate @@ -119,8 +125,8 @@ static void my_max (RESULT *result, RESULT *arg1, RESULT *arg2) int plugin_init_math (void) { // set some handy constants - AddNumericVariable ("Pi", M_PI); - AddNumericVariable ("e", M_E); + SetVariableNumeric ("Pi", M_PI); + SetVariableNumeric ("e", M_E); // register some basic math functions AddFunction ("sqrt", 1, my_sqrt); -- cgit v1.2.3