Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/* $XConsortium: strerror.c /main/3 1996/06/19 17:18:42 drk $ */
/* strerror.c -
ANSI C strerror() function.
Written by James Clark (jjc@jclark.com).
*/
#include "config.h"
#ifdef STRERROR_MISSING
#include <stdio.h>
char *strerror(n)
int n;
{
extern int sys_nerr;
extern char *sys_errlist[];
static char buf[sizeof("Error ") + 1 + 3*sizeof(int)];
if (n >= 0 && n < sys_nerr && sys_errlist[n] != 0)
return sys_errlist[n];
else {
sprintf(buf, "Error %d", n);
return buf;
}
}
#endif /* STRERROR_MISSING */
/*
Local Variables:
c-indent-level: 5
c-continued-statement-offset: 5
c-brace-offset: -5
c-argdecl-indent: 0
c-label-offset: -5
End:
*/