Update the changelog
[opencv] / apps / cvenv / EiC / eic.h
1 /* eic.h
2  *
3  *      (C) Copyright May  7 1995, Edmond J. Breen.
4  *                 ALL RIGHTS RESERVED.
5  * This code may be copied for personal, non-profit use only.
6  *
7  */
8 #ifndef EICH_
9 #define EICH_
10
11 #if _MSC_VER >= 1200
12     #pragma warning( disable: 4013 4018 4024 4047 4068 4113 4146 4244 4273 4550 4700 4761 )
13 #endif
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #if !defined(_eic_ptr) && !defined(_EiC)
20 #define _eic_ptr
21 typedef struct {void *p, *sp, *ep;} ptr_t;
22 #endif
23
24 #include <sys/types.h>
25 #include "eicval.h"
26
27
28 void *EiC_add_builtinfunc(char *name, val_t(*vfunc)(void));
29 void EiC_startEiC(int argc, char ** argv);
30 void EiC_init_EiC();
31 int  EiC_run(int argc, char **argv);
32 void EiC_parseString(char *, ...);
33 void EiC_callBack(void *code);
34
35 void EiC_setMessageDisplay(void (*)(char *));
36
37 extern void (*EiC_messageDisplay)(char *);
38
39
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)
42
43 extern val_t EiC_STaCK_VaLuE;
44
45 #define  EiC_ReturnValue(type)    (*(type*)&EiC_STaCK_VaLuE)
46
47
48 extern AR_t * AR[3];
49 extern size_t ARGC;
50
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))
56
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)
61
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* EICH_ */
68
69
70
71
72
73
74
75
76
77
78
79
80
81