mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
* strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
* gdbint.c (gdb_read): update scm_lreadr usage. * load.h: update prototypes. * load.c (scm_primitive_load, scm_read_and_eval_x, scm_primitive_load_path): remove case_insensitive_p, sharp arguments. * read.h: add prototype for scm_read_hash_extend. Change args for other prototypes. * read.c (scm_read_hash_procedures): new variable. (scm_read_hash_extend): new procedure. (scm_get_hash_procedure): new procedure. * (scm_lreadr): use scm_get_hash_procedure instead of an argument for extended # processing. (scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen, scm_read_token): remove case_i, sharp arguments. Change callers. * read.h (SCM_N_READ_OPTIONS): increase to 3. (SCM_CASE_INSENSITIVE_P): define. * read.c: add case-insensitive option to scm_read_opts. * (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument to determine whether to convert symbol case. (default_case_i): definition removed. * read.c (scm_read_token): if case_i, downcase ic before doing anything with it.
This commit is contained in:
parent
90d5e28037
commit
deca31e173
7 changed files with 151 additions and 96 deletions
|
@ -68,12 +68,10 @@
|
|||
Applied to the full name of the file. */
|
||||
static SCM *scm_loc_load_hook;
|
||||
|
||||
SCM_PROC(s_primitive_load, "primitive-load", 1, 2, 0, scm_primitive_load);
|
||||
SCM_PROC(s_primitive_load, "primitive-load", 1, 0, 0, scm_primitive_load);
|
||||
SCM
|
||||
scm_primitive_load (filename, case_insensitive_p, sharp)
|
||||
scm_primitive_load (filename)
|
||||
SCM filename;
|
||||
SCM case_insensitive_p;
|
||||
SCM sharp;
|
||||
{
|
||||
SCM hook = *scm_loc_load_hook;
|
||||
SCM_ASSERT (SCM_NIMP (filename) && SCM_ROSTRINGP (filename), filename,
|
||||
|
@ -92,7 +90,7 @@ scm_primitive_load (filename, case_insensitive_p, sharp)
|
|||
scm_makfromstr ("r", (scm_sizet) sizeof (char), 0));
|
||||
while (1)
|
||||
{
|
||||
form = scm_read (port, case_insensitive_p, sharp);
|
||||
form = scm_read (port);
|
||||
if (SCM_EOF_VAL == form)
|
||||
break;
|
||||
scm_eval_x (form);
|
||||
|
@ -277,12 +275,10 @@ scm_sys_search_load_path (filename)
|
|||
}
|
||||
|
||||
|
||||
SCM_PROC(s_primitive_load_path, "primitive-load-path", 1, 2, 0, scm_primitive_load_path);
|
||||
SCM_PROC(s_primitive_load_path, "primitive-load-path", 1, 0, 0, scm_primitive_load_path);
|
||||
SCM
|
||||
scm_primitive_load_path (filename, case_insensitive_p, sharp)
|
||||
scm_primitive_load_path (filename)
|
||||
SCM filename;
|
||||
SCM case_insensitive_p;
|
||||
SCM sharp;
|
||||
{
|
||||
SCM full_filename;
|
||||
|
||||
|
@ -302,7 +298,7 @@ scm_primitive_load_path (filename, case_insensitive_p, sharp)
|
|||
scm_listify (filename, SCM_UNDEFINED));
|
||||
}
|
||||
|
||||
return scm_primitive_load (full_filename, case_insensitive_p, sharp);
|
||||
return scm_primitive_load (full_filename);
|
||||
}
|
||||
|
||||
/* The following function seems trivial - and indeed it is. Its
|
||||
|
@ -312,15 +308,13 @@ scm_primitive_load_path (filename, case_insensitive_p, sharp)
|
|||
|
||||
SCM_SYMBOL (scm_end_of_file_key, "end-of-file");
|
||||
|
||||
SCM_PROC (s_read_and_eval_x, "read-and-eval!", 0, 3, 0, scm_read_and_eval_x);
|
||||
SCM_PROC (s_read_and_eval_x, "read-and-eval!", 0, 1, 0, scm_read_and_eval_x);
|
||||
|
||||
SCM
|
||||
scm_read_and_eval_x (port, case_insensitive_p, sharp)
|
||||
scm_read_and_eval_x (port)
|
||||
SCM port;
|
||||
SCM case_insensitive_p;
|
||||
SCM sharp;
|
||||
{
|
||||
SCM form = scm_read (port, case_insensitive_p, sharp);
|
||||
SCM form = scm_read (port);
|
||||
if (form == SCM_EOF_VAL)
|
||||
scm_ithrow (scm_end_of_file_key, SCM_EOL, 1);
|
||||
return scm_eval_x (form);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue