PatchworkOS
Loading...
Searching...
No Matches
strerror.c
Go to the documentation of this file.
1#include <errno.h>
2#include <string.h>
3
5
6char* strerror(int errnum)
7{
8 if (errnum >= ERR_MAX || errnum < 0)
9 {
10 return "unknown error";
11 }
12 else
13 {
14 return _error_strings[errnum];
15 }
16}
char * _error_strings[]
#define ERR_MAX
Maximum value for all error codes (not inclusive)
Definition errno.h:732
char * strerror(int errnum)
Definition strerror.c:6