mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
Use SCM_LISTn instead of scm_listify.
This commit is contained in:
parent
e6e2e95aa5
commit
e0c08f17b1
13 changed files with 38 additions and 49 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
* environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
|
||||
net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
|
||||
Use SCM_LISTn instead of scm_listify.
|
||||
|
||||
2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
||||
|
||||
* _scm.h: Removed #include <errno.h>.
|
||||
|
|
|
@ -816,7 +816,7 @@ update_catch_handler (void *ptr, SCM tag, SCM args)
|
|||
SCM observer = data->observer;
|
||||
SCM message = scm_makfrom0str ("Observer `~A' signals `~A' error: ~S");
|
||||
|
||||
return scm_cons (message, scm_listify (observer, tag, args, SCM_UNDEFINED));
|
||||
return scm_cons (message, SCM_LIST3 (observer, tag, args));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -81,11 +81,10 @@ scm_error (SCM key, const char *subr, const char *message, SCM args, SCM rest)
|
|||
message ? message : "<empty message>");
|
||||
abort ();
|
||||
}
|
||||
arg_list = scm_listify (subr ? scm_makfrom0str (subr) : SCM_BOOL_F,
|
||||
message ? scm_makfrom0str (message) : SCM_BOOL_F,
|
||||
args,
|
||||
rest,
|
||||
SCM_UNDEFINED);
|
||||
arg_list = SCM_LIST4 (subr ? scm_makfrom0str (subr) : SCM_BOOL_F,
|
||||
message ? scm_makfrom0str (message) : SCM_BOOL_F,
|
||||
args,
|
||||
rest);
|
||||
scm_ithrow (key, arg_list, 1);
|
||||
|
||||
/* No return, but just in case: */
|
||||
|
|
|
@ -2475,9 +2475,7 @@ dispatch:
|
|||
proc = x;
|
||||
badfun:
|
||||
/* scm_everr (x, env,...) */
|
||||
scm_misc_error (NULL,
|
||||
"Wrong type to apply: ~S",
|
||||
scm_listify (proc, SCM_UNDEFINED));
|
||||
scm_misc_error (NULL, "Wrong type to apply: ~S", SCM_LIST1 (proc));
|
||||
case scm_tc7_vector:
|
||||
case scm_tc7_wvect:
|
||||
#ifdef HAVE_ARRAYS
|
||||
|
|
|
@ -545,9 +545,8 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0,
|
|||
int en = errno;
|
||||
|
||||
SCM_SYSERROR_MSG ("~A: ~S",
|
||||
scm_listify (scm_makfrom0str (strerror (errno)),
|
||||
object,
|
||||
SCM_UNDEFINED), en);
|
||||
SCM_LIST2 (scm_makfrom0str (strerror (errno)), object),
|
||||
en);
|
||||
}
|
||||
return scm_stat2scm (&stat_temp);
|
||||
}
|
||||
|
@ -1132,12 +1131,9 @@ SCM_DEFINE (scm_select, "select", 3, 2, 0,
|
|||
if (rv < 0)
|
||||
SCM_SYSERROR;
|
||||
}
|
||||
return scm_listify (retrieve_select_type (&read_set, read_ports_ready,
|
||||
reads),
|
||||
retrieve_select_type (&write_set, write_ports_ready,
|
||||
writes),
|
||||
retrieve_select_type (&except_set, SCM_EOL, excepts),
|
||||
SCM_UNDEFINED);
|
||||
return SCM_LIST3 (retrieve_select_type (&read_set, read_ports_ready, reads),
|
||||
retrieve_select_type (&write_set, write_ports_ready, writes),
|
||||
retrieve_select_type (&except_set, SCM_EOL, excepts));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
#endif /* HAVE_SELECT */
|
||||
|
@ -1297,9 +1293,8 @@ SCM_DEFINE (scm_lstat, "lstat", 1, 0, 0,
|
|||
int en = errno;
|
||||
|
||||
SCM_SYSERROR_MSG ("~A: ~S",
|
||||
scm_listify (scm_makfrom0str (strerror (errno)),
|
||||
str,
|
||||
SCM_UNDEFINED), en);
|
||||
SCM_LIST2 (scm_makfrom0str (strerror (errno)), str),
|
||||
en);
|
||||
}
|
||||
return scm_stat2scm(&stat_temp);
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ scm_ihashx (SCM obj,unsigned int n,struct scm_ihashx_closure * closure)
|
|||
SCM answer;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->hash,
|
||||
scm_listify (obj, scm_ulong2num ((unsigned long)n), SCM_UNDEFINED),
|
||||
SCM_LIST2 (obj, scm_ulong2num ((unsigned long)n)),
|
||||
SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
return SCM_INUM (answer);
|
||||
|
@ -395,7 +395,7 @@ scm_sloppy_assx (SCM obj,SCM alist,struct scm_ihashx_closure * closure)
|
|||
SCM answer;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->assoc,
|
||||
scm_listify (obj, alist, SCM_UNDEFINED),
|
||||
SCM_LIST2 (obj, alist),
|
||||
SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
return answer;
|
||||
|
@ -410,7 +410,7 @@ scm_delx_x (SCM obj,SCM alist,struct scm_ihashx_closure * closure)
|
|||
SCM answer;
|
||||
SCM_DEFER_INTS;
|
||||
answer = scm_apply (closure->delete,
|
||||
scm_listify (obj, alist, SCM_UNDEFINED),
|
||||
SCM_LIST2 (obj, alist),
|
||||
SCM_EOL);
|
||||
SCM_ALLOW_INTS;
|
||||
return answer;
|
||||
|
|
|
@ -118,7 +118,7 @@ SCM_DEFINE (scm_primitive_load, "primitive-load", 1, 0, 0,
|
|||
SCM_EOL);
|
||||
|
||||
if (! SCM_FALSEP (hook))
|
||||
scm_apply (hook, scm_listify (filename, SCM_UNDEFINED), SCM_EOL);
|
||||
scm_apply (hook, SCM_LIST1 (filename), SCM_EOL);
|
||||
|
||||
{ /* scope */
|
||||
SCM port, save_port;
|
||||
|
@ -243,10 +243,9 @@ scm_init_load_path ()
|
|||
SCM path = SCM_EOL;
|
||||
|
||||
#ifdef SCM_LIBRARY_DIR
|
||||
path = scm_listify (scm_makfrom0str (SCM_SITE_DIR),
|
||||
scm_makfrom0str (SCM_LIBRARY_DIR),
|
||||
scm_makfrom0str (SCM_PKGDATA_DIR),
|
||||
SCM_UNDEFINED);
|
||||
path = SCM_LIST3 (scm_makfrom0str (SCM_SITE_DIR),
|
||||
scm_makfrom0str (SCM_LIBRARY_DIR),
|
||||
scm_makfrom0str (SCM_PKGDATA_DIR));
|
||||
#endif /* SCM_LIBRARY_DIR */
|
||||
|
||||
path = scm_internal_parse_path (getenv ("GUILE_LOAD_PATH"), path);
|
||||
|
@ -452,7 +451,7 @@ SCM_DEFINE (scm_primitive_load_path, "primitive-load-path", 1, 0, 0,
|
|||
SCM_MISC_ERROR ((absolute
|
||||
? "Unable to load file ~S"
|
||||
: "Unable to find file ~S in load path"),
|
||||
scm_listify (filename, SCM_UNDEFINED));
|
||||
SCM_LIST1 (filename));
|
||||
}
|
||||
|
||||
return scm_primitive_load (full_filename);
|
||||
|
@ -510,9 +509,8 @@ scm_init_load ()
|
|||
scm_loc_load_path = SCM_CDRLOC (scm_sysintern ("%load-path", SCM_EOL));
|
||||
scm_loc_load_extensions
|
||||
= SCM_CDRLOC (scm_sysintern ("%load-extensions",
|
||||
scm_listify (scm_makfrom0str (".scm"),
|
||||
scm_makfrom0str (""),
|
||||
SCM_UNDEFINED)));
|
||||
SCM_LIST2 (scm_makfrom0str (".scm"),
|
||||
scm_makfrom0str (""))));
|
||||
scm_loc_load_hook = SCM_CDRLOC (scm_sysintern ("%load-hook", SCM_BOOL_F));
|
||||
|
||||
init_build_info ();
|
||||
|
|
|
@ -358,8 +358,7 @@ SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0,
|
|||
entry = getnetbyaddr (netnum, AF_INET);
|
||||
}
|
||||
if (!entry)
|
||||
SCM_SYSERROR_MSG ("no such network ~A",
|
||||
scm_listify (net, SCM_UNDEFINED), errno);
|
||||
SCM_SYSERROR_MSG ("no such network ~A", SCM_LIST1 (net), errno);
|
||||
ve[0] = scm_makfromstr (entry->n_name, (scm_sizet) strlen (entry->n_name), 0);
|
||||
ve[1] = scm_makfromstrs (-1, entry->n_aliases);
|
||||
ve[2] = SCM_MAKINUM (entry->n_addrtype + 0L);
|
||||
|
@ -409,8 +408,7 @@ SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0,
|
|||
entry = getprotobynumber (protonum);
|
||||
}
|
||||
if (!entry)
|
||||
SCM_SYSERROR_MSG ("no such protocol ~A",
|
||||
scm_listify (protocol, SCM_UNDEFINED), errno);
|
||||
SCM_SYSERROR_MSG ("no such protocol ~A", SCM_LIST1 (protocol), errno);
|
||||
ve[0] = scm_makfromstr (entry->p_name, (scm_sizet) strlen (entry->p_name), 0);
|
||||
ve[1] = scm_makfromstrs (-1, entry->p_aliases);
|
||||
ve[2] = SCM_MAKINUM (entry->p_proto + 0L);
|
||||
|
@ -474,8 +472,7 @@ SCM_DEFINE (scm_getserv, "getserv", 0, 2, 0,
|
|||
entry = getservbyport (htons (SCM_INUM (name)), SCM_STRING_CHARS (protocol));
|
||||
}
|
||||
if (!entry)
|
||||
SCM_SYSERROR_MSG("no such service ~A",
|
||||
scm_listify (name, SCM_UNDEFINED), errno);
|
||||
SCM_SYSERROR_MSG("no such service ~A", SCM_LIST1 (name), errno);
|
||||
return scm_return_entry (entry);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
|
|
@ -167,10 +167,8 @@ scm_stand_in_scm_proc(SCM proc)
|
|||
answer = scm_assoc (proc, scm_stand_in_procs);
|
||||
if (SCM_FALSEP (answer))
|
||||
{
|
||||
answer = scm_closure (scm_listify (SCM_EOL, SCM_BOOL_F, SCM_UNDEFINED),
|
||||
SCM_EOL);
|
||||
scm_stand_in_procs = scm_cons (scm_cons (proc, answer),
|
||||
scm_stand_in_procs);
|
||||
answer = scm_closure (SCM_LIST2 (SCM_EOL, SCM_BOOL_F), SCM_EOL);
|
||||
scm_stand_in_procs = scm_acons (proc, answer, scm_stand_in_procs);
|
||||
}
|
||||
else
|
||||
answer = SCM_CDR (answer);
|
||||
|
|
|
@ -438,7 +438,7 @@ tryagain_no_flush_ws:
|
|||
}
|
||||
unkshrp:
|
||||
scm_misc_error (s_scm_read, "Unknown # object: ~S",
|
||||
scm_listify (SCM_MAKE_CHAR (c), SCM_UNDEFINED));
|
||||
SCM_LIST1 (SCM_MAKE_CHAR (c)));
|
||||
}
|
||||
|
||||
case '"':
|
||||
|
|
|
@ -167,7 +167,7 @@ sys_deliver_signals (void)
|
|||
signal (i, take_signal);
|
||||
#endif
|
||||
scm_apply (SCM_VELTS (*signal_handlers)[i],
|
||||
scm_listify (SCM_MAKINUM (i), SCM_UNDEFINED),
|
||||
SCM_LIST1 (SCM_MAKINUM (i)),
|
||||
SCM_EOL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -605,7 +605,7 @@ scm_addr_vector (struct sockaddr *address, const char *proc)
|
|||
}
|
||||
else
|
||||
scm_misc_error (proc, "Unrecognised address family: ~A",
|
||||
scm_listify (SCM_MAKINUM (fam), SCM_UNDEFINED));
|
||||
SCM_LIST1 (SCM_MAKINUM (fam)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -534,9 +534,7 @@ SCM_DEFINE (scm_make_vtable_vtable, "make-vtable-vtable", 2, 0, 1,
|
|||
SCM_VALIDATE_INUM (2, tail_array_size);
|
||||
SCM_VALIDATE_REST_ARGUMENT (init);
|
||||
|
||||
fields = scm_string_append (scm_listify (required_vtable_fields,
|
||||
user_fields,
|
||||
SCM_UNDEFINED));
|
||||
fields = scm_string_append (SCM_LIST2 (required_vtable_fields, user_fields));
|
||||
layout = scm_make_struct_layout (fields);
|
||||
basic_size = SCM_SYMBOL_LENGTH (layout) / 2;
|
||||
tail_elts = SCM_INUM (tail_array_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue