=================================================================== RCS file: /home/cvs/OpenXM/src/k097/d.h,v retrieving revision 1.1.1.1 retrieving revision 1.8 diff -u -p -r1.1.1.1 -r1.8 --- OpenXM/src/k097/d.h 1999/10/08 02:12:14 1.1.1.1 +++ OpenXM/src/k097/d.h 2020/10/07 23:53:25 1.8 @@ -1,6 +1,8 @@ - +/* $OpenXM: OpenXM/src/k097/d.h,v 1.7 2015/10/10 11:29:46 takayama Exp $ */ /* d.h;*/ /* from stackm.h */ +#include +#include /**** data types (class identifiers) ************/ #define Snull 0 @@ -47,14 +49,18 @@ struct Object{ int tag; /* class identifier */ union cell lc; /* left cell */ union cell rc; /* right cell */ + struct object *attr; }; struct object{ /* must be compatible with stackm.h */ int tag; /* class identifier */ union cell lc; /* left cell */ union cell rc; /* right cell */ + struct object *attr; }; +#define OINIT { .attr = NULL } + typedef struct Object * objectp; /* cf. 65p of Schreiner. */ #define YYSTYPE objectp @@ -124,13 +130,14 @@ void *mymalloc(int size); int isProtectedSymbol(char *s); int ips(objectp op); /* read from file */ -void parseAFile(FILE *fp); +void parseAfile(FILE *fp); void parseAstring(char *s); int fsgetc(objectp op); int fsungetc(int c,objectp op); void readLineFromFile(FILE *fp,struct stringBuf *obuf); struct stringBuf *newStringBuf(char *initstr); void doublingStringBuf(struct stringBuf *sbuf); +objectp checkIfTheFileExists(objectp name); void loadFile(objectp op); void loadFileWithCpp(objectp op); void showStringBuff(objectp op); @@ -165,6 +172,24 @@ void K00recoverFromError(); int K00declareClass(char *name,char *supername); void K00toPrimitiveClass(); +void *GC_malloc(size_t size); +void *sGC_malloc(size_t size); + +int KClex(); +int KCerror(char *s); +int KCparse(); +int sendKan(int p); +void printTens(objectp op); +void K00foo1(); +void K00fooPrimitive(); +void repl(FILE *inFile,FILE *outFile); +int readcomment(); +int readchar(); +void putchar0(int c); +void printf0(char *s); +void printf1(char *s); +int isReserved(char *s); +int shouldReplace(char *s);