aboutsummaryrefslogtreecommitdiffstats
path: root/libhaiku_perror.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-03-01 02:12:47 +0100
committerMattias Andrée <maandree@kth.se>2021-03-01 02:12:58 +0100
commiteebadeb4b4ee60dc768afd3036e3a29833ccb51e (patch)
treee20184a304c0ba1160477b644504fbb2e8146319 /libhaiku_perror.3
parentfix build (diff)
downloadlibhaiku-eebadeb4b4ee60dc768afd3036e3a29833ccb51e.tar.gz
libhaiku-eebadeb4b4ee60dc768afd3036e3a29833ccb51e.tar.bz2
libhaiku-eebadeb4b4ee60dc768afd3036e3a29833ccb51e.tar.xz
misc + change license + changed behaviour of libhaiku_perror
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libhaiku_perror.3')
-rw-r--r--libhaiku_perror.345
1 files changed, 45 insertions, 0 deletions
diff --git a/libhaiku_perror.3 b/libhaiku_perror.3
new file mode 100644
index 0000000..9530397
--- /dev/null
+++ b/libhaiku_perror.3
@@ -0,0 +1,45 @@
+.TH LIBHAIKU_PERROR 3 LIBHAIKU
+.SH NAME
+libhaiku_perror \- Print a poetic error message for the current error
+
+.SH SYNOPSIS
+.nf
+#include <libhaiku.h>
+
+inline void libhaiku_perror(const char *\fIprefix\fP);
+.fi
+.PP
+Link with
+.IR \-lhaiku .
+
+.SH DESCRIPTION
+The
+.BR libhaiku_perror ()
+function prints an error message in the form of
+a haiku, appropriate for the current value of
+.BR errno ,
+or if none are available, a generic one.
+.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_perror2 (3),
+.BR libhaiku_generic (3),
+.BR libhaiku_strerror (3)