3 * (C) Copyright May 7 1995, Edmond J. Breen.
5 * This code may be copied for personal, non-profit use only.
12 #pragma warning( disable: 4013 4018 4024 4047 4068 4113 4146 4244 4273 4550 4700 4761 )
19 #if !defined(_eic_ptr) && !defined(_EiC)
21 typedef struct {void *p, *sp, *ep;} ptr_t;
24 #include <sys/types.h>
28 void *EiC_add_builtinfunc(char *name, val_t(*vfunc)(void));
29 void EiC_startEiC(int argc, char ** argv);
31 int EiC_run(int argc, char **argv);
32 void EiC_parseString(char *, ...);
33 void EiC_callBack(void *code);
35 void EiC_setMessageDisplay(void (*)(char *));
37 extern void (*EiC_messageDisplay)(char *);
40 #define setArg(x,C,type,v) do { code_t *c = C; \
41 *(type*)(&c->inst[c->nextinst - 5 - 2 * (x)].val) = v;} while(0)
43 extern val_t EiC_STaCK_VaLuE;
45 #define EiC_ReturnValue(type) (*(type*)&EiC_STaCK_VaLuE)
51 #define arg_list AR_t *
52 #define getargc() ARGC
53 #define getargs() AR[2]
54 #define nextarg(x,type) (*((type*)&(--x)->v))
55 #define arg(i,x,type) (*((type*)&x[-(i+1)].v))
57 #define malloc(x) xmalloc(x)
58 #define calloc(x,y) xcalloc(x,y)
59 #define free(x) xfree(x)
60 #define realloc(x,y) xrealloc(x,y)