X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/dd3c57bc8cac59e0d657ee665ce462988d27d714..18c831dcd0ae4d660c70ccac69d27ed2a97851be:/ui/report.3 diff --git a/ui/report.3 b/ui/report.3 new file mode 100644 index 0000000..1ccecb6 --- /dev/null +++ b/ui/report.3 @@ -0,0 +1,44 @@ +.\" -*-nroff-*- +.TH report 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library" +.SH NAME +report \- report errors +.\" @moan +.\" @die +.SH SYNOPSIS +.nf +.B "#include " + +.BI "void moan(const char *" f ", ...);" +.BI "void die(int " status ", const char *" f ", ...);" +.fi +.SH DESCRIPTION +The +.B moan +function emits a message to the standard error stream consisting of the +program's name (as read by the +.B quis +function; see +.BR quis (3) for details), +a colon, a space, and the +.BR printf -style +formatted string +.I f +followed by a newline. This is a handy way to report nonfatal errors in +a program. +.PP +The +.B die +function emits a message to the standard error stream, just as for +.B moan +above, and then calls the +.B exit +function with argument +.I status +to halt the program. This is a handy way to report fatal errors in a +program. +.SH SEE ALSO +.BR exit (3), +.BR quis (3), +.BR mLib (3). +.SH AUTHOR +Mark Wooding,