compiler/clib: Removed unused arosc_init.h file.
[AROS.git] / compiler / clib / strerror_rom.c
blob46f967cd8e61cde43a6fddd0952366ef7fe3ec26
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function strerror().
6 */
8 #include <proto/dos.h>
9 #include <errno.h>
10 #include <stdio.h>
12 extern const char * _errstrings[];
14 /*****************************************************************************
16 NAME */
17 #include <string.h>
19 char * strerror (
21 /* SYNOPSIS */
22 int n)
24 /* FUNCTION
25 Returns a readable string for an error number in errno.
27 INPUTS
28 n - The contents of errno or a #define from errno.h
30 RESULT
31 A string describing the error.
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 ******************************************************************************/
45 if (n > MAX_ERRNO)
47 return NULL;
50 return (char *)_errstrings[n];
51 } /* strerror */