BSD 3 development
[unix-history] / usr / src / cmd / lisp / data.c
CommitLineData
8cd657f4
JF
1#include <stdio.h>
2
3#include "global.h"
4#include "gtabs.h"
5
6lispval lispsys[SIGNIF]; /* lisp data used by system */
7
8lispval gftab[GFTABLEN]; /* global function table for interpreter */
9
10lispval gctab[GCTABLEN] = /* global constant table for interpreter */
11 {nil,0,SMALL(-1),SMALL(0),SMALL(1),SMALL(2),SMALL(3),SMALL(4)};
12
13
14/* Port definitions *****************************************************/
15FILE *piport, /* standard input port */
16 *poport, /* standard output port */
17 *errport, /* port for error messages */
18 *rdrport, /* temporary port for readr */
19 *proport; /* port for protocal */
20int lineleng = 80; /* line length desired */
21int rlevel; /* used to indicate depth of recursion
22 in reader. No longer really necessary */
23char keybin = FALSE; /* logical flag: using keyboard */
24char protflag = FALSE; /* logical flag: want protocall */
25char rbktf; /* logical flag: ] mode */
26
27
28/* name stack ***********************************************************/
29struct argent *namptr, /* temporary pointer */
30 *nplim; /* don't have this = np */
31struct nament *bnp, /* top of bind stack */
32 *orgbnp, /* absolute bottom of ""*/
33 *bnplim; /* absolute top of "" */
34
35
36/* the typeing table ****************************************************/
37#ifndef ROWAN
38char typetab[TTSIZE] = {UNBO,ATOM,INT,INT,PORT};
39#else
40char typetab[TTSIZE] = {UNBO,ATOM,INT,INT,INT,PORT};
41#endif
42
43/* hashing things *******************************************************/
44struct atom *hasht[HASHTOP];
45int hash; /* set by ratom */
46int atmlen; /* length of atom including final null */
47
48
49/* big string buffer for whomever needs it ******************************/
50char strbuf[STRBLEN];
51char *endstrb = strbuf + 255;
52
53/* set by sstatus commands */
54int uctolc = 0; /* when set, uc chars in atoms go to lc */
55int dmpmode = 413; /* default mode for dumplisp
56 (note this is decimal not octal) */
57
58/* break and error declarations *****************************************/
59int depth = 0; /* depth of nested breaks */
60lispval contval; /* the value being returned up */
61struct argent *orgnp; /* used by top level to reset to start */
62int retval; /* used by each error/prog call */
63
64
65/* other stuff **********************************************************/
66lispval ftemp,vtemp,argptr,ttemp; /* temporaries: use briefly */
67int itemp;
68lispval sigacts[16]; /* for catching interrupts */
69int sigstruck,sigdelay; /* for catching interrupts */
70lispval stattab[16]; /* miscelleneous options */
71
72/* interpreter globals */
73
74int lctrace;
75int fvirgin;
76int GCtime;
77int errp; /* where are lying through our teeth. This
78 is a pointer to inside a function. */