]> 4ch.mooo.com Git - 16.git/blob - 16/v2/source/verge/VCC/COMPILE.H
wwww
[16.git] / 16 / v2 / source / verge / VCC / COMPILE.H
1 /*\r
2 Copyright (C) 1998 BJ Eirich (aka vecna)\r
3 This program is free software; you can redistribute it and/or\r
4 modify it under the terms of the GNU General Public License\r
5 as published by the Free Software Foundation; either version 2\r
6 of the License, or (at your option) any later version.\r
7 This program is distributed in the hope that it will be useful,\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
10 See the GNU General Public Lic\r
11 See the GNU General Public License for more details.\r
12 You should have received a copy of the GNU General Public License\r
13 along with this program; if not, write to the Free Software\r
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
15 */\r
16 \r
17 #if !defined(__COMPILE_INC)\r
18 #define __COMPILE_INC\r
19 \r
20 #define VOID 1\r
21 #define INT 1\r
22 #define CHARPTR 2\r
23 #define STRING 3\r
24 \r
25 extern unsigned char *source, *src;\r
26 extern unsigned char *outbuf, *code;\r
27 extern unsigned char inevent;\r
28 \r
29 typedef struct\r
30 {\r
31   char fname[40];\r
32   char argtype[20];\r
33   int numargs, numlocals;\r
34   int returntype;\r
35   int syscodeofs;\r
36 } funcdecl;\r
37 \r
38 extern funcdecl funcs[300];\r
39 extern int numfuncs;\r
40 \r
41 typedef struct\r
42 {\r
43   char vname[40];\r
44   int vsofs;\r
45   int arraylen;\r
46 } strdecl;\r
47 \r
48 extern strdecl str[300];\r
49 extern int sstartofs;\r
50 extern int numstr;\r
51 \r
52 typedef struct\r
53 {\r
54   char vname[40];\r
55   int varstartofs;\r
56   int arraylen;\r
57 } vardecl;\r
58 \r
59 extern vardecl vars[300];\r
60 extern int curstartofs;\r
61 extern int numvars;\r
62 extern int varidx, startsyscript;\r
63 extern char larg[12][40];\r
64 extern int c;\r
65 \r
66 extern char *functbl[512];\r
67 extern int mfuncs;\r
68 \r
69 extern void CompileMAP(char *fname);\r
70 extern void CompileSystem();\r
71 extern void Expect(char *str);\r
72 \r
73 extern void EmitC(char c);\r
74 extern void EmitW(short int w);\r
75 extern void EmitD(int w);\r
76 extern void EmitOperand();\r
77 extern void EmitString(char *str);\r
78 extern void HandleString();\r
79 \r
80 #endif // __COMPILE_INC\r