File: siodp.h

package info (click to toggle)
gimp 2.2.13-1etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 94,832 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (203 lines) | stat: -rw-r--r-- 5,808 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/* Scheme In One Defun, but in C this time.

 *                        COPYRIGHT (c) 1988-1992 BY                        *
 *        PARADIGM ASSOCIATES INCORPORATED, CAMBRIDGE, MASSACHUSETTS.       *
 *        See the source file SLIB.C for more information.                  *

 Declarations which are private to SLIB.C internals.
 However, some of these should be moved to siod.h

 $Id: siodp.h,v 1.1.1.1 1997/11/24 22:03:54 sopwith Exp $

 */


extern char *tkbuffer;
extern LISP heap, heap_end, heap_org;
extern LISP sym_t;

extern long siod_verbose_level;
extern char *siod_lib;

struct user_type_hooks
  {
    LISP (*gc_relocate) (LISP);
    void (*gc_scan) (LISP);
      LISP (*gc_mark) (LISP);
    void (*gc_free) (LISP);
    void (*prin1) (LISP, struct gen_printio *);
      LISP (*leval) (LISP, LISP *, LISP *);
    long (*c_sxhash) (LISP, long);
      LISP (*fast_print) (LISP, LISP);
      LISP (*fast_read) (int, LISP);
      LISP (*equal) (LISP, LISP);
  };

struct catch_frame
  {
    LISP tag;
    LISP retval;
    jmp_buf cframe;
    struct catch_frame *next;
  };

extern struct catch_frame *catch_framep;

struct gc_protected
  {
    LISP *location;
    long length;
    struct gc_protected *next;
  };

#define NEWCELL(_into,_type)          \
{if (gc_kind_copying == 1)            \
   {if ((_into = heap) >= heap_end)   \
      gc_fatal_error();               \
    heap = _into+1;}                  \
 else                                 \
   {if NULLP(freelist)                \
      gc_for_newcell();               \
    _into = freelist;                 \
    freelist = CDR(freelist);         \
    ++gc_cells_allocated;}            \
 (*_into).gc_mark = 0;                \
 (*_into).type = (short) _type;}

#ifdef THINK_C
extern int ipoll_counter;
void full_interrupt_poll (int *counter);
#define INTERRUPT_CHECK() if (--ipoll_counter < 0) full_interrupt_poll(&ipoll_counter)
#else
#define INTERRUPT_CHECK()
#endif

extern char *stack_limit_ptr;

#define STACK_LIMIT(_ptr,_amt) (((char *)_ptr) - (_amt))

#define STACK_CHECK(_ptr) \
  if (((char *) (_ptr)) < stack_limit_ptr) err_stack((char *) _ptr);

void err_stack (char *);

#if defined(VMS) && defined(VAX)
#define SIG_restargs ,...
#else
#define SIG_restargs
#endif

void handle_sigfpe (int sig SIG_restargs);
void handle_sigint (int sig SIG_restargs);
void err_ctrl_c (void);
double myruntime (void);
void fput_st (FILE * f, char *st);
void put_st (char *st);
void grepl_puts (char *, void (*)(char *));
void gc_fatal_error (void);
LISP gen_intern (char *name, long copyp);
void scan_registers (void);
void init_storage_1 (void);
struct user_type_hooks *get_user_type_hooks (long type);
LISP get_newspace (void);
void scan_newspace (LISP newspace);
void free_oldspace (LISP space, LISP end);
void gc_stop_and_copy (void);
void gc_for_newcell (void);
void gc_mark_and_sweep (void);
void gc_ms_stats_start (void);
void gc_ms_stats_end (void);
void gc_mark (LISP ptr);
void mark_protected_registers (void);
void mark_locations (LISP * start, LISP * end);
void mark_locations_array (LISP * x, long n);
void gc_sweep (void);
LISP leval_args (LISP l, LISP env);
LISP extend_env (LISP actuals, LISP formals, LISP env);
LISP envlookup (LISP var, LISP env);
LISP setvar (LISP var, LISP val, LISP env);
LISP leval_setq (LISP args, LISP env);
LISP syntax_define (LISP args);
LISP leval_define (LISP args, LISP env);
LISP leval_if (LISP * pform, LISP * penv);
LISP leval_lambda (LISP args, LISP env);
LISP leval_progn (LISP * pform, LISP * penv);
LISP leval_or (LISP * pform, LISP * penv);
LISP leval_and (LISP * pform, LISP * penv);
LISP leval_catch_1 (LISP forms, LISP env);
LISP leval_catch (LISP args, LISP env);
LISP lthrow (LISP tag, LISP value);
LISP leval_let (LISP * pform, LISP * penv);
LISP reverse (LISP l);
LISP let_macro (LISP form);
LISP leval_quote (LISP args, LISP env);
LISP leval_tenv (LISP args, LISP env);
int flush_ws (struct gen_readio *f, char *eoferr);
int f_getc (FILE * f);
void f_ungetc (int c, FILE * f);
LISP lreadr (struct gen_readio *f);
LISP lreadparen (struct gen_readio *f);
LISP arglchk (LISP x);
void init_storage_a1 (long type);
void init_storage_a (void);
LISP array_gc_relocate (LISP ptr);
void array_gc_scan (LISP ptr);
LISP array_gc_mark (LISP ptr);
void array_gc_free (LISP ptr);
void array_prin1 (LISP ptr, struct gen_printio *f);
long array_sxhaxh (LISP, long);
LISP array_fast_print (LISP, LISP);
LISP array_fast_read (int, LISP);
LISP array_equal (LISP, LISP);
long array_sxhash (LISP, long);

int rfs_getc (unsigned char **p);
void rfs_ungetc (unsigned char c, unsigned char **p);
void err1_aset1 (LISP i);
void err2_aset1 (LISP v);
LISP lreadstring (struct gen_readio *f);
LISP lreadsharp (struct gen_readio *f);

void file_gc_free (LISP ptr);
void file_prin1 (LISP ptr, struct gen_printio *f);
LISP fopen_c (char *name, char *how);
LISP fopen_cg (FILE * (*)(const char *, const char *), char *, char *);
LISP fopen_l (LISP name, LISP how);
LISP fclose_l (LISP p);
LISP lftell (LISP file);
LISP lfseek (LISP file, LISP offset, LISP direction);
LISP lfread (LISP size, LISP file);
LISP lfwrite (LISP string, LISP file);


LISP leval_while (LISP args, LISP env);

void init_subrs_a (void);
void init_subrs_1 (void);

long href_index (LISP table, LISP key);

void put_long (long, FILE *);
long get_long (FILE *);

long fast_print_table (LISP obj, LISP table);

LISP stack_limit (LISP, LISP);


void err0 (void);
void pr (LISP);
void prp (LISP *);

LISP closure_code (LISP exp);
LISP closure_env (LISP exp);
LISP lwhile (LISP form, LISP env);
long nlength (LISP obj);
LISP llength (LISP obj);
void gc_kind_check (void);
LISP allocate_aheap (void);
long looks_pointerp (LISP);
long nactive_heaps (void);
long freelist_length (void);
LISP gc_info (LISP);
LISP err_closure_code (LISP tmp);