b6b9d458 |
1 | .\" -*-nroff-*- |
fbf20b5b |
2 | .TH report 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library" |
b6b9d458 |
3 | .SH NAME |
4 | report \- 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 |
15 | The |
16 | .B moan |
17 | function emits a message to the standard error stream consisting of the |
18 | program's name (as read by the |
19 | .B quis |
20 | function; see |
08da152e |
21 | .BR quis (3) for details), |
b6b9d458 |
22 | a colon, a space, and the |
23 | .BR printf -style |
24 | formatted string |
25 | .I f |
26 | followed by a newline. This is a handy way to report nonfatal errors in |
27 | a program. |
28 | .PP |
29 | The |
30 | .B die |
31 | function emits a message to the standard error stream, just as for |
32 | .B moan |
33 | above, and then calls the |
34 | .B exit |
35 | function with argument |
36 | .I status |
37 | to halt the program. This is a handy way to report fatal errors in a |
38 | program. |
39 | .SH SEE ALSO |
40 | .BR exit (3), |
08da152e |
41 | .BR quis (3), |
42 | .BR mLib (3). |
b6b9d458 |
43 | .SH AUTHOR |
9b5ac6ff |
44 | Mark Wooding, <mdw@distorted.org.uk> |