51 lines
1.6 KiB
Groff
51 lines
1.6 KiB
Groff
|
. \" Manual Seite fuer comerrno
|
||
|
. \" @(#)comerrno.3 1.1
|
||
|
. \"
|
||
|
.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
|
||
|
.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
|
||
|
.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
|
||
|
.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
|
||
|
.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
|
||
|
.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
|
||
|
.if t .ds s \(*b
|
||
|
.if t .ds S SS
|
||
|
.if n .ds a ae
|
||
|
.if n .ds o oe
|
||
|
.if n .ds u ue
|
||
|
.if n .ds s sz
|
||
|
.TH COMERRNO 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS"
|
||
|
.SH NAME
|
||
|
comerrno() \- prints error message, given error code, and
|
||
|
exits
|
||
|
.SH SYNOPSIS
|
||
|
.nf
|
||
|
.B
|
||
|
comerrno(error,format,args);
|
||
|
.B int error;
|
||
|
.B char *format;
|
||
|
.fi
|
||
|
.SH DESCRIPTION
|
||
|
comerrno() is like comerr(), except that the caller supplies the
|
||
|
error number. Positive numbers are turned into system error
|
||
|
messages. Negative numbers cause the system error portion of
|
||
|
the output to be omitted.
|
||
|
comerrno() is a convenient way to print the name of the program,
|
||
|
and an error message, and exit the process in a single call.
|
||
|
.SH RETURNS
|
||
|
none
|
||
|
.br
|
||
|
Rather than return, comerrno() exits the current process with a
|
||
|
value equal to the error number supplied by the user.
|
||
|
.SH EXAMPLES
|
||
|
.nf
|
||
|
if (argc < 2)
|
||
|
comerrno(-1, "Usage: name arg.\\n");
|
||
|
.fi
|
||
|
.SH "SEE ALSO"
|
||
|
comerr(3), error(3), errmsg(3), error(3) geterrno(3), printf(3), format(3)
|
||
|
.SH NOTES
|
||
|
comerrno() attempts to find a line in the message file that
|
||
|
corresponds to the system error number. If none can be found,
|
||
|
or if it has trouble finding or reading the file, it simply
|
||
|
says: error #.
|