diff options
author | Gary Houston <ghouston@arglist.com> | 1996-09-19 09:08:07 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1996-09-19 09:08:07 +0000 |
commit | f5bf2977c67516e13bbadf40ab28bf7806c46057 (patch) | |
tree | d1c79764c7c1788ccbac4def72ba9130c9b01273 /libguile/eval.c | |
parent | 2194b6f00e053c36c59df2d2cc686385e64cca68 (diff) | |
download | guile-f5bf2977c67516e13bbadf40ab28bf7806c46057.tar.gz |
* filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
integer (assuming for now accepting an integer is a good thing).
* error.c, fports.c: replace use of %S in lgh_error args with %s.
%S will be used instead for write'ing arguments.
* unif.c (scm_transpose_array): change arguments in the SCM_WNA
asserts. fix a few other asserts.
(scm_aind, scm_enclose_array, scm_array_in_bounds_p,
scm_uniform_vector_ref, scm_array_set_x,
scm_dimensions_to_unform_array): change args in
SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
scm_substring_fill_x): likewise.
gsubr.c (scm_gsubr_apply): likewise.
eval.c (SCM_APPLY): likewise.
* eval.c (4 places): replace scm_everr with lgh_error or
scm_wrong_num_args.
* error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
scm_memory_error): new procedures.
* scm_everr: deleted. can use scm_wta, dropping first two args.
scm_error: convert NULL subr to SCM_BOOL_F.
* __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
SCM_ARGERR.
* stackchk.c (scm_report_stack_overflow): use lgh_error instead
of scm_wta.
* error.c, error.h: new error keys: scm_arg_type_key,
scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
scm_misc_error_key.
scm_wta: reimplement using lgh_error instead of scm_everr.
Diffstat (limited to 'libguile/eval.c')
-rw-r--r-- | libguile/eval.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/libguile/eval.c b/libguile/eval.c index 16ab9d5d9..5acfcedfe 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -242,11 +242,14 @@ scm_lookupcar (vloc, genv) { var = SCM_CAR (var); errout: - scm_everr (vloc, genv, var, - (SCM_NULLP (env) - ? "unbound variable: " - : "damaged environment"), - ""); + /* scm_everr (vloc, genv,...) */ + lgh_error (scm_misc_error_key, + NULL, + SCM_NULLP (env) + ? "Unbound variable: %S" + : "Damaged environment: %S", + scm_listify (var, SCM_UNDEFINED), + SCM_BOOL_F); } #endif SCM_CAR (vloc) = var + 1; @@ -432,8 +435,12 @@ scm_m_vref (xorig, env) ASSYNT (1 == scm_ilength (x), xorig, s_expression, s_vref); if (SCM_NIMP(x) && UDSCM_VARIABLEP (SCM_CAR (x))) { - scm_everr (SCM_UNDEFINED, env, SCM_CAR(SCM_CDR(x)), s_variable, - "global variable reference"); + /* scm_everr (SCM_UNDEFINED, env,..., "global variable reference") */ + lgh_error (scm_misc_error_key, + NULL, + "Bad variable: %S", + scm_listify (SCM_CAR (SCM_CDR (x)), SCM_UNDEFINED), + SCM_BOOL_F); } ASSYNT (SCM_NIMP(x) && DEFSCM_VARIABLEP (SCM_CAR (x)), xorig, s_variable, s_vref); @@ -1848,8 +1855,12 @@ dispatch: default: proc = x; badfun: - scm_everr (x, env, proc, "Wrong type to apply: ", ""); - + /* scm_everr (x, env,...) */ + lgh_error (scm_misc_error_key, + NULL, + "Wrong type to apply: %S", + scm_listify (proc, SCM_UNDEFINED), + SCM_BOOL_F); case scm_tc7_vector: case scm_tc7_wvect: case scm_tc7_bvect: @@ -2021,7 +2032,8 @@ evapply: umwrongnumargs: unmemocar (x, env); wrongnumargs: - scm_everr (x, env, proc, (char *) SCM_WNA, ""); + /* scm_everr (x, env,...) */ + scm_wrong_num_args (proc); default: /* handle macros here */ goto badfun; @@ -2582,7 +2594,7 @@ tail: goto tail; #endif wrongnumargs: - scm_wta (proc, (char *) SCM_WNA, "apply"); + scm_wrong_num_args (proc); default: badproc: scm_wta (proc, (char *) SCM_ARG1, "apply"); |