Reference

peks-errnum(3)

peks error message handler

NAME

peks_strerr, errnum, errstr - peks error message handler

SYNOPSIS

#include <peks.h>

char *peks_strerr (unsigned error_num);

#include <messages.h>

int errnum (SYMBOL);

const char *errstr (SYMBOL);

DESCRIPTION

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 ().

SEE ALSO

errno(3), strerror(3),

AUTHOR

The peks package where these functions belong to was written by Jordan Hrycaj <[email protected]>, originally to support the nessus security scanner.