Annotation of OpenXM/src/kxx/serversm.h, Revision 1.2
1.1 maekawa 1: /* server stack machine, serversm.h */
2: void *Sm1_mathcap(void);
3: int Sm1_setMathCap(ox_stream os);
4: void Sm1_pops(void);
5: int Sm1_executeStringByLocalParser(void);
6: char *Sm1_popString(void);
7: int Sm1_setName(void);
8: int Sm1_evalName(void);
9: int Sm1_start(int argc, char *fnames[],char *myname);
10: int Sm1_pushCMO(ox_stream fp); /* read data from the stream and push it */
11: int Sm1_popCMO(ox_stream fp,int serial); /* pop and send the data to stream. */
12: int Sm1_pushError2(int serial,int no,char *message);
13: char *Sm1_popErrorMessage(char *s);
14: void Sm1_getsp(void);
15: void Sm1_dupErrors(void);
1.2 ! takayama 16: void Sm1_pushCMOtag(int serial);
1.1 maekawa 17:
18:
19: /******************** Object from Kan/stackm.h *************************/
20: #define Snull 0
21: #define Sinteger 1 /* integer */
22: #define Sdollar 5 /* pointer to a string obtained from $...$ */
23: #define Sarray 6 /* lc.ival is the size of array,
24: (rc.op)[0], ..., (rc.op)[k] is the array
25: of object */
26: #define Sclass 17 /* class, for extension */
27:
28:
29: union cell {
30: int ival;
31: char *str;
32: struct object *op;
33: void *voidp;
34: };
35: struct object{
36: int tag; /* class identifier */
37: union cell lc; /* left cell */
38: union cell rc; /* right cell */
39: };
40: /********** macros to use Sarray **********************/
41: /* put to Object Array */
42: #define putoa(ob,i,cc) {\
43: if ((ob).tag != Sarray) {fprintf(stderr,"Warning: PUTOA is for an array of objects\n");} else \
44: {if ((0 <= (i)) && ((i) < (ob).lc.ival)) {\
45: (ob.rc.op)[i] = cc;\
46: }else{\
47: fprintf(stderr,"Warning: PUTOA, the size is %d.\n",(ob).lc.ival);\
48: }}}
49:
50: #define getoa(ob,i) ((ob.rc.op)[i])
51:
52: #define getoaSize(ob) ((ob).lc.ival)
53: /**************** end of macros from Kan/stackm.h *******************/
54:
55: /* Interface functions from kanlib.a. */
56: struct object KSpop();
57: void KSpush(struct object ob);
58: struct object KfindUserDictionary(char *s);
59: struct object KputUserDictionary(char *s,struct object ob);
60: struct object KnewErrorPacket(int serial,int no,char *s);
61: struct object KSmathCap(void); /* defined plugin/cmo.c */
62: void *KSmathCapByStruct(void); /* defined plugin/cmo.c */
63: char *popErrorStackByString(void);
64: struct object KSdupErrors(void);
65: struct object KpoInteger(int i);
1.2 ! takayama 66: struct object KSpeek(int k);
1.1 maekawa 67:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>