chiark / gitweb /
Infrastructure: Split the files into subdirectories.
[mLib] / ui / report.3
diff --git a/ui/report.3 b/ui/report.3
new file mode 100644 (file)
index 0000000..1ccecb6
--- /dev/null
@@ -0,0 +1,44 @@
+.\" -*-nroff-*-
+.TH report 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library"
+.SH NAME
+report \- report errors
+.\" @moan
+.\" @die
+.SH SYNOPSIS
+.nf
+.B "#include <mLib/report.h>"
+
+.BI "void moan(const char *" f ", ...);"
+.BI "void die(int " status ", const char *" f ", ...);"
+.fi
+.SH DESCRIPTION
+The
+.B moan
+function emits a message to the standard error stream consisting of the
+program's name (as read by the
+.B quis
+function; see
+.BR quis (3) for details),
+a colon, a space, and the
+.BR printf -style
+formatted string
+.I f
+followed by a newline.  This is a handy way to report nonfatal errors in
+a program.
+.PP
+The
+.B die
+function emits a message to the standard error stream, just as for
+.B moan
+above, and then calls the
+.B exit
+function with argument
+.I status
+to halt the program.  This is a handy way to report fatal errors in a
+program.
+.SH SEE ALSO
+.BR exit (3),
+.BR quis (3),
+.BR mLib (3).
+.SH AUTHOR
+Mark Wooding, <mdw@distorted.org.uk>