Justin, Comments below:
> Included is a manpage for error(). Please consider including it. I am considering it. > .TH ERROR 3 "25 April 2006" GNU > .\" Please adjust this date whenever revising the manpage. No need for that last line. > .SH NAME > error \- glibc error handling functions > .SH SYNOPSIS > \fBextern void error(int \fIstatus, \fBint\fI errnum, \fBconst char > *\fIformat, \fB ...); > > \fBextern void error_at_line (int \fIstatus, \fBint \fIerrnum, > \fBconst char *\fIfname, \fBunsigned int \fIlineno, \fBconst char > *\fIformat, \fB...); > > \fBextern unsigned int \fIerror_message_count\fP; > > \fBextern void (* \fIerror_print_progname\fB) (void); > > .SH DESCRIPTION > \fBerror\fP For functions, write with "()", thus "error()". Please read my HOWTOHELP doc, which points you at fcntl.2 as an example of how things should be done. > is a glibc\-specific error handling function. You already say that it is glibc specific elsewhere. I will cut that. > It > outputs to stderr the program name, a colon, the message specified by > the printf format string \fIformat\fP, and, if \fIerrnum\fP is > nonzero, a second colon followed by the string given by > \fBperror(\fIerrnum\fB)\fR. A newline is printed in all cases. > > If \fIstatus\fP is set nonzero, then the program terminates with that > value as the exit status. > > If \fBerror_one_per_line\fP is set nonzero, and the > \fBerror_at_line\fP variant is used, then a series of consecutive > errors with the same value of \fIfname\fP and \fIlineno\fP causes only > one message to be output. The preprocessor values \fB__LINE__\fP and > \fB__FILE__\fP may be useful here, but other values can be used to > suppress other sets of messages. For example, \fIfname\fP could be > the name of an input file being processed, rather than the name of the > source file. > > \fIerror_message_count\fP is the count of times that > \fBerror\fP has been called. Actually counts number of messages printed. > This variable can be used to defer and > unify error handling for a large code block to a single common > handler. I'm not sure what you are meaning with the above. Please explain. > If \fIerror_print_progname\fP is set nonnull, then it is called > instead of prefixing the message with the program name and colon. > Note that when \fIerror_print_progname\fP is unset, \fIstdout\fP is > cleared before printing to \fIstderr\fP. Where so you glean this piece of information from? > .SH NOTES > If output from \fBerror\fP is supressed by \fBerror_one_per_line\fP, then > \fBerror_message_count\fP is not increased, but this seems to be > undocumented behaviour and could change in the future, so should not > be relied upon. I would probably write this differently. I think the glibc page is simply unclear. i think it means just to say that this variable counts the number of messages. > .SH "CONFORMING TO" > These functions and variables are GNU extensions, and should not be > used in programs intending to be portable. Cheers, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]