File: calc.h

package info (click to toggle)
libhtml-template-pro-perl 0.9524-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,512 kB
  • sloc: ansic: 1,841; perl: 1,474; yacc: 404; pascal: 118; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (4)
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
#include <string.h>
#include "exprtype.h"

struct expr_parser;

/* Function types  */
typedef double (*func_t_dd) (double);
typedef double (*func_t_ddd) (double,double);
typedef struct exprval (*func_t_ee) (struct expr_parser* exprobj, struct exprval);

#define SYMREC(X) X, sizeof(X)-1

/* memory is allocated at compile time. it is also thread safe */
struct symrec_const
{
  char *name;  /* name of symbol */
  int len;     /* symbol length */
  int type;    /* type of symbol: either VAR or FNCT */
  double var;      /* value of a VAR */
  void* fnctptr;  /* value of a FNCT */
};

typedef struct symrec_const symrec_const;

/*
  Local Variables:
  mode: c
  End:
*/