* slerr.c (SLang_doerror): Use error parameter. Eliminate err[] array.

This commit is contained in:
Andrew V. Samoilov 2002-09-18 07:59:47 +00:00
parent a670175b2b
commit 661db03d9c
2 changed files with 7 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2002-09-18 Andrew V. Samoilov <sav@bcs.zp.ua>
* slerr.c (SLang_doerror): Use error parameter. Eliminate
err[] array.
2002-08-21 Pavel Roskin <proski@gnu.org>
* slsmg.c (Fake_Alt_Char_Pairs): Update from slang-1.4.5. This

View File

@ -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);
}