chiark / gitweb /
buf.h: Spurious `\' prevents declaration of `buf_putstr*'.
[mLib] / report.3
CommitLineData
b6b9d458 1.\" -*-nroff-*-
fbf20b5b 2.TH report 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library"
b6b9d458 3.SH NAME
4report \- report errors
08da152e 5.\" @moan
6.\" @die
b6b9d458 7.SH SYNOPSIS
8.nf
9.B "#include <mLib/report.h>"
10
11.BI "void moan(const char *" f ", ...);"
12.BI "void die(int " status ", const char *" f ", ...);"
13.fi
14.SH DESCRIPTION
15The
16.B moan
17function emits a message to the standard error stream consisting of the
18program's name (as read by the
19.B quis
20function; see
08da152e 21.BR quis (3) for details),
b6b9d458 22a colon, a space, and the
23.BR printf -style
24formatted string
25.I f
26followed by a newline. This is a handy way to report nonfatal errors in
27a program.
28.PP
29The
30.B die
31function emits a message to the standard error stream, just as for
32.B moan
33above, and then calls the
34.B exit
35function with argument
36.I status
37to halt the program. This is a handy way to report fatal errors in a
38program.
39.SH SEE ALSO
40.BR exit (3),
08da152e 41.BR quis (3),
42.BR mLib (3).
b6b9d458 43.SH AUTHOR
9b5ac6ff 44Mark Wooding, <mdw@distorted.org.uk>