diff options
Diffstat (limited to 'libc/error/error2.c')
-rw-r--r-- | libc/error/error2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libc/error/error2.c b/libc/error/error2.c new file mode 100644 index 0000000..4ad2892 --- /dev/null +++ b/libc/error/error2.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1996,2004 Robert de Bath <robert@debath.thenet.co.uk> + * This file is part of the Linux-8086 C library and is distributed + * under the GNU Library General Public License. + */ +#include <string.h> + +#include "error_list.h" + +char * +strerror(err) +int err; +{ + static char retbuf[20]; + + if( err > 0 && err <= sys_nerr ) + return sys_errlist[err]; + + strcpy(retbuf, "Error "); + strcpy(retbuf+6, itoa(err)); + return retbuf; +} |