forked from fantaisie-software/purebasic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval.h
More file actions
41 lines (31 loc) · 835 Bytes
/
eval.h
File metadata and controls
41 lines (31 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef MBA_EVAL_H
#define MBA_EVAL_H
/* eval - calculate a simple arithmetic expression
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef LIBMBA_API
#ifdef WIN32
# ifdef LIBMBA_EXPORTS
# define LIBMBA_API __declspec(dllexport)
# else /* LIBMBA_EXPORTS */
# define LIBMBA_API __declspec(dllimport)
# endif /* LIBMBA_EXPORTS */
#else /* WIN32 */
# define LIBMBA_API extern
#endif /* WIN32 */
#endif /* LIBMBA_API */
#include <mba/text.h>
struct eval;
typedef int (*symlook_fn)(const tchar *name, unsigned long *val, void *context);
LIBMBA_API struct eval *eval_new(symlook_fn symlook, void *context);
LIBMBA_API int eval_del(struct eval *eval);
LIBMBA_API int eval_expression(struct eval *eval,
const tchar *expr,
const tchar *elim,
unsigned long *result);
#ifdef __cplusplus
}
#endif
#endif /* MBA_EVAL_H */