errstr3
Peks error message handler
Part of peks-errnum(3).
Usage
char *peks_strerr
(unsigned
error_num);
int errnum
(SYMBOL);
const char
*errstr
(SYMBOL);
Overview
Peks_strerr () returns a descriptive text explaining the error number passed as the function argument. Using error codes from the operating systems, only this function is equivalent to strerror(3).
Errnum () is a macro rather than a function, extracting the error string from the argument symbol SYMBOL.
Errstr () is a macro rather than a function, extracting the error code from tha argument symbol SYMBOL. In that sense, for any valid SYMBOL, ths function call
peks_strerr (errnum (SYMBOL))
returns literally the same text as errstr (SYMBOL). The error symbols are all defined in messages.h.
Return value
The function peks_strerr () never returns NULL, so does errstr ().