From efb997f535d76323a83c1645fbb594dabf969fb3 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sat, 23 Aug 1997 18:49:35 +0000 Subject: [PATCH] * errno.h: prototype for scm_strerror. * error.c (scm_strerror): new procedure. --- libguile/ChangeLog | 5 +++++ libguile/error.c | 8 ++++++++ libguile/error.h | 1 + 3 files changed, 14 insertions(+) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 57df412c7..182fb3fca 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 23 18:45:44 1997 Gary Houston + + * errno.h: prototype for scm_strerror. + * error.c (scm_strerror): new procedure. + Mon Aug 18 14:58:22 1997 Mikael Djurfeldt * list.c (scm_list_append_x): Allow non-pair as last argument. diff --git a/libguile/error.c b/libguile/error.c index 1b2699de4..0fd8d39a3 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -116,6 +116,14 @@ scm_error_scm (key, subr, message, args, rest) /* not reached. */ } +SCM_PROC (s_strerror, "strerror", 1, 0, 0, scm_strerror); +SCM +scm_strerror (SCM err) +{ + SCM_ASSERT (SCM_INUMP (err), err, SCM_ARG1, s_strerror); + return scm_makfrom0str (strerror (SCM_INUM (err))); +} + SCM_SYMBOL (scm_system_error_key, "system-error"); void scm_syserror (subr) diff --git a/libguile/error.h b/libguile/error.h index 839a30eb7..4560d97fd 100644 --- a/libguile/error.h +++ b/libguile/error.h @@ -65,6 +65,7 @@ extern void (*scm_error_callback) SCM_P ((SCM key, char *subr, char *message, SCM args, SCM rest)); extern SCM scm_error_scm SCM_P ((SCM key, SCM subr, SCM message, SCM args, SCM rest)) SCM_NORETURN; +extern SCM scm_strerror (SCM err); extern void scm_syserror SCM_P ((char *subr)) SCM_NORETURN; extern void scm_syserror_msg SCM_P ((char *subr, char *message, SCM args, int eno)) SCM_NORETURN; -- 2.20.1