don't truncate lines, don't allow tabs to back up (I think this is tested!)
[unix-history] / usr / src / lib / libc / string / strerror.c
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
*
* %sccs.include.redist.c%
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strerror.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
char *
strerror(errnum)
int errnum;
{
extern int sys_nerr;
extern char *sys_errlist[];
static char ebuf[40]; /* 64-bit number + slop */
if ((unsigned int)errnum < sys_nerr)
return(sys_errlist[errnum]);
(void)sprintf(ebuf, "Unknown error: %d", errnum);
return(ebuf);
}