375 |
char buf[256]; |
char buf[256]; |
376 |
if (snprintf(buf,sizeof(buf),"%s.gz",fname)<=0) |
if (snprintf(buf,sizeof(buf),"%s.gz",fname)<=0) |
377 |
FEerror("Cannot write .gz filename",0); |
FEerror("Cannot write .gz filename",0); |
378 |
if (!stat(fname,&ss)) { |
if (!stat(buf,&ss)) { |
379 |
FILE *pp; |
FILE *pp; |
380 |
int n; |
int n; |
381 |
if (!(fp=tmpfile())) |
if (!(fp=tmpfile())) |
389 |
FEerror("Cannot write pipe output to temporary file",0); |
FEerror("Cannot write pipe output to temporary file",0); |
390 |
if (pclose(pp)<0) |
if (pclose(pp)<0) |
391 |
FEerror("Cannot close zcat pipe",0); |
FEerror("Cannot close zcat pipe",0); |
392 |
|
if (fseek(fp,0,SEEK_SET)) |
393 |
|
FEerror("Cannot rewind temporary file\n",0); |
394 |
goto AGAIN; |
goto AGAIN; |
395 |
} |
} |
396 |
} |
} |
1775 |
} |
} |
1776 |
|
|
1777 |
object sSAload_pathnameA; |
object sSAload_pathnameA; |
1778 |
|
DEFVAR("*COLLECT-BINARY-MODULES*",sSAcollect_binary_modulesA,SI,sLnil,""); |
1779 |
|
DEFVAR("*BINARY-MODULES*",sSAbinary_modulesA,SI,Cnil,""); |
1780 |
|
|
1781 |
@(static defun load (pathname |
@(static defun load (pathname |
1782 |
&key (verbose `symbol_value(sLAload_verboseA)`) |
&key (verbose `symbol_value(sLAload_verboseA)`) |
1836 |
package = symbol_value(sLApackageA); |
package = symbol_value(sLApackageA); |
1837 |
bds_bind(sLApackageA, package); |
bds_bind(sLApackageA, package); |
1838 |
bds_bind(sSAload_pathnameA,fasl_filename); |
bds_bind(sSAload_pathnameA,fasl_filename); |
1839 |
|
if (sSAcollect_binary_modulesA->s.s_dbind==Ct) { |
1840 |
|
object _x=sSAbinary_modulesA->s.s_dbind; |
1841 |
|
object _y=Cnil; |
1842 |
|
while (_x!=Cnil) { |
1843 |
|
_y=_x; |
1844 |
|
_x=_x->c.c_cdr; |
1845 |
|
} |
1846 |
|
if (_y==Cnil) |
1847 |
|
sSAbinary_modulesA->s.s_dbind=make_cons(fasl_filename,Cnil); |
1848 |
|
else |
1849 |
|
_y->c.c_cdr=make_cons(fasl_filename,Cnil); |
1850 |
|
} |
1851 |
i = fasload(fasl_filename); |
i = fasload(fasl_filename); |
1852 |
if (print != Cnil) { |
if (print != Cnil) { |
1853 |
SETUP_PRINT_DEFAULT(Cnil); |
SETUP_PRINT_DEFAULT(Cnil); |
2327 |
#endif /* HAVE_NSOCKET */ |
#endif /* HAVE_NSOCKET */ |
2328 |
|
|
2329 |
object standard_io; |
object standard_io; |
2330 |
DEFVAR("*STANDARD-INPUT*",sLAstandard_inputA,LISP,(init_file(),standard_io),""); |
DEFVAR("*STANDARD-INPUT*",sLAstandard_inputA,LISP,(gcl_init_file(),standard_io),""); |
2331 |
DEFVAR("*STANDARD-OUTPUT*",sLAstandard_outputA,LISP,standard_io,""); |
DEFVAR("*STANDARD-OUTPUT*",sLAstandard_outputA,LISP,standard_io,""); |
2332 |
DEFVAR("*ERROR-OUTPUT*",sLAerror_outputA,LISP,standard_io,""); |
DEFVAR("*ERROR-OUTPUT*",sLAerror_outputA,LISP,standard_io,""); |
2333 |
DEFVAR("*TERMINAL-IO*",sLAterminal_ioA,LISP,terminal_io,""); |
DEFVAR("*TERMINAL-IO*",sLAterminal_ioA,LISP,terminal_io,""); |
2339 |
|
|
2340 |
|
|
2341 |
void |
void |
2342 |
init_file(void) |
gcl_init_file(void) |
2343 |
{ |
{ |
2344 |
object standard_input; |
object standard_input; |
2345 |
object standard_output; |
object standard_output; |
2412 |
|
|
2413 |
|
|
2414 |
void |
void |
2415 |
init_file_function() |
gcl_init_file_function() |
2416 |
{ |
{ |
2417 |
|
|
2418 |
|
|
2477 |
#endif |
#endif |
2478 |
|
|
2479 |
#ifdef HAVE_READLINE |
#ifdef HAVE_READLINE |
2480 |
init_readline_function(); |
gcl_init_readline_function(); |
2481 |
#endif |
#endif |
2482 |
} |
} |
2483 |
|
|