Commit | Line | Data |
---|---|---|
c4ccbbf9 MW |
1 | .\" -*-nroff-*- |
2 | .\" | |
3 | .\" Manual for reporting errors | |
4 | .\" | |
5 | .\" (c) 1999, 2001, 2005, 2009, 2024 Straylight/Edgeware | |
6 | .\" | |
7 | . | |
8 | .\"----- Licensing notice --------------------------------------------------- | |
9 | .\" | |
10 | .\" This file is part of the mLib utilities library. | |
11 | .\" | |
12 | .\" mLib is free software: you can redistribute it and/or modify it under | |
13 | .\" the terms of the GNU Library General Public License as published by | |
14 | .\" the Free Software Foundation; either version 2 of the License, or (at | |
15 | .\" your option) any later version. | |
16 | .\" | |
17 | .\" mLib is distributed in the hope that it will be useful, but WITHOUT | |
18 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
19 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | |
20 | .\" License for more details. | |
21 | .\" | |
22 | .\" You should have received a copy of the GNU Library General Public | |
23 | .\" License along with mLib. If not, write to the Free Software | |
24 | .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
25 | .\" USA. | |
26 | . | |
27 | .\"-------------------------------------------------------------------------- | |
28 | .so ../defs.man \" @@@PRE@@@ | |
29 | . | |
30 | .\"-------------------------------------------------------------------------- | |
31 | .TH report 3mLib "20 June 1999" "Straylight/Edgeware" "mLib utilities library" | |
32 | .\" @moan | |
33 | .\" @die | |
34 | . | |
35 | .\"-------------------------------------------------------------------------- | |
36 | .SH NAME | |
37 | report \- report errors | |
38 | . | |
39 | .\"-------------------------------------------------------------------------- | |
40 | .SH SYNOPSIS | |
41 | . | |
42 | .nf | |
43 | .B "#include <mLib/report.h>" | |
44 | .PP | |
45 | .BI "void moan(const char *" f ", ...);" | |
46 | .BI "void die(int " status ", const char *" f ", ...);" | |
47 | .fi | |
48 | . | |
49 | .\"-------------------------------------------------------------------------- | |
50 | .SH DESCRIPTION | |
51 | The | |
52 | .B moan | |
53 | function emits a message to the standard error stream consisting of the | |
54 | program's name (as read by the | |
55 | .B quis | |
56 | function; see | |
57 | .BR quis (3) for details), | |
58 | a colon, a space, and the | |
59 | .BR printf -style | |
60 | formatted string | |
61 | .I f | |
62 | followed by a newline. This is a handy way to report nonfatal errors in | |
63 | a program. | |
64 | .PP | |
65 | The | |
66 | .B die | |
67 | function emits a message to the standard error stream, just as for | |
68 | .B moan | |
69 | above, and then calls the | |
70 | .B exit | |
71 | function with argument | |
72 | .I status | |
73 | to halt the program. This is a handy way to report fatal errors in a | |
74 | program. | |
75 | . | |
76 | .\"-------------------------------------------------------------------------- | |
77 | .SH SEE ALSO | |
78 | . | |
79 | .BR exit (3), | |
80 | .BR quis (3), | |
81 | .BR mLib (3). | |
82 | . | |
83 | .\"-------------------------------------------------------------------------- | |
84 | .SH AUTHOR | |
85 | . | |
86 | Mark Wooding, <mdw@distorted.org.uk> | |
87 | . | |
88 | .\"----- That's all, folks -------------------------------------------------- |