From 9f40cd879d951cdaa3409aef31340b2b1472921d Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sat, 17 Mar 2001 11:32:56 +0000 Subject: [PATCH] * Added function scm_error_num_args_subr. --- libguile/ChangeLog | 4 ++++ libguile/error.c | 14 +++++++++++++- libguile/error.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) 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 + + * error.[ch] (scm_error_num_args_subr): New function. + 2001-03-16 Martin Grabmueller * 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, -- 2.20.1