aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_math.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin_math.c')
-rw-r--r--plugin_math.c12
1 files changed, 9 insertions, 3 deletions
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);
Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* $Id: cfg.h,v 1.1 2000/03/10 11:40:47 reinelt Exp $
 *
 * config file stuff
 *
 * Copyright 1999, 2000 by Michael Reinelt (reinelt@eunet.at)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *
 * $Log: cfg.h,v $
 * Revision 1.1  2000/03/10 11:40:47  reinelt
 * *** empty log message ***
 *
 * Revision 1.2  2000/03/06 06:04:06  reinelt
 *
 * minor cleanups
 *
 *
 */

#ifndef _CFG_H_
#define _CFG_H_

void  cfg_set (char *key, char *value);
char *cfg_get (char *key);
int   cfg_read (char *file);
char *cfg_file (void);

#endif