28 |
#include <unistd.h> |
#include <unistd.h> |
29 |
#include <string.h> |
#include <string.h> |
30 |
|
|
31 |
static void |
static void init_main(void); |
32 |
init_main(void); |
static void initlisp(void); |
33 |
|
static int multiply_stacks(int); |
34 |
static void |
void install_segmentation_catcher(void); |
|
initlisp(void); |
|
|
|
|
|
static int |
|
|
multiply_stacks(int); |
|
35 |
|
|
36 |
#define IN_MAIN |
#define IN_MAIN |
37 |
|
|
38 |
#ifdef KCLOVM |
#ifdef KCLOVM |
39 |
#include <ovm/ovm.h> |
# include <ovm/ovm.h> |
40 |
void change_contexts(); |
void change_contexts(); |
41 |
int ovm_process_created; |
int ovm_process_created; |
42 |
void initialize_process(); |
void initialize_process(); |
43 |
#endif |
#endif |
44 |
|
|
45 |
#include "include.h" |
#include "include.h" |
|
#ifdef UNIX |
|
|
#include <signal.h> |
|
|
|
|
46 |
|
|
47 |
|
#ifdef UNIX |
48 |
|
# include <signal.h> |
49 |
#endif |
#endif |
|
#include "page.h" |
|
50 |
|
|
51 |
bool saving_system ; |
#include "page.h" |
52 |
|
|
53 |
#ifdef BSD |
#ifdef BSD |
54 |
#include <sys/time.h> |
# include <sys/time.h> |
55 |
#ifndef SGI |
# ifndef SGI |
56 |
#include <sys/resource.h> |
# include <sys/resource.h> |
57 |
#endif |
# endif |
|
#endif |
|
|
|
|
|
#ifdef AOSVS |
|
|
|
|
58 |
#endif |
#endif |
59 |
|
|
60 |
#ifdef _WIN32 |
#ifdef _WIN32 |
61 |
#include <fcntl.h> |
# include <fcntl.h> |
62 |
#endif |
#endif |
63 |
|
|
64 |
#define LISP_IMPLEMENTATION_VERSION "April 1994" |
#define LISP_IMPLEMENTATION_VERSION "April 1994" |
65 |
|
|
|
char *system_directory; |
|
|
|
|
|
int page_multiple=1; |
|
|
|
|
|
|
|
66 |
#define EXTRA_BUFSIZE 8 |
#define EXTRA_BUFSIZE 8 |
67 |
char stdin_buf[BUFSIZ + EXTRA_BUFSIZE]; |
char stdin_buf[BUFSIZ + EXTRA_BUFSIZE]; |
68 |
char stdout_buf[BUFSIZ + EXTRA_BUFSIZE]; |
char stdout_buf[BUFSIZ + EXTRA_BUFSIZE]; |
69 |
|
|
70 |
int debug; /* debug switch */ |
char *system_directory = NULL; |
71 |
int initflag = FALSE; /* initialized flag */ |
int page_multiple = 1; |
|
|
|
|
long real_maxpage; |
|
|
object sSAlisp_maxpagesA; |
|
|
|
|
|
object siClisp_pagesize; |
|
72 |
|
|
73 |
object sStop_level; |
int debug = FALSE; /* debug switch */ |
74 |
|
int initflag = FALSE; /* initialized flag */ |
75 |
|
|
76 |
|
int stack_multiple = 1; |
77 |
object sSAmultiply_stacksA; |
int cssize = 0; |
|
int stack_multiple=1; |
|
|
static object stack_space; |
|
78 |
|
|
79 |
#ifdef _WIN32 |
#ifdef _WIN32 |
80 |
unsigned int _dbegin = 0x10100000; |
unsigned int _dbegin = 0x10100000; |
81 |
|
# ifndef AV |
82 |
unsigned int _stacktop, _stackbottom; |
unsigned int _stacktop, _stackbottom; |
83 |
|
# endif |
84 |
#endif |
#endif |
85 |
|
|
86 |
int cssize; |
extern bool saving_system; |
87 |
|
extern long real_maxpage; |
88 |
|
extern int sgc_enabled; |
89 |
|
|
90 |
int sgc_enabled; |
|
91 |
void install_segmentation_catcher(void); |
object sSAlisp_maxpagesA; |
92 |
|
object siClisp_pagesize; |
93 |
|
object sStop_level; |
94 |
|
object sSAmultiply_stacksA; |
95 |
|
|
96 |
|
static object stack_space; |
97 |
|
|
98 |
#ifndef SIG_STACK_SIZE |
#ifndef SIG_STACK_SIZE |
99 |
#define SIG_STACK_SIZE 1000 |
# define SIG_STACK_SIZE 1000 |
100 |
#endif |
#endif |
101 |
|
|
102 |
#ifndef SETUP_SIG_STACK |
#ifndef SETUP_SIG_STACK |
103 |
#if defined(HAVE_SIGACTION) || defined(HAVE_SIGVEC) |
# if defined(HAVE_SIGACTION) || defined(HAVE_SIGVEC) |
104 |
struct sigstack estack; |
struct sigstack estack; |
105 |
#endif |
# endif |
106 |
#endif |
#endif |
107 |
|
|
108 |
int |
int |
109 |
main(int argc, char **argv, char **envp) { |
main(int argc, char **argv, char **envp) { |
110 |
#ifdef BSD |
#if defined ( BSD ) && defined ( RLIMIT_STACK ) |
111 |
#ifdef RLIMIT_STACK |
struct rlimit rl; |
|
struct rlimit rl; |
|
|
#endif |
|
112 |
#endif |
#endif |
113 |
|
|
114 |
#ifdef RECREATE_HEAP |
#ifdef RECREATE_HEAP |
115 |
RECREATE_HEAP |
RECREATE_HEAP |
116 |
#endif |
#endif |
117 |
|
|
118 |
#ifdef _WIN32 |
#if defined ( _WIN32 ) && !defined ( AV ) |
119 |
{ |
{ |
120 |
unsigned int dummy; |
unsigned int dummy; |
121 |
|
|
122 |
_stackbottom = (unsigned int ) &dummy; |
_stackbottom = (unsigned int ) &argc; |
123 |
_stacktop = _stackbottom - 0x10000; // ??? |
_stacktop = _stackbottom - CSSIZE; // ??? |
124 |
|
|
125 |
} |
} |
126 |
#endif |
#endif |
127 |
setbuf(stdin, stdin_buf); |
setbuf(stdin, stdin_buf); |
128 |
setbuf(stdout, stdout_buf); |
setbuf(stdout, stdout_buf); |
129 |
#ifdef _WIN32 |
#ifdef _WIN32 |
130 |
_fmode = _O_BINARY; |
_fmode = _O_BINARY; |
131 |
#endif |
#endif |
132 |
ARGC = argc; |
ARGC = argc; |
133 |
ARGV = argv; |
ARGV = argv; |
134 |
#ifdef UNIX |
#ifdef UNIX |
135 |
ENVP = envp; |
ENVP = envp; |
136 |
#endif |
kcl_self = argv[0]; |
|
|
|
|
#ifdef UNIX |
|
|
/* |
|
|
if (argv[0][0] != '/') |
|
|
error("can't get the program name"); |
|
|
*/ |
|
|
kcl_self = argv[0]; |
|
137 |
#ifdef FIX_FILENAME |
#ifdef FIX_FILENAME |
138 |
{ int n = strlen(kcl_self); |
{ |
139 |
FIX_FILENAME(Cnil,kcl_self); |
int n = strlen ( kcl_self ); |
140 |
if (strlen(kcl_self)> n) error("name grew"); |
FIX_FILENAME ( Cnil, kcl_self ); |
141 |
} |
if ( strlen ( kcl_self ) > n ) { |
142 |
|
error ( "name grew" ); |
143 |
|
} |
144 |
|
} |
145 |
#endif |
#endif |
146 |
if (!initflag) { |
if ( !initflag ) { |
147 |
|
/* An uninitialised system eg raw_gcl */ |
148 |
system_directory= (char *) malloc(strlen(argv[1])+3); |
if ( argc < 2 ) { |
149 |
|
/* Provide the current directory as a default */ |
150 |
strcpy(system_directory, argv[1]); |
system_directory = (char *) malloc ( strlen ( "./" ) + 3 ); |
151 |
if (system_directory[0] != '/') |
strcpy ( system_directory, "./" ); |
152 |
strcpy(system_directory, "./"); |
} else { |
153 |
else { |
int lastchar = strlen ( argv[1] ) - 1; |
154 |
int j; |
/* Squirrel away the system directory provided as argv[1] */ |
155 |
|
system_directory = (char *) malloc ( strlen ( argv[1] ) + 3 ); |
156 |
for (j = strlen(system_directory); |
strcpy ( system_directory, argv[1] ); |
157 |
system_directory[j-1] != '/'; --j) |
if ( system_directory[0] != '/' ) { |
158 |
; |
strcpy ( system_directory, "./" ); |
159 |
system_directory[j] = '\0'; |
} else { |
160 |
} |
int j; |
161 |
} |
for ( j = strlen ( system_directory ); system_directory[j-1] != '/'; --j ); |
162 |
|
system_directory[j] = '\0'; |
163 |
#endif |
} |
164 |
#ifdef AOSVS |
|
165 |
|
if ( argv[1][lastchar] != '/') { |
166 |
|
error ( "Can't get the system directory." ); |
167 |
|
} |
168 |
|
strcpy ( system_directory, argv[1] ); |
169 |
|
} |
170 |
|
} |
171 |
|
#else /* UNIX */ |
172 |
|
if (!initflag && argc > 1) { |
173 |
|
error("can't get the system directory"); |
174 |
|
strcpy(system_directory, argv[1]); |
175 |
|
} |
176 |
|
#endif /* UNIX */ |
177 |
#endif |
GBC_enable = FALSE; |
|
|
|
|
if (!initflag && argc > 1) { |
|
|
#ifdef UNIX |
|
|
if (argv[1][strlen(argv[1])-1] != '/') |
|
|
#endif |
|
|
#ifdef AOSVS |
|
178 |
|
|
179 |
#endif |
/* if stack_space not zero we have grown the stack space */ |
180 |
error("can't get the system directory"); |
if ( stack_space == 0 ) { |
181 |
strcpy(system_directory, argv[1]); |
vs_org = value_stack; |
182 |
} |
vs_limit = &vs_org[VSSIZE]; |
183 |
|
frs_org = frame_stack; |
184 |
GBC_enable = FALSE; |
frs_limit = &frs_org[FRSSIZE]; |
185 |
|
bds_org = bind_stack; |
186 |
/* if stack_space not zero we have grown the stack space */ |
bds_limit = &bds_org[BDSSIZE]; |
|
if (stack_space == 0) |
|
|
{ |
|
|
vs_org = value_stack; |
|
|
vs_limit = &vs_org[VSSIZE]; |
|
|
frs_org = frame_stack; |
|
|
frs_limit = &frs_org[FRSSIZE]; |
|
|
bds_org = bind_stack; |
|
|
bds_limit = &bds_org[BDSSIZE]; |
|
187 |
#ifdef KCLOVM |
#ifdef KCLOVM |
188 |
bds_save_org = save_bind_stack; |
bds_save_org = save_bind_stack; |
189 |
bds_save_top = bds_save_org - 1; |
bds_save_top = bds_save_org - 1; |
190 |
bds_save_limit = &bds_save_org[BDSSIZE]; |
bds_save_limit = &bds_save_org[BDSSIZE]; |
191 |
#endif |
#endif |
192 |
ihs_org = ihs_stack; |
ihs_org = ihs_stack; |
193 |
ihs_limit = &ihs_org[IHSSIZE];} |
ihs_limit = &ihs_org[IHSSIZE]; |
194 |
|
} |
|
vs_top = vs_base = vs_org; |
|
|
clear_stack(vs_top,vs_top+200); |
|
|
ihs_top = ihs_org-1; |
|
|
bds_top = bds_org-1; |
|
|
frs_top = frs_org-1; |
|
|
cs_org = &argc; |
|
195 |
|
|
196 |
cssize = CSSIZE; |
vs_top = vs_base = vs_org; |
197 |
install_segmentation_catcher(); |
clear_stack ( vs_top, vs_top+200 ); |
198 |
|
ihs_top = ihs_org-1; |
199 |
|
bds_top = bds_org-1; |
200 |
|
frs_top = frs_org-1; |
201 |
|
cs_org = &argc; |
202 |
|
cssize = CSSIZE; |
203 |
|
install_segmentation_catcher(); |
204 |
|
|
205 |
#ifdef BSD |
#ifdef BSD |
206 |
#ifndef MAX_STACK_SIZE |
# ifndef MAX_STACK_SIZE |
207 |
#define MAX_STACK_SIZE (1<<23) /* 8Mb */ |
# define MAX_STACK_SIZE (1<<23) /* 8Mb */ |
208 |
#endif |
# endif |
209 |
#ifdef RLIMIT_STACK |
# ifdef RLIMIT_STACK |
210 |
getrlimit(RLIMIT_STACK, &rl); |
getrlimit(RLIMIT_STACK, &rl); |
211 |
if (rl.rlim_cur == RLIM_INFINITY || |
if (rl.rlim_cur == RLIM_INFINITY || |
212 |
rl.rlim_cur > MAX_STACK_SIZE) |
rl.rlim_cur > MAX_STACK_SIZE) |
213 |
rl.rlim_cur=MAX_STACK_SIZE; |
rl.rlim_cur=MAX_STACK_SIZE; |
214 |
cssize = rl.rlim_cur/4 - 4*CSGETA; |
cssize = rl.rlim_cur/4 - 4*CSGETA; |
215 |
#endif |
# endif |
216 |
#endif |
#endif /* BSD */ |
217 |
|
|
218 |
#ifdef AV |
#ifdef AV |
219 |
cs_limit = cs_org - cssize; |
cs_limit = cs_org - cssize; |
220 |
#endif |
#endif |
|
#ifdef MV |
|
221 |
|
|
222 |
#endif |
set_maxpage(); |
223 |
|
|
|
set_maxpage(); |
|
224 |
#ifdef SETUP_SIG_STACK |
#ifdef SETUP_SIG_STACK |
225 |
SETUP_SIG_STACK |
SETUP_SIG_STACK |
226 |
#else |
#else |
227 |
#if defined(HAVE_SIGACTION) || defined(HAVE_SIGVEC) |
|
228 |
{ |
# if defined(HAVE_SIGACTION) || defined(HAVE_SIGVEC) |
229 |
/* make sure the stack is 8 byte aligned */ |
{ |
230 |
#ifdef SETJMP_ONE_DIRECTION |
/* make sure the stack is 8 byte aligned */ |
231 |
static |
# ifdef SETJMP_ONE_DIRECTION |
232 |
#endif |
static |
233 |
|
# endif /* SETUP_SIG_STACK */ |
234 |
double estack_buf[SIG_STACK_SIZE]; |
double estack_buf[SIG_STACK_SIZE]; |
235 |
|
|
236 |
bzero(estack_buf,sizeof(estack_buf)); |
bzero(estack_buf,sizeof(estack_buf)); |
237 |
estack.ss_sp = (char *) &estack_buf[SIG_STACK_SIZE-1]; |
estack.ss_sp = (char *) &estack_buf[SIG_STACK_SIZE-1]; |
238 |
estack.ss_onstack=0; |
estack.ss_onstack=0; |
239 |
sigstack(&estack,0); |
sigstack(&estack,0); |
240 |
} |
} |
241 |
#endif |
# endif /* defined(HAVE_SIGACTION) || defined(HAVE_SIGVEC) */ |
|
#endif |
|
|
|
|
242 |
|
|
243 |
if (initflag) { |
#endif /* SETUP_SIG_STACK */ |
244 |
if (saving_system) { |
|
245 |
saving_system = FALSE; |
if (initflag) { |
246 |
terminal_io->sm.sm_object0->sm.sm_fp = stdin; |
if (saving_system) { |
247 |
terminal_io->sm.sm_object1->sm.sm_fp = stdout; |
saving_system = FALSE; |
248 |
init_big1(); |
terminal_io->sm.sm_object0->sm.sm_fp = stdin; |
249 |
|
terminal_io->sm.sm_object1->sm.sm_fp = stdout; |
250 |
|
init_big1(); |
251 |
#ifdef INIT_CORE_END |
#ifdef INIT_CORE_END |
252 |
INIT_CORE_END |
INIT_CORE_END |
253 |
#endif |
#endif |
254 |
alloc_page(-(holepage + nrbpage)); |
alloc_page(-(holepage + nrbpage)); |
255 |
} |
} |
256 |
|
|
257 |
initflag = FALSE; |
initflag = FALSE; |
258 |
GBC_enable = TRUE; |
GBC_enable = TRUE; |
259 |
vs_base = vs_top; |
vs_base = vs_top; |
260 |
ihs_push(Cnil); |
ihs_push(Cnil); |
261 |
lex_new(); |
lex_new(); |
262 |
vs_base = vs_top; |
vs_base = vs_top; |
263 |
|
|
264 |
interrupt_enable = TRUE; |
interrupt_enable = TRUE; |
265 |
install_default_signals(); |
install_default_signals(); |
266 |
|
|
267 |
sSAlisp_maxpagesA->s.s_dbind = make_fixnum(real_maxpage); |
sSAlisp_maxpagesA->s.s_dbind = make_fixnum(real_maxpage); |
268 |
initflag = TRUE; |
initflag = TRUE; |
269 |
#ifdef KCLOVM |
#ifdef KCLOVM |
270 |
ovm_user_context_change = change_contexts; |
ovm_user_context_change = change_contexts; |
271 |
ovm_user_context_initialize = initialize_process; |
ovm_user_context_initialize = initialize_process; |
272 |
|
|
273 |
v_init_processes(); |
v_init_processes(); |
274 |
ovm_process_created = 1; |
ovm_process_created = 1; |
275 |
#endif |
#endif |
276 |
#ifdef HAVE_READLINE |
#ifdef HAVE_READLINE |
277 |
init_readline_function(); |
init_readline_function(); |
278 |
#endif |
#endif |
279 |
again: |
again: |
280 |
super_funcall(sStop_level); |
super_funcall(sStop_level); |
281 |
if (type_of(sSAmultiply_stacksA->s.s_dbind)==t_fixnum) { |
if (type_of(sSAmultiply_stacksA->s.s_dbind)==t_fixnum) { |
282 |
multiply_stacks(fix(sSAmultiply_stacksA->s.s_dbind)); |
multiply_stacks(fix(sSAmultiply_stacksA->s.s_dbind)); |
283 |
goto again; |
goto again; |
284 |
} |
} |
285 |
|
|
286 |
#ifdef USE_DLOPEN |
#ifdef USE_DLOPEN |
287 |
unlink_loaded_files(); |
unlink_loaded_files(); |
288 |
#endif |
#endif |
289 |
|
|
290 |
exit(0); |
exit(0); |
291 |
} |
} |
292 |
|
|
293 |
printf("GCL (GNU Common Lisp) %s %d pages\n", |
printf("GCL (GNU Common Lisp) %s %d pages\n", |
294 |
LISP_IMPLEMENTATION_VERSION, |
LISP_IMPLEMENTATION_VERSION, |
295 |
MAXPAGE); |
MAXPAGE); |
296 |
fflush(stdout); |
fflush(stdout); |
297 |
|
|
298 |
initlisp(); |
initlisp(); |
299 |
|
|
300 |
vs_base = vs_top; |
vs_base = vs_top; |
301 |
ihs_push(Cnil); |
ihs_push(Cnil); |
302 |
lex_new(); |
lex_new(); |
303 |
|
|
304 |
GBC_enable = TRUE; |
GBC_enable = TRUE; |
305 |
|
|
306 |
CMPtemp = CMPtemp1 = CMPtemp2 = CMPtemp3 = OBJNULL; |
CMPtemp = CMPtemp1 = CMPtemp2 = CMPtemp3 = OBJNULL; |
307 |
|
|
308 |
init_init(); |
init_init(); |
309 |
|
|
310 |
sLApackageA->s.s_dbind = user_package; |
sLApackageA->s.s_dbind = user_package; |
311 |
|
|
312 |
lex_new(); |
lex_new(); |
313 |
vs_base = vs_top; |
vs_base = vs_top; |
314 |
initflag = TRUE; |
initflag = TRUE; |
315 |
|
|
316 |
interrupt_enable = TRUE; |
interrupt_enable = TRUE; |
317 |
|
|
318 |
super_funcall(sStop_level); |
super_funcall(sStop_level); |
319 |
|
|
320 |
return 0; |
return 0; |
321 |
|
|
322 |
} |
} |
323 |
|
|
325 |
void install_segmentation_catcher(void) |
void install_segmentation_catcher(void) |
326 |
{ |
{ |
327 |
#ifdef INSTALL_SEGMENTATION_CATCHER |
#ifdef INSTALL_SEGMENTATION_CATCHER |
328 |
INSTALL_SEGMENTATION_CATCHER; |
INSTALL_SEGMENTATION_CATCHER; |
329 |
#else |
#else |
330 |
#ifdef SIGSEGV |
# ifdef SIGSEGV |
331 |
(void) gcl_signal(SIGSEGV,segmentation_catcher); |
(void) gcl_signal(SIGSEGV,segmentation_catcher); |
332 |
#endif |
# endif |
333 |
#endif |
#endif |
334 |
} |
} |
335 |
|
|
341 |
catch_fatal = -1; |
catch_fatal = -1; |
342 |
if ( sgc_enabled ) { |
if ( sgc_enabled ) { |
343 |
sgc_quit(); |
sgc_quit(); |
344 |
} |
} else { |
|
if ( sgc_enabled == 0 ) { |
|
345 |
install_segmentation_catcher(); |
install_segmentation_catcher(); |
346 |
} |
} |
347 |
FEerror("Caught fatal error [memory may be damaged]",0); |
FEerror("Caught fatal error [memory may be damaged]",0); |
348 |
} |
} |
349 |
printf("\nUnrecoverable error: %s.\n", s); |
printf ( "\nUnrecoverable error: %s.\n", s ); |
350 |
fflush(stdout); |
fflush(stdout); |
351 |
#ifdef UNIX |
#ifdef UNIX |
352 |
abort(); |
abort(); |
355 |
|
|
356 |
static void |
static void |
357 |
initlisp(void) { |
initlisp(void) { |
358 |
|
int j; |
|
int j; |
|
|
|
|
359 |
if (NULL_OR_ON_C_STACK(&j) == 0 |
if (NULL_OR_ON_C_STACK(&j) == 0 |
360 |
|| NULL_OR_ON_C_STACK(Cnil) != 0 |
|| NULL_OR_ON_C_STACK(Cnil) != 0 |
361 |
|| (((unsigned long )core_end) !=0 |
|| (((unsigned long )core_end) !=0 |
363 |
{ /* check person has correct definition of above */ |
{ /* check person has correct definition of above */ |
364 |
error("NULL_OR_ON_C_STACK macro invalid"); |
error("NULL_OR_ON_C_STACK macro invalid"); |
365 |
} |
} |
366 |
init_alloc(); |
|
367 |
|
init_alloc(); |
368 |
|
|
369 |
Dotnil_body.t = (short)t_symbol; |
Dotnil_body.t = (short)t_symbol; |
370 |
Dotnil_body.s_dbind = Dotnil; |
Dotnil_body.s_dbind = Dotnil; |
442 |
init_GBC(); |
init_GBC(); |
443 |
|
|
444 |
#if defined ( UNIX ) || defined ( __MINGW32__ ) |
#if defined ( UNIX ) || defined ( __MINGW32__ ) |
445 |
#ifndef DGUX |
# ifndef DGUX |
446 |
init_unixfasl(); |
init_unixfasl(); |
447 |
init_unixsys(); |
init_unixsys(); |
448 |
init_unixsave(); |
init_unixsave(); |
449 |
#else |
# else |
450 |
|
|
451 |
|
|
452 |
|
|
453 |
#endif |
# endif |
454 |
#endif |
#endif /* defined ( UNIX ) || defined ( __MINGW32__ ) */ |
455 |
|
|
456 |
init_alloc_function(); |
init_alloc_function(); |
457 |
init_array_function(); |
init_array_function(); |
557 |
error("Segmentation violation."); |
error("Segmentation violation."); |
558 |
} |
} |
559 |
|
|
|
/* static void */ |
|
|
/* cs_overflow(void) { */ |
|
|
/* #ifdef AV */ |
|
|
/* if (cs_limit < cs_org - cssize) */ |
|
|
/* error("control stack overflow"); */ |
|
|
/* cs_limit -= CSGETA; */ |
|
|
/* #endif */ |
|
|
/* #ifdef MV */ |
|
|
|
|
|
|
|
|
|
|
|
/* #endif */ |
|
|
/* FEerror("Control stack overflow.", 0); */ |
|
|
/* } */ |
|
|
|
|
|
/* static void */ |
|
|
/* end_of_file(void) { */ |
|
|
/* error("end of file"); */ |
|
|
/* } */ |
|
|
|
|
560 |
DEFUNO_NEW("BYE",object,fLbye,LISP |
DEFUNO_NEW("BYE",object,fLbye,LISP |
561 |
,0,1,NONE,OI,OO,OO,OO,void,Lby,(fixnum exitc),"") |
,0,1,NONE,OI,OO,OO,OO,void,Lby,(fixnum exitc),"") |
562 |
{ int n=VFUN_NARGS; |
{ int n=VFUN_NARGS; |
564 |
if (n>=1) exit_code=exitc;else exit_code=0; |
if (n>=1) exit_code=exitc;else exit_code=0; |
565 |
|
|
566 |
#ifdef UNIX |
#ifdef UNIX |
|
/* printf("Bye.\n"); */ |
|
567 |
exit(exit_code); |
exit(exit_code); |
568 |
#else |
#else |
569 |
RETURN(1,int,exit_code, 0); |
RETURN(1,int,exit_code, 0); |
580 |
{ return fLbye(exitc); } |
{ return fLbye(exitc); } |
581 |
|
|
582 |
|
|
|
/* c_trace(void) */ |
|
|
/* { */ |
|
|
/* #ifdef AOSVS */ |
|
|
|
|
|
/* #endif */ |
|
|
/* } */ |
|
|
|
|
583 |
static void |
static void |
584 |
siLargc(void) { |
siLargc(void) { |
585 |
check_arg(0); |
check_arg(0); |
619 |
{vs_base[0] = make_simple_string(value); |
{vs_base[0] = make_simple_string(value); |
620 |
#ifdef FREE_GETENV_RESULT |
#ifdef FREE_GETENV_RESULT |
621 |
free(value); |
free(value); |
|
|
|
622 |
#endif |
#endif |
623 |
} |
} |
624 |
else |
else |
625 |
vs_base[0] = Cnil; |
vs_base[0] = Cnil; |
626 |
|
|
627 |
} |
} |
628 |
#endif |
#endif /* UNIX */ |
629 |
|
|
630 |
object *vs_marker; |
object *vs_marker; |
631 |
|
|
866 |
make_cons(make_ordinary("KCL"), Cnil)); |
make_cons(make_ordinary("KCL"), Cnil)); |
867 |
ADD_FEATURE("AKCL"); |
ADD_FEATURE("AKCL"); |
868 |
ADD_FEATURE("GCL"); |
ADD_FEATURE("GCL"); |
869 |
|
|
870 |
#ifdef BROKEN_O4_OPT |
#ifdef BROKEN_O4_OPT |
871 |
ADD_FEATURE("BROKEN_O4_OPT"); |
ADD_FEATURE("BROKEN_O4_OPT"); |
872 |
#endif |
#endif |
873 |
|
|
874 |
#ifdef GMP |
#ifdef GMP |
875 |
ADD_FEATURE("GMP"); |
ADD_FEATURE("GMP"); |
876 |
#endif |
#endif |
877 |
|
|
878 |
#ifdef UNIX |
#if defined ( UNIX ) && !defined ( _WIN32 ) |
|
#ifndef _WIN32 |
|
879 |
ADD_FEATURE("UNIX"); |
ADD_FEATURE("UNIX"); |
|
#endif |
|
880 |
#endif |
#endif |
881 |
|
|
882 |
#ifdef IEEEFLOAT |
#ifdef IEEEFLOAT |
883 |
ADD_FEATURE("IEEE-FLOATING-POINT"); |
ADD_FEATURE("IEEE-FLOATING-POINT"); |
884 |
#endif |
#endif |
885 |
|
|
886 |
#ifdef SGC |
#ifdef SGC |
887 |
ADD_FEATURE("SGC"); |
ADD_FEATURE("SGC"); |
888 |
#endif |
#endif |
889 |
|
|
890 |
#ifdef ADDITIONAL_FEATURES |
#ifdef ADDITIONAL_FEATURES |
891 |
ADDITIONAL_FEATURES; |
ADDITIONAL_FEATURES; |
892 |
#endif |
#endif |
893 |
|
|
894 |
#ifdef BSD |
#ifdef BSD |
895 |
ADD_FEATURE("BSD"); |
ADD_FEATURE("BSD"); |
896 |
#endif |
#endif |
915 |
&& ((-Seven)/ (-Three)) == 2) |
&& ((-Seven)/ (-Three)) == 2) |
916 |
{ ADD_FEATURE("TRUNCATE_USE_C"); |
{ ADD_FEATURE("TRUNCATE_USE_C"); |
917 |
} } |
} } |
918 |
#endif |
#endif /* PECULIAR_MACHINE */ |
|
|
|
|
|
|
919 |
|
|
920 |
make_special("*FEATURES*",features);} |
make_special("*FEATURES*",features);} |
921 |
|
|