eval.h 611 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef __EVAL_H
  2. #define __EVAL_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. // stuff that apps will want to use
  7. #define EVAL_MAX_VARS 256
  8. typedef struct
  9. {
  10. char name[8];
  11. double value;
  12. } varType;
  13. extern double globalregs[100];
  14. extern char last_error_string[1024];
  15. void resetVars(varType *vars);
  16. double *getVarPtr(char *varName);
  17. double *registerVar(char *varName);
  18. // other shat
  19. extern varType *varTable;
  20. extern int *errPtr;
  21. extern int colCount;
  22. extern int result;
  23. int setVar(int varNum, double value);
  24. int getVar(int varNum);
  25. void *compileExpression(char *txt);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif