From 661db03d9c2897c072039d46b54fbb947ac719da Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Wed, 18 Sep 2002 07:59:47 +0000 Subject: [PATCH] * slerr.c (SLang_doerror): Use error parameter. Eliminate err[] array. --- slang/ChangeLog | 5 +++++ slang/slerr.c | 14 ++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/slang/ChangeLog b/slang/ChangeLog index 09204a334..6fc386065 100644 --- a/slang/ChangeLog +++ b/slang/ChangeLog @@ -1,3 +1,8 @@ +2002-09-18 Andrew V. Samoilov + + * slerr.c (SLang_doerror): Use error parameter. Eliminate + err[] array. + 2002-08-21 Pavel Roskin * slsmg.c (Fake_Alt_Char_Pairs): Update from slang-1.4.5. This diff --git a/slang/slerr.c b/slang/slerr.c index 6e305555f..e2e22b46b 100644 --- a/slang/slerr.c +++ b/slang/slerr.c @@ -27,22 +27,12 @@ volatile int SLKeyBoard_Quit = 0; void SLang_doerror (char *error) { - char err [1024]; - char *str = NULL; - - *err = 0; - - str = "Slang/Midnight Commander unknown error"; - - g_snprintf(err, sizeof (err), "S-Lang Error: %s", str); - if (SLang_Error_Routine == NULL) { - fputs (err, stderr); - fputs("\r\n", stderr); + fprintf (stderr, "S-Lang Error: %s\r\n", error); } else - (*SLang_Error_Routine)(err); + (*SLang_Error_Routine)(error); }