/************************************************************************/
/* contents: initialization routines */
/* initial **************************************************************/
/* initializes the parts of the system that cannot be automatically */
/* accomplished in the declarations. */
int reborn
=0; /* flag to tell whether we are in fast-load version */
extern sigstruck
, sigdelay
;
int sigalrmh(), sigfpeh(), siginth();
lispval
Isstatus(),Istsrch();
if( signal(SIGINT
,SIG_IGN
) != SIG_IGN
)
if( signal(SIGHUP
,SIG_IGN
) != SIG_IGN
)
/* signals SIGBUS and SIGSEGV will be set up when the status list
is set up when the lisp is virgin, and will be set up according
to the current value on the status list if the lisp is reborn
register FILE *p
= _iob
+ 3;
for(; p
< _iob
+ _NFILE
; p
++)
/* set up SIGBUS and SIGSEGV from current value
Isstatus(matom("dumpcore"),
(Istsrch(matom("dumpcore")))->cdr
->cdr
->cdr
);
for (hash
=0;hash
<HASHTOP
;hash
++) hasht
[hash
] = (struct atom
*) CNIL
;
sbrk( NBPG
-(((int)sbrk(0)) % NBPG
) ); /* even up the break */
register lispval env
, temp
;
register struct argent
*lbot
, *np
;
for (envp
=environ
; *envp
!=NULL
; envp
++) ;
while (--envp
>= environ
) {
for(p
= *envp
,q
=envstr
; (*q
++ = *p
++)!='=';);
/* at this point lbot->val==env, so it is protected
lbot
->val
= temp
= newdot();
temp
->car
= matom(envstr
);
matom("environment")->clb
= env
;
sigstruck
|= (1 << signo
);
/*if(signo==SIGBUS || signo==SIGBUS || keywait)*/
extern lispval
Lfuncal();
extern lispval sigacts
[16];
struct argent
*oldlbot
, *oldnp
, saved
;
if(sigacts
[which
]!=((lispval
) 0)) {
np
-> val
= sigacts
[which
];
np
-> val
= inewint(which
);
sigstruck
&= ~ (1<<which
);
register int i
; int which
;
for(which
=0, i
= 1; i
<= 65536; which
++,i
<<=1) {
error("Internal bad memory reference, you are advised to (reset).",FALSE
);