source: abuse/trunk/src/lisp/symbols.h

Last change on this file was 494, checked in by Sam Hocevar, 11 years ago

style: remove trailing spaces, fix copyright statements.

  • Property svn:keywords set to Id
File size: 6.1 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Sam Hocevar.
7 */
8
9struct func
10{
11    char const *name;
12    short min_args, max_args;
13};
14
15/* select, digistr, load-file are not common lisp functions! */
16
17struct func sys_funcs[] =
18{
19    { "print", 1, -1 }, /* 0 */
20    { "car", 1, 1 }, /* 1 */
21    { "cdr", 1, 1 }, /* 2 */
22    { "length", 0, -1 }, /* 3 */
23    { "list", 0, -1 }, /* 4 */
24    { "cons", 2, 2 }, /* 5 */
25    { "quote", 1, 1 }, /* 6 */
26    { "eq", 2, 2 }, /* 7 */
27    { "+", 0, -1 }, /* 8 */
28    { "-", 1, -1 }, /* 9 */
29    { "if", 2, 3 }, /* 10 */
30    { "setf", 2, 2 }, /* 11 */
31    { "symbol-list", 0, 0 }, /* 12 */
32    { "assoc", 2, 2 }, /* 13 */
33    { "null", 1, 1 }, /* 14 */
34    { "acons", 2, 2 }, /* 15 */
35    { "pairlis", 2, 2 }, /* 16 */
36    { "let", 1, -1 }, /* 17 */
37    { "defun", 2, -1 }, /* 18 */
38    { "atom", 1, 1 }, /* 19 */
39    { "not", 1, 1 }, /* 20 */
40    { "and", -1, -1 }, /* 21 */
41    { "or", -1, -1 }, /* 22 */
42    { "progn", -1, -1 }, /* 23 */
43    { "equal", 2, 2 }, /* 24 */
44    { "concatenate", 1, -1 }, /* 25 */
45    { "char-code", 1, 1 }, /* 26 */
46    { "code-char", 1, 1 }, /* 27 */
47    { "*", -1, -1 }, /* 28 */
48    { "/", 1, -1 }, /* 29 */
49    { "cond", -1, -1 }, /* 30 */
50    { "select", 1, -1 }, /* 31 */
51    { "function", 1, 1 }, /* 32 */
52    { "mapcar", 2, -1 }, /* 33 */
53    { "funcall", 1, -1 }, /* 34 */
54    { ">", 2, 2 }, /* 35 */
55    { "<", 2, 2 }, /* 36 */
56    { "tmp-space", 0, 0 }, /* 37 */
57    { "perm-space", 0, 0 }, /* 38 */
58    { "symbol-name", 1, 1 }, /* 39 */
59    { "trace", 0, -1 }, /* 40 */
60    { "untrace", 0, -1 }, /* 41 */
61    { "digstr", 2, 2 }, /* 42 */
62    { "compile-file", 1, 1 }, /* 43 */
63    { "abs", 1, 1 }, /* 44 */
64    { "min", 2, 2 }, /* 45 */
65    { "max", 2, 2 }, /* 46 */
66    { ">=", 2, 2 }, /* 47 */
67    { "<=", 2, 2 }, /* 48 */
68    { "backquote", 1, 1 }, /* 49 */
69    { "comma", 1, 1 }, /* 50 */
70    { "nth", 2, 2 }, /* 51 */
71    { "resize-tmp", 1, 1 }, /* 52 */
72    { "resize-perm", 1, 1 }, /* 53 */
73    { "cos", 1, 1 }, /* 54 */
74    { "sin", 1, 1 }, /* 55 */
75    { "atan2", 2, 2 }, /* 56 */
76    { "enum", 1, -1 }, /* 57 */
77    { "quit", 0, 0 }, /* 58 */
78    { "eval", 1, 1 }, /* 59 */
79    { "break", 0, 0 }, /* 60 */
80    { "mod", 2, 2 }, /* 61 */
81    { "write_profile", 1, 1 }, /* 62 */
82    { "setq", 2, 2 }, /* 63 */
83    { "for", 4, -1 }, /* 64 */
84    { "open_file", 2, -1 }, /* 65 */
85    { "load", 1, 1 }, /* 66 */
86    { "bit-and", 1, -1 }, /* 67 */
87    { "bit-or", 1, -1 }, /* 68 */
88    { "bit-xor", 1, -1 }, /* 69 */
89    { "make-array", 1, -1 }, /* 70 */
90    { "aref", 2, 2 }, /* 71 */
91    { "if-1progn", 2, 3 }, /* 72 */
92    { "if-2progn", 2, 3 }, /* 73 */
93    { "if-12progn", 2, 3 }, /* 74 */
94    { "eq0", 1, 1 }, /* 75 */
95    { "preport", 1, 1 }, /* 76 */
96    { "search", 2, 2 }, /* 77 */
97    { "elt", 2, 2 }, /* 78 */
98    { "listp", 1, 1 }, /* 79 */
99    { "numberp", 1, 1 }, /* 80 */
100    { "do", 2, 3 }, /* 81 */
101    { "gc", 0, 0 }, /* 82 */
102    { "schar", 2, 2 }, /* 83 */
103    { "symbolp", 1, 1 }, /* 84 */
104    { "num2str", 1, 1 }, /* 85 */
105    { "nconc", 2, -1 }, /* 86 */
106    { "first", 1, 1 }, /* 87 */
107    { "second", 1, 1 }, /* 88 */
108    { "third", 1, 1 }, /* 89 */
109    { "fourth", 1, 1 }, /* 90 */
110    { "fifth", 1, 1 }, /* 91 */
111    { "sixth", 1, 1 }, /* 92 */
112    { "seventh", 1, 1 }, /* 93 */
113    { "eighth", 1, 1 }, /* 94 */
114    { "ninth", 1, 1 }, /* 95 */
115    { "tenth", 1, 1 }, /* 96 */
116    { "substr", 3, 3 }, /* 97 */
117    { "local_load", 1, 1 }, /* 98 */
118};
119
120enum sys_func_index
121{
122    SYS_FUNC_PRINT = 0,
123    SYS_FUNC_CAR = 1,
124    SYS_FUNC_CDR = 2,
125    SYS_FUNC_LENGTH = 3,
126    SYS_FUNC_LIST = 4,
127    SYS_FUNC_CONS = 5,
128    SYS_FUNC_QUOTE = 6,
129    SYS_FUNC_EQ = 7,
130    SYS_FUNC_PLUS = 8,
131    SYS_FUNC_MINUS = 9,
132    SYS_FUNC_IF = 10,
133    SYS_FUNC_SETF = 11,
134    SYS_FUNC_SYMBOL_LIST = 12,
135    SYS_FUNC_ASSOC = 13,
136    SYS_FUNC_NULL = 14,
137    SYS_FUNC_ACONS = 15,
138    SYS_FUNC_PAIRLIS = 16,
139    SYS_FUNC_LET = 17,
140    SYS_FUNC_DEFUN = 18,
141    SYS_FUNC_ATOM = 19,
142    SYS_FUNC_NOT = 20,
143    SYS_FUNC_AND = 21,
144    SYS_FUNC_OR = 22,
145    SYS_FUNC_PROGN = 23,
146    SYS_FUNC_EQUAL = 24,
147    SYS_FUNC_CONCATENATE = 25,
148    SYS_FUNC_CHAR_CODE = 26,
149    SYS_FUNC_CODE_CHAR = 27,
150    SYS_FUNC_TIMES = 28,
151    SYS_FUNC_SLASH = 29,
152    SYS_FUNC_COND = 30,
153    SYS_FUNC_SELECT = 31,
154    SYS_FUNC_FUNCTION = 32,
155    SYS_FUNC_MAPCAR = 33,
156    SYS_FUNC_FUNCALL = 34,
157    SYS_FUNC_GT = 35,
158    SYS_FUNC_LT = 36,
159    SYS_FUNC_TMP_SPACE = 37,
160    SYS_FUNC_PERM_SPACE = 38,
161    SYS_FUNC_SYMBOL_NAME = 39,
162    SYS_FUNC_TRACE = 40,
163    SYS_FUNC_UNTRACE = 41,
164    SYS_FUNC_DIGSTR = 42,
165    SYS_FUNC_COMPILE_FILE = 43,
166    SYS_FUNC_ABS = 44,
167    SYS_FUNC_MIN = 45,
168    SYS_FUNC_MAX = 46,
169    SYS_FUNC_GE = 47,
170    SYS_FUNC_LE = 48,
171    SYS_FUNC_BACKQUOTE = 49,
172    SYS_FUNC_COMMA = 50,
173    SYS_FUNC_NTH = 51,
174    SYS_FUNC_RESIZE_TMP = 52,
175    SYS_FUNC_RESIZE_PERM = 53,
176    SYS_FUNC_COS = 54,
177    SYS_FUNC_SIN = 55,
178    SYS_FUNC_ATAN2 = 56,
179    SYS_FUNC_ENUM = 57,
180    SYS_FUNC_QUIT = 58,
181    SYS_FUNC_EVAL = 59,
182    SYS_FUNC_BREAK = 60,
183    SYS_FUNC_MOD = 61,
184    SYS_FUNC_WRITE_PROFILE = 62,
185    SYS_FUNC_SETQ = 63,
186    SYS_FUNC_FOR = 64,
187    SYS_FUNC_OPEN_FILE = 65,
188    SYS_FUNC_LOAD = 66,
189    SYS_FUNC_BIT_AND = 67,
190    SYS_FUNC_BIT_OR = 68,
191    SYS_FUNC_BIT_XOR = 69,
192    SYS_FUNC_MAKE_ARRAY = 70,
193    SYS_FUNC_AREF = 71,
194    SYS_FUNC_IF_1PROGN = 72,
195    SYS_FUNC_IF_2PROGN = 73,
196    SYS_FUNC_IF_12PROGN = 74,
197    SYS_FUNC_EQ0 = 75,
198    SYS_FUNC_PREPORT = 76,
199    SYS_FUNC_SEARCH = 77,
200    SYS_FUNC_ELT = 78,
201    SYS_FUNC_LISTP = 79,
202    SYS_FUNC_NUMBERP = 80,
203    SYS_FUNC_DO = 81,
204    SYS_FUNC_GC = 82,
205    SYS_FUNC_SCHAR = 83,
206    SYS_FUNC_SYMBOLP = 84,
207    SYS_FUNC_NUM2STR = 85,
208    SYS_FUNC_NCONC = 86,
209    SYS_FUNC_FIRST = 87,
210    SYS_FUNC_SECOND = 88,
211    SYS_FUNC_THIRD = 89,
212    SYS_FUNC_FOURTH = 90,
213    SYS_FUNC_FIFTH = 91,
214    SYS_FUNC_SIXTH = 92,
215    SYS_FUNC_SEVENTH = 93,
216    SYS_FUNC_EIGHTH = 94,
217    SYS_FUNC_NINTH = 95,
218    SYS_FUNC_TENTH = 96,
219    SYS_FUNC_SUBSTR = 97,
220    SYS_FUNC_LOCAL_LOAD = 98,
221};
222
Note: See TracBrowser for help on using the repository browser.