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