source: trunk/third/sysinfo/strerror.c @ 11115

Revision 11115, 480 bytes checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r11114, which included commits to RCS files with non-trunk default branches.
Line 
1#ifndef lint
2static char *RCSid = "$Id: strerror.c,v 1.1.1.2 1998-02-12 21:32:11 ghudson Exp $";
3#endif
4
5#include <stdio.h>
6#include <sys/errno.h>
7
8/*
9 * Return string for system error number "Num".
10 */
11char *strerror(Num)
12     int                        Num;
13{
14    extern int                  sys_nerr;
15    extern char                *sys_errlist[];
16    static char                 Unknown[100];
17
18    if (Num < 0 || Num > sys_nerr) {
19        (void) sprintf(Unknown, "Error %d", Num);
20        return(Unknown);
21    } else
22        return(sys_errlist[Num]);
23}
Note: See TracBrowser for help on using the repository browser.