From eebadeb4b4ee60dc768afd3036e3a29833ccb51e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 1 Mar 2021 02:12:47 +0100 Subject: misc + change license + changed behaviour of libhaiku_perror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhaiku_perror2.3 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 libhaiku_perror2.3 (limited to 'libhaiku_perror2.3') diff --git a/libhaiku_perror2.3 b/libhaiku_perror2.3 new file mode 100644 index 0000000..bb6914d --- /dev/null +++ b/libhaiku_perror2.3 @@ -0,0 +1,50 @@ +.TH LIBHAIKU_PERROR2 3 LIBHAIKU +.SH NAME +libhaiku_perror2 \- Print a poetic error message for a specific error + +.SH SYNOPSIS +.nf +#include + +void libhaiku_perror2(const char *\fIprefix\fP, int \fIerrnum\fP); +.fi +.PP +Link with +.IR \-lhaiku . + +.SH DESCRIPTION +The +.BR libhaiku_perror2 () +function prints an error message in the +form of a haiku, appropriate for the +.B errno +value specified in the +.I errnum +parameter, or if none are available, +a generic one. If +.I errnum +is negative, a generic peom will be printed. +.PP +Unless +.I NULL +or empty, each line will be prefixed by the +string specified in the +.I prefix +parameter, followed by a colon and a space. + +.SH RETURN VALUES +None. + +.SH ERRORS +Errors are not detected, but can be checked by calling +.BR ferror (3) +for +.BR stderr (3) +afterwards. + +.SH SEE ALSO +.BR perror (3), +.BR libhaiku (7), +.BR libhaiku_perror (3), +.BR libhaiku_generic (3), +.BR libhaiku_strerror (3) -- cgit v1.2.3-70-g09d2