spandsp 3.0.0
ae.h
1/*
2* ae.h
3* evaluate arithmetic expressions at run time
4* Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
5* 06 May 2010 23:45:53
6* This code is hereby placed in the public domain.
7*/
8
9/*!
10 Opens ae to be used. Call it once before calling the others.
11 Does nothing if ae is already open.
12*/
13void ae_open(void);
14
15/*!
16 Closes ae after use. All variables are deleted.
17 Does nothing if ae is already closed.
18*/
19void ae_close(void);
20
21/*!
22 Sets the value of a variable.
23 The value persists until it is set again or ae is closed.
24*/
25double ae_set(const char *name, double value);
26
27/*!
28 Evaluates the given expression and returns its value.
29 Once ae has seen an expression, ae can evaluate it repeatedly quickly.
30 Returns 0 if there is an error. ae_error returns the error message.
31*/
32double ae_eval(const char *expression);
33
34/*!
35 Returns the last error message or NULL if there is none.
36*/
37const char *ae_error(void);
38
39/*- End of file ------------------------------------------------------------*/