chiark / gitweb /
buf.h: Spurious `\' prevents declaration of `buf_putstr*'.
[mLib] / report.3
... / ...
CommitLineData
1.\" -*-nroff-*-
2.TH report 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library"
3.SH NAME
4report \- report errors
5.\" @moan
6.\" @die
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
21.BR quis (3) for details),
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),
41.BR quis (3),
42.BR mLib (3).
43.SH AUTHOR
44Mark Wooding, <mdw@distorted.org.uk>