1
/* Scheme In One Defun, but in C this time.
3
* COPYRIGHT (c) 1988-1992 BY *
4
* PARADIGM ASSOCIATES INCORPORATED, CAMBRIDGE, MASSACHUSETTS. *
5
* See the source file SLIB.C for more information. *
7
Declarations which are private to SLIB.C internals.
8
However, some of these should be moved to siod.h
10
$Id: siodp.h,v 1.1.1.1 1997/11/24 22:03:54 sopwith Exp $
15
extern char *tkbuffer;
16
extern LISP heap, heap_end, heap_org;
19
extern long siod_verbose_level;
20
extern char *siod_lib;
22
struct user_type_hooks
24
LISP (*gc_relocate) (LISP);
25
void (*gc_scan) (LISP);
26
LISP (*gc_mark) (LISP);
27
void (*gc_free) (LISP);
28
void (*prin1) (LISP, struct gen_printio *);
29
LISP (*leval) (LISP, LISP *, LISP *);
30
long (*c_sxhash) (LISP, long);
31
LISP (*fast_print) (LISP, LISP);
32
LISP (*fast_read) (int, LISP);
33
LISP (*equal) (LISP, LISP);
41
struct catch_frame *next;
44
extern struct catch_frame *catch_framep;
50
struct gc_protected *next;
53
#define NEWCELL(_into,_type) \
54
{if (gc_kind_copying == 1) \
55
{if ((_into = heap) >= heap_end) \
62
freelist = CDR(freelist); \
63
++gc_cells_allocated;} \
64
(*_into).gc_mark = 0; \
65
(*_into).type = (short) _type;}
68
extern int ipoll_counter;
69
void full_interrupt_poll (int *counter);
70
#define INTERRUPT_CHECK() if (--ipoll_counter < 0) full_interrupt_poll(&ipoll_counter)
72
#define INTERRUPT_CHECK()
75
extern char *stack_limit_ptr;
77
#define STACK_LIMIT(_ptr,_amt) (((char *)_ptr) - (_amt))
79
#define STACK_CHECK(_ptr) \
80
if (((char *) (_ptr)) < stack_limit_ptr) err_stack((char *) _ptr);
82
void err_stack (char *);
84
#if defined(VMS) && defined(VAX)
85
#define SIG_restargs ,...
90
void handle_sigfpe (int sig SIG_restargs);
91
void handle_sigint (int sig SIG_restargs);
92
void err_ctrl_c (void);
93
double myruntime (void);
94
void fput_st (FILE * f, char *st);
95
void put_st (char *st);
96
void grepl_puts (char *, void (*)(char *));
97
void gc_fatal_error (void);
98
LISP gen_intern (char *name, long copyp);
99
void scan_registers (void);
100
void init_storage_1 (void);
101
struct user_type_hooks *get_user_type_hooks (long type);
102
LISP get_newspace (void);
103
void scan_newspace (LISP newspace);
104
void free_oldspace (LISP space, LISP end);
105
void gc_stop_and_copy (void);
106
void gc_for_newcell (void);
107
void gc_mark_and_sweep (void);
108
void gc_ms_stats_start (void);
109
void gc_ms_stats_end (void);
110
void gc_mark (LISP ptr);
111
void mark_protected_registers (void);
112
void mark_locations (LISP * start, LISP * end);
113
void mark_locations_array (LISP * x, long n);
114
void gc_sweep (void);
115
LISP leval_args (LISP l, LISP env);
116
LISP extend_env (LISP actuals, LISP formals, LISP env);
117
LISP envlookup (LISP var, LISP env);
118
LISP setvar (LISP var, LISP val, LISP env);
119
LISP leval_setq (LISP args, LISP env);
120
LISP syntax_define (LISP args);
121
LISP leval_define (LISP args, LISP env);
122
LISP leval_if (LISP * pform, LISP * penv);
123
LISP leval_lambda (LISP args, LISP env);
124
LISP leval_progn (LISP * pform, LISP * penv);
125
LISP leval_or (LISP * pform, LISP * penv);
126
LISP leval_and (LISP * pform, LISP * penv);
127
LISP leval_catch_1 (LISP forms, LISP env);
128
LISP leval_catch (LISP args, LISP env);
129
LISP lthrow (LISP tag, LISP value);
130
LISP leval_let (LISP * pform, LISP * penv);
131
LISP reverse (LISP l);
132
LISP let_macro (LISP form);
133
LISP leval_quote (LISP args, LISP env);
134
LISP leval_tenv (LISP args, LISP env);
135
int flush_ws (struct gen_readio *f, char *eoferr);
136
int f_getc (FILE * f);
137
void f_ungetc (int c, FILE * f);
138
LISP lreadr (struct gen_readio *f);
139
LISP lreadparen (struct gen_readio *f);
140
LISP arglchk (LISP x);
141
void init_storage_a1 (long type);
142
void init_storage_a (void);
143
LISP array_gc_relocate (LISP ptr);
144
void array_gc_scan (LISP ptr);
145
LISP array_gc_mark (LISP ptr);
146
void array_gc_free (LISP ptr);
147
void array_prin1 (LISP ptr, struct gen_printio *f);
148
long array_sxhaxh (LISP, long);
149
LISP array_fast_print (LISP, LISP);
150
LISP array_fast_read (int, LISP);
151
LISP array_equal (LISP, LISP);
152
long array_sxhash (LISP, long);
154
int rfs_getc (unsigned char **p);
155
void rfs_ungetc (unsigned char c, unsigned char **p);
156
void err1_aset1 (LISP i);
157
void err2_aset1 (LISP v);
158
LISP lreadstring (struct gen_readio *f);
159
LISP lreadsharp (struct gen_readio *f);
161
void file_gc_free (LISP ptr);
162
void file_prin1 (LISP ptr, struct gen_printio *f);
163
LISP fopen_c (char *name, char *how);
164
LISP fopen_cg (FILE * (*)(const char *, const char *), char *, char *);
165
LISP fopen_l (LISP name, LISP how);
166
LISP fclose_l (LISP p);
167
LISP lftell (LISP file);
168
LISP lfseek (LISP file, LISP offset, LISP direction);
169
LISP lfread (LISP size, LISP file);
170
LISP lfwrite (LISP string, LISP file);
173
LISP leval_while (LISP args, LISP env);
175
void init_subrs_a (void);
176
void init_subrs_1 (void);
178
long href_index (LISP table, LISP key);
180
void put_long (long, FILE *);
181
long get_long (FILE *);
183
long fast_print_table (LISP obj, LISP table);
185
LISP stack_limit (LISP, LISP);
192
LISP closure_code (LISP exp);
193
LISP closure_env (LISP exp);
194
LISP lwhile (LISP form, LISP env);
195
long nlength (LISP obj);
196
LISP llength (LISP obj);
197
void gc_kind_check (void);
198
LISP allocate_aheap (void);
199
long looks_pointerp (LISP);
200
long nactive_heaps (void);
201
long freelist_length (void);
203
LISP err_closure_code (LISP tmp);