3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
13 /* TODO: Doing this via a static array is not the way to do it. */
14 char * strerror( int errnum )
16 if ( errnum == 0 || errnum >= _PDCLIB_ERRNO_MAX )
18 return (char *)"Unknown error";
22 return _PDCLIB_lconv._PDCLIB_errno_texts[errnum];
29 #include <_PDCLIB_test.h>
36 TESTCASE( strerror( ERANGE ) != strerror( EDOM ) );