ERR(3) Library Functions Manual ERR(3)


errformat an error message


#include <errno.h>
extern int errno;
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#include <err.h>
err(int eval, const char *fmt, ...);


If the variable errno has the value ENOENT, the function err() prints the message “No such file or directory”.
Note that some of the macros differ between SYNOPSIS and DESCRIPTION:
The error message itself sets a minor trap: It needs to be quoted, either by prepending a zero-width space (‘\&’), or by enclosing it in double quotes. Otherwise, the word ‘No’ is misinterpreted as the macro No and hence lost from the output.
September 27, 2015