98 static int restricted_function_call(LISP l);
100 static void gc_mark_and_sweep(
void);
101 static void gc_ms_stats_start(
void);
102 static void gc_ms_stats_end(
void);
103 static void mark_protected_registers(
void);
104 static void mark_locations(LISP *
start,LISP *
end);
105 static void gc_sweep(
void);
106 static void mark_locations_array(LISP *x,
long n);
112 {
return(
"3.0 FIELD TEST");}
133 static LISP siod_backtrace =
NIL;
138 static LISP sym_quote =
NIL;
139 static LISP sym_dot =
NIL;
158 static const char *user_ch_readm =
"";
159 static const char *user_te_readm =
"";
165 static void err(
const char *message, LISP x,
const char *s)
EST_NORETURN;
180 #define DEAD_POINTER_GROWTH (10) 182 static LISP set_restricted(LISP l);
196 (*_into)->gc_mark = 0;
197 (*_into)->type = (short) _type;
212 static void start_rememberring_dead(
void)
217 static int is_dead(
void *ptr)
226 static void mark_as_dead(
void *ptr)
240 {printf(
"Welcome to SIOD, Scheme In One Defun, Version %s\n",
242 printf(
"(C) Copyright 1988-1994 Paradigm Associates Inc.\n");
243 if (extra_info !=
"")
244 printf(
"%s\n", (
const char *)extra_info);
253 {printf(
"heap_size = %ld cells, %ld bytes. %ld inums. GC is %s\n",
260 printf(
"heap_1 at %p, heap_2 at %p\n",(
void *)
heap_1,(
void *)
heap_2);
262 printf(
"heap_1 at %p\n",(
void *)
heap_1);}
269 static void err_ctrl_c(
void)
273 err(
"control-c interrupt",
NIL);}
295 sigaddset(&set1,SIGFPE);
296 sigprocmask(SIG_UNBLOCK,&set1,
NULL);
299 err(
"floating point exception",
NIL);}
312 sigaddset(&set1,SIGINT);
313 sigprocmask(SIG_UNBLOCK,&set1,
NULL);
342 if (k == 2)
return(2);
366 static void ignore_puts(
char *st)
369 static void noprompt_puts(
char *st)
370 {
if (strcmp(st,
"> ") != 0)
373 static char *repl_c_string_arg =
NULL;
374 static long repl_c_string_flag = 0;
376 static LISP repl_c_string_read(
void)
378 if (repl_c_string_arg ==
NULL)
380 s =
strcons(strlen(repl_c_string_arg),repl_c_string_arg);
381 repl_c_string_arg =
NULL;
384 static void ignore_print(LISP x)
386 repl_c_string_flag = 1;}
388 static void not_ignore_print(LISP x)
389 {repl_c_string_flag = 1;
393 long want_sigint,
long want_init,
long want_print)
406 repl_c_string_arg = str;
407 repl_c_string_flag = 0;
411 else if (repl_c_string_flag == 1)
417 #include <sys/types.h> 418 #include <sys/times.h> 424 total += b.tms_stime;
425 return(total / 60.0);}
427 #if defined(WIN32) | defined(VMS) 428 #ifndef CLOCKS_PER_SEC 429 #define CLOCKS_PER_SEC CLK_TCK 432 {
return(((
double) clock()) / ((
double) CLOCKS_PER_SEC));}
442 LISP (*read_f)(
void),
443 LISP (*eval_f)(LISP),
444 void (*print_f)(LISP))
464 {
if (repl_putss ==
NULL)
470 static void display_backtrace(LISP args)
480 printf(
"BACKTRACE:\n");
481 for (i=0,l=siod_backtrace; l !=
NIL; l=
cdr(l),i++)
483 fprintf(stdout,
"%4d: ",i);
485 fprintf(stdout,
"\n");
490 printf(
"BACKTRACE:\n");
492 LISP frame =
siod_nth(nth,siod_backtrace);
493 fprintf(stdout,
"%4d: ",nth);
494 pprintf(stdout,frame,3,72,-1,-1);
495 fprintf(stdout,
"\n");
512 "GC took %g seconds, %ld compressed to %ld, %ld free\n",
534 display_backtrace(x);
538 (restricted_function_call(x) ==
FALSE))
539 err(
"Expression contains functions not in restricted list",x);
542 siod_backtrace =
NIL;
550 "Evaluation took %g seconds %ld cons work\n",
555 "Evaluation took %g seconds (%g in gc) %ld cons work\n",
573 static void err(
const char *message, LISP x,
const char *s)
578 fprintf(stderr,
"SIOD ERROR: %s %s: ",
579 (message) ? message :
"?",
583 fprintf(stderr,
"\n");
588 fprintf(stderr,
"SIOD ERROR: %s %s\n",
589 (message) ? message :
"?",
596 display_backtrace(
NIL);
602 (*fatal_exit_hook)();
608 void err(
const char *message, LISP x)
613 void err(
const char *message,
const char *x)
619 {
err(
"BUG. Reached impossible case",
NIL);}
624 err(
"the currently assigned stack limit has been exceeded",
NIL);}
631 {sprintf(
tkbuffer,
"Stack_size = %ld bytes, [%p,%p]\n",
649 sprintf(b,
"%.8g",
FLONM(x));
656 return(x->storage_as.string.data);
658 err(
"not a symbol or string",x);
661 LISP
lerr(LISP message, LISP x)
666 {
err(
"ran out of storage",
NIL);}
677 ((x - (n = (
long)x)) == 0) &&
696 if (tmp == (
char *)
NULL)
err(
"failed to allocate storage from system",
NIL);
701 const unsigned char *cname;
702 long hash=0,n,c,flag;
709 cname = (
unsigned char *)name;
710 while((c = *cname++)) hash = ((hash * 17) ^ c) % n;
715 if (strcmp(name,
PNAME(
CAR(l))) == 0)
730 char *dname = (
char *)(
void *)name;
738 char *dname = (
char *)(
void *)name;
748 (*z).storage_as.subr.name = name;
749 (*z).storage_as.subr0.f =
f;
755 (*z).storage_as.closure.env = env;
756 (*z).storage_as.closure.code = code;
763 for(l=0,reg = protected_registers;
reg; reg = reg->
next)
771 fprintf(stderr,
"Cannot unprotected %lx: never protected\n",
772 (
unsigned long)*location);
778 protected_registers = reg->
next;
794 for(reg = protected_registers;
reg; reg = reg->
next)
809 protected_registers =
reg;}
819 for(reg = protected_registers;
reg; reg = (*reg).
next)
820 {location = (*reg).location;
825 static void init_storage_1(
int init_heap_size)
882 init_storage_1(init_heap_size);
896 void init_subr_0(
const char *name, LISP (*fcn)(
void),
const char *doc)
898 void init_subr_1(
const char *name, LISP (*fcn)(LISP),
const char *doc)
900 void init_subr_2(
const char *name, LISP (*fcn)(LISP,LISP),
const char *doc)
902 void init_subr_3(
const char *name, LISP (*fcn)(LISP,LISP,LISP),
const char *doc)
904 void init_subr_4(
const char *name, LISP (*fcn)(LISP,LISP,LISP,LISP),
const char *doc)
906 void init_lsubr(
const char *name, LISP (*fcn)(LISP),
const char *doc)
908 void init_fsubr(
const char *name, LISP (*fcn)(LISP,LISP),
const char *doc)
910 void init_msubr(
const char *name, LISP (*fcn)(LISP *,LISP *),
const char *doc)
915 if (user_types ==
NULL)
918 memset(user_types,0,n);}
920 return(&user_types[type]);
922 err(
"type number out of range",
NIL);
929 int new_type = siod_user_type;
934 cerr <<
"SIOD: no more new types allowed, tc_table_dim needs increased" 968 if ((*x).gc_mark == 1)
return(
CAR(x));
987 memcpy(nw,x,
sizeof(
struct obj));
996 memcpy(nw,x,
sizeof(
struct obj));}}
1017 for(ptr=newspace; ptr <
heap; ++ptr)
1044 for(ptr=space; ptr <
end; ++ptr)
1045 if (ptr->gc_mark == 0)
1057 wfree(ptr->storage_as.string.data);
1076 {LISP newspace,oldspace,
end;
1080 fprintf(stderr,
"GC ing \n");
1100 gc_mark_and_sweep();
1105 static void gc_mark_and_sweep(
void)
1107 gc_ms_stats_start();
1109 fprintf(stderr,
"[GC mark and sweep: setjmp failed: Aborting GC collection]\n");
1115 mark_protected_registers();
1117 (LISP *) &stack_end);
1121 static void gc_ms_stats_start(
void)
1125 fprintf(stderr,
"[starting GC]\n");}
1127 static void gc_ms_stats_end(
void)
1131 fprintf(stderr,
"[GC took %g cpu seconds, %ld cells collected]\n",
1139 if NULLP(ptr)
return;
1140 if ((*ptr).gc_mark)
return;
1142 switch ((*ptr).type)
1153 gc_mark((*ptr).storage_as.closure.code);
1154 ptr = (*ptr).storage_as.closure.env;
1173 static void mark_protected_registers(
void)
1177 for(reg = protected_registers;
reg; reg = (*reg).
next)
1179 location = (*reg).location;
1184 static void mark_locations(LISP *
start,LISP *
end)
1192 mark_locations_array(start,n);}
1194 static void mark_locations_array(LISP *x,
long n)
1201 (((((
char *)p) - ((
char *)
heap_org)) %
sizeof(
struct obj)) == 0) &&
1205 static void gc_sweep(
void)
1206 {LISP ptr,
end,nfreelist;
1212 start_rememberring_dead();
1214 if (((*ptr).gc_mark) == 0)
1215 {
switch((*ptr).type)
1222 wfree(ptr->storage_as.string.data);
1255 CDR(ptr) = nfreelist;
1270 {
long old_status_flag,flag;
1273 err(
"implementation cannot GC at will with stop-and-copy\n",
1286 gc_mark_and_sweep();
1314 sprintf(
tkbuffer,
"%ld allocated %ld free\n",
1323 sprintf(
tkbuffer,
"%ld allocated %ld free\n",
1329 {LISP result,v1,v2,tmp;
1331 if NCONSP(l)
err(
"bad syntax argument list",l);
1333 for(v1=result,v2=
CDR(l);
1335 v1 = tmp, v2 =
CDR(v2))
1338 if NNULLP(v2)
err(
"bad syntax argument list",l);
1346 return(
cons(
cons(formals,actuals),env));
1349 #define ENVLOOKUP_TRICK 1 1354 {LISP frame,al,fl,tmp;
1357 for(frame=env;
CONSP(frame);frame=
CDR(frame))
1359 if NCONSP(tmp)
err(
"damaged frame",tmp);
1361 {
if NCONSP(al)
err(
"too few arguments",tmp);
1362 if EQ(
CAR(fl),var)
return(al);}
1365 #if (ENVLOOKUP_TRICK) 1370 err(
"damaged env",env);
1379 {LISP tmp,arg1,rval;
1384 siod_backtrace =
cons(x,siod_backtrace);
1393 siod_backtrace =
cdr(siod_backtrace);
1398 siod_backtrace =
cdr(siod_backtrace);
1412 tmp =
leval(tmp,env);
1416 rval =
SUBR0(tmp)();
1417 siod_backtrace =
cdr(siod_backtrace);
1421 siod_backtrace =
cdr(siod_backtrace);
1428 siod_backtrace =
cdr(siod_backtrace);
1435 siod_backtrace =
cdr(siod_backtrace);
1444 siod_backtrace =
cdr(siod_backtrace);
1448 siod_backtrace =
cdr(siod_backtrace);
1452 siod_backtrace =
cdr(siod_backtrace);
1457 siod_backtrace =
cdr(siod_backtrace);
1463 car((*tmp).storage_as.closure.code),
1464 (*tmp).storage_as.closure.env);
1465 x =
cdr((*tmp).storage_as.closure.code);
1476 siod_backtrace =
cdr(siod_backtrace);
1481 err(
"bad function",tmp);}
1483 siod_backtrace =
cdr(siod_backtrace);
1487 void (*
prin1)(LISP, FILE *),
1508 LISP (*
equal)(LISP,LISP))
1534 int winsock_unget_buffer;
1535 bool winsock_unget_buffer_unused=
true;
1536 bool use_winsock_unget_buffer;
1538 int f_getc_winsock(HANDLE h)
1541 DWORD lpNumberOfBytesRead;
1543 if (use_winsock_unget_buffer)
1545 use_winsock_unget_buffer =
false;
1546 return winsock_unget_buffer;
1549 if (SOCKET_ERROR == recv((SOCKET)h,&c,1,0))
1551 if (WSAECONNRESET == GetLastError())
1554 cerr <<
"f_getc_winsock(): error reading from socket\n";
1557 winsock_unget_buffer=c;
1558 winsock_unget_buffer_unused =
false;
1563 void f_ungetc_winsock(
int c, HANDLE h)
1565 if (winsock_unget_buffer_unused)
1567 cerr <<
"f_ungetc_winsock: tried to unget before reading socket\n";
1569 use_winsock_unget_buffer =
true;}
1577 if (c == EOF) {
if (eoferr)
err(eoferr,
NIL);
else return(c); }
1578 if (commentp) {
if (c ==
'\n') commentp = 0;}
1579 else if (c ==
';') commentp = 1;
1580 else if (!isspace(c))
return(c);}}
1599 LISP lreadwinsock(
void)
1611 if (c == EOF)
return(
eof_val);
1617 LISP (*fcn2)(
char *,
long,
int *))
1618 {user_ch_readm = all_set;
1619 user_te_readm = end_set;
1626 const char *pp, *last_prompt;
1630 c =
flush_ws(f,
"end of file inside read");
1635 rval = lreadparen(f);
1639 err(
"unexpected close paren",
NIL);
1643 return(
cons(
cintern(
"+internal-backquote"),lreadr(f)));
1648 pp =
"+internal-comma-atsign";
1651 pp =
"+internal-comma-dot";
1654 pp =
"+internal-comma";
1660 rval = lreadstring(f);
1669 if (c == EOF)
return(
lreadtk(j));
1670 if (isspace(c))
return(
lreadtk(j));
1671 if (strchr(
"()'`,;\"",c) || strchr(user_te_readm,c))
1674 err(
"symbol larger than maxsize (can you use a string instead?)",
NIL);}
1680 c =
flush_ws(f,
"end of file inside list");
1681 if (c ==
')')
return(
NIL);
1686 c =
flush_ws(f,
"end of file inside list");
1687 if (c !=
')')
err(
"missing close paren",
NIL);
1689 return(
cons(tmp,lreadparen(f)));}
1699 while ((c =
flush_ws(f,
"end of file inside list")) !=
')')
1706 c =
flush_ws(f,
"end of file inside list");
1707 if (c !=
')')
err(
"missing close paren",
NIL);
1708 if (l ==
NIL)
err(
"no car for dotted pair",
NIL);
1726 static LISP lreadstring(
struct gen_readio *f)
1730 static char *str = 0;
1736 while(((c =
GETC_FCN(f)) !=
'"') && (c != EOF))
1740 if (c == EOF)
err(
"eof after \\",
NIL);
1764 if (c == EOF)
err(
"eof after \\0",
NIL);
1766 n = n * 8 + c -
'0';
1796 {tmp = (*user_readt)((
char *)p,j,&flag);
1797 if (flag)
return(tmp);}
1800 if (*p ==
'-') p+=1;
1802 while((*p < 128) && (isdigit(*p))) {p+=1; adigit=1;}
1805 while((*p < 128) && (isdigit(*p))) {p+=1; adigit=1;}}
1806 if (!adigit)
goto a_symbol;
1809 if (*p==
'-'||*p==
'+') p+=1;
1810 if ((!isdigit(*p) || (*p > 127)))
goto a_symbol;
else p+=1;
1811 while((*p < 128) && (isdigit(*p))) p+=1;}
1812 if (*p)
goto a_symbol;
1828 exit((
int)
FLONM(arg));
1845 {
return(exp->storage_as.closure.code);}
1848 {
return(exp->storage_as.closure.env);}
1852 return((
long int)
FLONM(x));}
1860 return((
float)
FLONM(x));}
1867 Evaluate DATA and return result.");
1869 "(gc-status OPTION)\n\ 1870 Control summary information during garbage collection. If OPTION is t,\n\ 1871 output information at each garbage collection, if nil do gc silently.");
1874 Collect garbage now, where gc method supports it.");
1876 "(error MESSAGE DATA)\n\ 1877 Prints MESSAGE about DATA and throws an error.");
1880 Exit from program, does not return.");
1883 Exit from program, if RCODE is given it is given as an argument to\n\ 1884 the system call exit.");
1886 "(env-lookup VARNAME ENVIRONMENT)\n\ 1887 Return value of VARNAME in ENVIRONMENT.");
1890 For controlling various levels of warning messages. If MODE is nil, or\n\ 1891 not specified stop all warning messages from being displayed. If MODE\n\ 1892 display warning messages.");
1894 "(%%stack-limit AMOUNT SILENT)\n\ 1895 Set stacksize to AMOUNT, if SILENT is non nil do it silently.");
1898 Intern ATOM on the oblist.");
1900 "(%%closure ENVIRONMENT CODE)\n\ 1901 Make a closure from given environment and code.");
1903 "(%%closure-code CLOSURE)\n\ 1904 Return code part of closure.");
1906 "(%%closure-env CLOSURE)\n\ 1907 Return environment part of closure.");
1909 "(set_backtrace arg)\n\ 1910 If arg is non-nil a backtrace will be display automatically after errors\n\ 1911 if arg is nil, a backtrace will not automatically be displayed (use\n\ 1912 (:backtrace) for display explicitly.");
1913 init_subr_1(
"set_server_safe_functions",set_restricted,
1914 "(set_server_safe_functions LIST)\n\ 1915 Sets restricted list to LIST. When restricted list is non-nil only\n\ 1916 functions whose names appear in this list may be executed. This\n\ 1917 is used so that clients in server mode may be restricted to a small\n\ 1918 number of safe commands. [see Server/client API]");
1944 (((((
char *)p) - ((
char *)
heap_org)) %
sizeof(
struct obj)) == 0))
1963 static LISP set_restricted(LISP l)
1974 static int restricted_function_call(LISP l)
1991 else if (restricted_function_call(
car(l)) ==
FALSE)
1996 if (restricted_function_call(
car(p)) ==
FALSE)
LISP closure_env(LISP exp)
int siod_register_user_type(const char *name)
void gc_protect_sym(LISP *location, const char *st)
#define tc_first_user_type
LISP(* fast_print)(LISP, LISP)
char * wstrdup(const char *s)
void err_stack(char *ptr)
float end(const EST_Item &item)
#define walloc(TYPE, SIZE)
void set_fatal_exit_hook(void(*fcn)(void))
LISP envlookup(LISP var, LISP env)
void init_subr_0(const char *name, LISP(*fcn)(void), const char *doc)
LISP readtl(struct gen_readio *f)
#define INTERRUPT_CHECK()
void fput_st(FILE *f, const char *st)
repl_getc_fn siod_fancy_getc
#define STACK_LIMIT(_ptr, _amt)
long repl_driver(long want_sigint, long want_init, struct repl_hooks *h)
const char * siod_version(void)
void setdoc(LISP name, LISP doc)
void set_type_hooks(long type, long(*c_sxhash)(LISP, long), LISP(*equal)(LISP, LISP))
long no_interrupt(long n)
void sock_acknowledge_error()
void(* repl_ungetc_fn)(int, FILE *)
void(* ungetc_fcn)(int, char *)
void gc_protect_n(LISP *location, long n)
#define STACK_CHECK(_ptr)
LISP symcons(char *pname, LISP vcell)
#define DEFAULT_HEAP_SIZE
int nth(EST_String name, EST_TList< EST_String > &lex)
void init_subrs_list(void)
LISP strcons(long length, const char *data)
LISP(* user_readm)(int, struct gen_readio *)
LISP gc_status(LISP args)
void set_repl_hooks(void(*puts_f)(char *), LISP(*read_f)(void), LISP(*eval_f)(LISP), void(*print_f)(LISP))
float get_c_float(LISP x)
void init_subr_4(const char *name, LISP(*fcn)(LISP, LISP, LISP, LISP), const char *doc)
#define NEWCELL(_into, _type)
STATIC char * reg(int paren, int *flagp)
LISP leval_args(LISP l, LISP env)
void gc_stop_and_copy(void)
void init_subrs_xtr(void)
struct gc_protected * next
void set_print_hooks(long type, void(*prin1)(LISP, FILE *), void(*print_string)(LISP, char *))
void init_subrs_math(void)
LISP lerr(LISP message, LISP x)
struct gc_protected * protected_registers
LISP siod_nth(int nth, LISP list)
void(* prin1)(LISP, FILE *)
LISP extend_env(LISP actuals, LISP formals, LISP env)
void init_subrs_file(void)
const char * get_c_string(LISP x)
void handle_sigint(int sig SIG_restargs)
void siod_print_welcome(EST_String extra_info)
void(* print_string)(LISP, char *)
LISP vload(const char *fname, long cflag)
void(* repl_puts)(char *)
LISP(* leval)(LISP, LISP *, LISP *)
void init_subrs_format(void)
const char * siod_primary_prompt
LISP rintern(const char *name)
LISP(* equal)(LISP, LISP)
void(* fatal_exit_hook)(void)
void init_subr(const char *name, long type, SUBR_FUNC fcn)
LISP cons(LISP x, LISP y)
void scan_registers(void)
LISP(* user_readt)(char *, long, int *)
void init_subr_3(const char *name, LISP(*fcn)(LISP, LISP, LISP), const char *doc)
LISP setvar(LISP var, LISP val, LISP env)
LISP subrcons(long type, const char *name, SUBR_FUNC f)
void free_oldspace(LISP space, LISP end)
LISP read_from_string(const char *)
void pprintf(FILE *fd, LISP exp, int indent, int width, int depth, int length)
void err(const char *message, LISP x)
#define wrealloc(PTR, TYPE, SIZE)
void grepl_puts(char *st, void(*repl_putss)(char *))
void init_msubr(const char *name, LISP(*fcn)(LISP *, LISP *), const char *doc)
void set_io_hooks(long type, LISP(*fast_print)(LISP, LISP), LISP(*fast_read)(int, LISP))
void init_subr_2(const char *name, LISP(*fcn)(LISP, LISP), const char *doc)
void NNEWCELL(LISP *_into, long _type)
void f_ungetc(int c, FILE *f)
void init_subrs_base(void)
void set_eval_hooks(long type, LISP(*fcn)(LISP, LISP *, LISP *))
float time(const EST_Item &item)
long repl_c_string(char *str, long want_sigint, long want_init, long want_print)
void scan_newspace(LISP newspace)
void init_subr_1(const char *name, LISP(*fcn)(LISP), const char *doc)
LISP(* fast_read)(int, LISP)
void set_gc_hooks(long type, int gc_free_once, LISP(*rel)(LISP), LISP(*mark)(LISP), void(*scan)(LISP), void(*free)(LISP), void(*clear)(LISP), long *kind)
void gc_fatal_error(void)
void gc_unprotect(LISP *location)
void init_subrs_sys(void)
int(* repl_getc_fn)(FILE *)
LISP closure(LISP env, LISP code)
repl_ungetc_fn siod_fancy_ungetc
void handle_sigfpe(int sig SIG_restargs)
void init_lsubr(const char *name, LISP(*fcn)(LISP), const char *doc)
const char * siod_secondary_prompt
LISP set_backtrace(LISP n)
LISP(* gc_relocate)(LISP)
struct user_type_hooks * user_types
float start(const EST_Item &item)
char * must_malloc(unsigned long size)
void set_read_hooks(char *all_set, char *end_set, LISP(*fcn1)(int, struct gen_readio *), LISP(*fcn2)(char *, long, int *))
struct user_type_hooks * get_user_type_hooks(long type)
void init_storage(int init_heap_size)
void init_fsubr(const char *name, LISP(*fcn)(LISP, LISP), const char *doc)
const char * siod_prog_name
void init_subrs_str(void)
LISP cstrcons(const char *data)
void gc_protect(LISP *location)
LISP siod_make_typed_cell(long type, void *s)
void init_subrs_core(void)
void gc_for_newcell(void)
void init_subrs_doc(void)
double get_c_double(LISP x)
LISP gen_intern(char *name, int require_copy)
#define DEAD_POINTER_GROWTH
LISP stack_limit(LISP amount, LISP silent)
LISP lfwarning(LISP mode)
LISP lprin1f(LISP exp, FILE *f)
long(* c_sxhash)(LISP, long)
int flush_ws(struct gen_readio *f, const char *eoferr)
struct catch_frame * catch_framep
LISP siod_member_str(const char *key, LISP list)
jmp_buf save_regs_gc_mark
void(* repl_puts)(char *)
LISP closure_code(LISP exp)
void put_st(const char *st)
LISP leval(LISP x, LISP qenv)
void siod_reset_prompt(void)
long int get_c_int(LISP x)
void close_open_files(void)
LISP cintern(const char *name)