Mail Archives: djgpp/1994/02/09/12:18:43
|<><><><><> Original message from dj AT ctron DOT com <><><><><>
|> I *was* thinking about revising syserr.c, but then I looked at errno.h.
|> The mechanism for printing error messages supported by the
|> sys_errlist array of strings is really quite convenient, but as long
|
|You should always compare errno to sys_nerr to determine if the table
|supports that error.
Or better yet, use strerror(3C). If it is not in the DJGPP C library
by default, it is simple to add.
char const *
strerror(int err)
{
if (err < 0 || err >= sys_nerr)
return "unknown error number";
return sys_error[err];
}
TJ Merritt
tjm AT netcom DOT com
}
|
|
|
- Raw text -