216
by richard
This module will contain only the code and build system, and documentation |
1 |
typedef unsigned char symbol; |
2 |
||
3 |
/* Or replace 'char' above with 'short' for 16 bit characters.
|
|
4 |
||
5 |
More precisely, replace 'char' with whatever type guarantees the
|
|
6 |
character width you need. Note however that sizeof(symbol) should divide
|
|
7 |
HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
|
|
8 |
there is an alignment problem. In the unlikely event of a problem here,
|
|
9 |
consult Martin Porter.
|
|
10 |
||
11 |
*/
|
|
12 |
||
13 |
struct SN_env { |
|
14 |
symbol * p; |
|
15 |
int c; int l; int lb; int bra; int ket; |
|
398
by richard
Another patch from Olly Betts, to clean up the SN_env structure by removing |
16 |
symbol * * S; |
216
by richard
This module will contain only the code and build system, and documentation |
17 |
int * I; |
18 |
unsigned char * B; |
|
397
by richard
Another patch from Olly Betts - change the "B" member of SN_env back to |
19 |
};
|
216
by richard
This module will contain only the code and build system, and documentation |
20 |
|
21 |
extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size); |
|
22 |
extern void SN_close_env(struct SN_env * z, int S_size); |
|
398
by richard
Another patch from Olly Betts, to clean up the SN_env structure by removing |
23 |
|
216
by richard
This module will contain only the code and build system, and documentation |
24 |
extern int SN_set_current(struct SN_env * z, int size, const symbol * s); |
298
by richard
Preliminary work on checking for allocation errors. |
25 |
|
216
by richard
This module will contain only the code and build system, and documentation |
26 |