-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy paths9ext.h
More file actions
33 lines (29 loc) · 803 Bytes
/
s9ext.h
File metadata and controls
33 lines (29 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Scheme 9 from Empty Space
* By Nils M Holm, 2007-2019
* In the public domain
* If your country does not have a public domain,
* the 0BSD license applies. See the file LICENSE.
*
* Interface for extension procedures.
*/
extern cell Rts;
extern int Sp;
#define parg(n) car(vector(*GC_stack)[*GC_stkptr-(n)])
#define narg() fixval(vector(*GC_stack)[*GC_stkptr])
#define BOL T_BOOLEAN
#define CHR T_CHAR
#define INP T_INPUT_PORT
#define INT T_INTEGER
#define LST T_LIST
#define OUP T_OUTPUT_PORT
#define PAI T_PAIR
#define FUN T_FUNCTION
#define REA T_REAL
#define STR T_STRING
#define SYM T_SYMBOL
#define VEC T_VECTOR
#define ___ T_ANY
void add_primitives(char *name, S9_PRIM *p);
void error(char *msg, cell expr);
cell integer_value(char *src, cell x);