17 #include "EST_String.h"
18 #include "EST_string_aux.h"
19 #include "EST_error.h"
21 #include "siod_defs.h"
23 int siod_init(
int heap_size=DEFAULT_HEAP_SIZE);
24 int siod_repl(
int interactive);
25 void siod_print_welcome(
EST_String extra_info);
26 void siod_print_welcome(
void);
28 const char *get_c_string(LISP x);
29 int get_c_int(LISP x);
30 double get_c_double(LISP x);
31 float get_c_float(LISP x);
32 LISP flocons(
double x);
33 FILE *get_c_file(LISP p,FILE *deflt);
34 LISP siod_make_typed_cell(
long type,
void *s);
35 LISP cintern(
const char *name);
36 LISP rintern(
const char *name);
37 LISP strintern(
const char *data);
38 LISP strcons(
long length,
const char *data);
39 LISP cstrcons(
const char *data);
41 void init_subr(
const char *name,
long type, SUBR_FUNC fcn,
const char *doc);
42 void init_subr_0(
const char *name, LISP (*fcn)(
void),
const char *doc);
43 void init_subr_1(
const char *name, LISP (*fcn)(LISP),
const char *doc);
44 void init_subr_2(
const char *name, LISP (*fcn)(LISP,LISP),
const char *doc);
45 void init_subr_3(
const char *name, LISP (*fcn)(LISP,LISP,LISP),
const char *doc);
46 void init_subr_4(
const char *name, LISP (*fcn)(LISP,LISP,LISP,LISP),
const char *doc);
47 void init_lsubr(
const char *name, LISP (*fcn)(LISP),
const char *doc);
48 void init_fsubr(
const char *name, LISP (*fcn)(LISP,LISP),
const char *doc);
49 void init_msubr(
const char *name, LISP (*fcn)(LISP *,LISP *),
const char *doc);
50 void setdoc(LISP name,LISP doc);
52 int siod_register_user_type(
const char *name);
53 void set_gc_hooks(
long type,
61 void set_eval_hooks(
long type,LISP (*fcn)(LISP, LISP *, LISP *));
62 void set_type_hooks(
long type,
long (*c_sxhash)(LISP,
long), LISP (*equal)(LISP,LISP));
63 void set_print_hooks(
long type,
void (*prin1)(LISP, FILE *),
void (*print_string)(LISP,
char *));
64 void set_io_hooks(
long type, LISP (*fast_print)(LISP,LISP), LISP (*fast_read)(
int,LISP));
66 void set_fatal_exit_hook(
void (*fcn)(
void));
68 extern long nointerrupt;
69 extern LISP current_env;
71 extern int audsp_mode;
72 extern int siod_ctrl_c;
73 extern const char *siod_prog_name;
74 extern const char *siod_primary_prompt;
75 extern const char *siod_secondary_prompt;
77 void siod_reset_prompt(
void);
79 LISP siod_get_lval(
const char *name,
const char *message);
80 LISP siod_set_lval(
const char *name,LISP val);
81 LISP siod_assoc_str(
const char *key,LISP alist);
82 LISP siod_member_str(
const char *key,LISP list);
83 LISP siod_regex_member_str(
const EST_String &key,LISP list);
85 LISP siod_member_int(
const int key,LISP list);
86 LISP siod_nth(
int nth,LISP list);
87 LISP siod_last(LISP list);
88 int siod_llength(LISP list);
89 int siod_atomic_list(LISP list);
90 LISP siod_flatten(LISP tree);
91 int siod_eof(LISP item);
93 LISP symbol_boundp(LISP x,LISP env);
95 LISP get_param_lisp(
const char *name, LISP params, LISP defval);
96 int get_param_int(
const char *name, LISP params,
int defval);
97 float get_param_float(
const char *name, LISP params,
float defval);
98 const char *get_param_str(
const char *name, LISP params,
const char *defval);
99 LISP make_param_int(
const char *name,
int val);
100 LISP make_param_float(
const char *name,
float val);
101 LISP make_param_str(
const char *name,
const char *val);
102 LISP make_param_lisp(
const char *name,LISP val);
103 LISP apply_hooks(LISP hook,LISP arg);
104 LISP apply_hooks_right(LISP hook,LISP args);
105 LISP apply(LISP func,LISP args);
113 LISP err(
const char *message, LISP x);
114 LISP err(
const char *message,
const char *s);
115 LISP errswitch(
void);
120 LISP siod_quit(
void);
121 const char *siod_version(
void);
123 void gc_protect(LISP *location);
124 void gc_unprotect(LISP *location);
125 void gc_protect_n(LISP *location,
long n);
126 void gc_protect_sym(LISP *location,
const char *st);
127 LISP user_gc(LISP args);
130 LISP equal(LISP,LISP);
131 LISP eql(LISP x,LISP y);
132 LISP reverse(LISP
obj);
133 LISP append(LISP l1, LISP l2);
134 LISP cons(LISP x,LISP y);
138 LISP numberp(LISP x);
140 LISP assoc(LISP x,LISP alist);
141 LISP setcar(LISP cell, LISP value);
142 LISP setcdr(LISP cell, LISP value);
143 LISP assq(LISP x,LISP alist);
144 LISP delq(LISP elem,LISP l);
145 LISP leval(LISP x,LISP env);
146 LISP symbol_value(LISP x,LISP env);
147 LISP setvar(LISP var,LISP val,LISP env);
148 LISP copy_list(LISP x);
149 LISP quote(LISP item);
150 LISP read_from_lstring(LISP x);
151 LISP symbolexplode(LISP name);
153 LISP fopen_c(
const char *name,
const char *how);
154 LISP fclose_l(LISP p);
155 LISP lprin1f(LISP exp,FILE *f);
156 void pprint(LISP exp);
157 LISP lprint(LISP exp);
158 void pprint_to_fd(FILE *fd,LISP exp);
160 LISP lreadtk(
long j);
161 LISP lreadf(FILE *f);
163 LISP lreadwinsock(
void);
165 void set_read_hooks(
char *all_set,
char *end_set,
167 LISP (*fcn2)(
char *,
long,
int *));
168 LISP vload(
const char *fname,
long cflag);
169 LISP read_from_string(
const char *);
170 long repl_c_string(
char *,
long want_sigint,
long want_init,
long want_print);
171 long repl_from_socket(
int fd);
172 void init_subrs(
void);
173 LISP stringexplode(
const char *str);
174 void fput_st(FILE *f,
const char *st);
175 LISP get_eof_val(
void);
179 void print_hs_1(
void);
180 void print_hs_2(
void);
181 void set_repl_hooks(
void (*puts_f)(
char *),
182 LISP (*read_f)(
void),
183 LISP (*eval_f)(LISP),
184 void (*print_f)(LISP));
186 LISP lerr(LISP message, LISP x);
187 LISP eq(LISP x,LISP y);
188 LISP symcons(
char *pname,LISP vcell);
189 LISP symbol_value_p(LISP x,LISP env,
int *
set);
190 LISP subrcons(
long type,
const char *name, SUBR_FUNC f);
192 void init_storage(
int heap_size=DEFAULT_HEAP_SIZE);
194 LISP gc_status(LISP args);
199 LISP save_forms(LISP fname,LISP forms,LISP how);
201 void init_trace(
void);
202 LISP siod_fdopen_c(
int fd,
const char *name,
char *how);
204 LISP probe_file(LISP fname);
206 LISP fopen_l(LISP name,LISP how);
207 LISP fopen_l(LISP name,
const char *how);
210 #define siod_error() (errjmp_ok ? longjmp(*est_errjmp,1) : exit(-1))
212 #include "siod_est.h"