mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* load.c (scm_sys_try_load): don't check whether value returned
by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED. Change the Scheme name from %try-load to primitive-load. * error.c (scm_error): convert a NULL message to SCM_BOOL_F. Can avoid passing a message, allowing it to be derived in the error handler (e.g., if we want to throw to the key both from Scheme and C).
This commit is contained in:
parent
855c0eacc8
commit
b59b97ba3a
3 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,14 @@
|
|||
Tue Sep 24 06:48:38 1996 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* load.c (scm_sys_try_load): don't check whether value returned
|
||||
by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
|
||||
Change the Scheme name from %try-load to primitive-load.
|
||||
|
||||
* error.c (scm_error): convert a NULL message to SCM_BOOL_F.
|
||||
Can avoid passing a message, allowing it to be derived in the
|
||||
error handler (e.g., if we want to throw to the key both from
|
||||
Scheme and C).
|
||||
|
||||
Mon Sep 23 00:42:15 1996 Mikael Djurfeldt <mdj@kenneth>
|
||||
|
||||
* * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
|
||||
|
|
|
@ -137,7 +137,7 @@ scm_error (key, subr, message, args, rest)
|
|||
(*scm_error_callback) (key, subr, message, args, rest);
|
||||
|
||||
arg_list = scm_listify (subr ? scm_makfrom0str (subr) : SCM_BOOL_F,
|
||||
scm_makfrom0str (message),
|
||||
message ? scm_makfrom0str (message) : SCM_BOOL_F,
|
||||
args,
|
||||
rest,
|
||||
SCM_UNDEFINED);
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
/* Loading a file, given an absolute filename. */
|
||||
|
||||
SCM_PROC(s_sys_try_load, "%try-load", 1, 2, 0, scm_sys_try_load);
|
||||
SCM_PROC(s_sys_try_load, "primitive-load", 1, 2, 0, scm_sys_try_load);
|
||||
SCM
|
||||
scm_sys_try_load (filename, case_insensitive_p, sharp)
|
||||
SCM filename;
|
||||
|
@ -76,8 +76,6 @@ scm_sys_try_load (filename, case_insensitive_p, sharp)
|
|||
SCM form, port;
|
||||
port = scm_open_file (filename,
|
||||
scm_makfromstr ("r", (scm_sizet) sizeof (char), 0));
|
||||
if (SCM_FALSEP (port))
|
||||
return SCM_BOOL_F;
|
||||
while (1)
|
||||
{
|
||||
form = scm_read (port, case_insensitive_p, sharp);
|
||||
|
@ -87,7 +85,7 @@ scm_sys_try_load (filename, case_insensitive_p, sharp)
|
|||
}
|
||||
scm_close_port (port);
|
||||
}
|
||||
return SCM_BOOL_T;
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue