diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-17 11:32:56 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-03-17 11:32:56 +0000 |
commit | 9f40cd879d951cdaa3409aef31340b2b1472921d (patch) | |
tree | 6e294a84addc2981635112ae828c2de00a007809 | |
parent | 0c0ffe090ae9c83c1aeb12e507c6cd199bc4efd5 (diff) |
* Added function scm_error_num_args_subr.
-rw-r--r-- | libguile/ChangeLog | 4 | ||||
-rw-r--r-- | libguile/error.c | 14 | ||||
-rw-r--r-- | libguile/error.h | 1 |
3 files changed, 18 insertions, 1 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 27198224f..a367901c9 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,7 @@ +2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de> + + * error.[ch] (scm_error_num_args_subr): New function. + 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de> * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p), diff --git a/libguile/error.c b/libguile/error.c index 5d441df3f..7d8b30900 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -252,6 +252,18 @@ scm_wrong_num_args (SCM proc) SCM_BOOL_F); } + +void +scm_error_num_args_subr (const char *subr) +{ + scm_error (scm_args_number_key, + NULL, + "Wrong number of arguments to ~A", + SCM_LIST1 (scm_makfrom0str (subr)), + SCM_BOOL_F); +} + + SCM_SYMBOL (scm_arg_type_key, "wrong-type-arg"); void scm_wrong_type_arg (const char *subr, int pos, SCM bad_value) diff --git a/libguile/error.h b/libguile/error.h index 1c10fd8c3..180e70d3f 100644 --- a/libguile/error.h +++ b/libguile/error.h @@ -73,6 +73,7 @@ extern void scm_out_of_range (const char *subr, SCM bad_value) extern void scm_out_of_range_pos (const char *subr, SCM bad_value, SCM pos) SCM_NORETURN; extern void scm_wrong_num_args (SCM proc) SCM_NORETURN; +extern void scm_error_num_args_subr (const char* subr) SCM_NORETURN; extern void scm_wrong_type_arg (const char *subr, int pos, SCM bad_value) SCM_NORETURN; extern void scm_wrong_type_arg_msg (const char *subr, int pos, |