summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghelmer <ghelmer@FreeBSD.org>2000-05-23 19:52:35 +0000
committerghelmer <ghelmer@FreeBSD.org>2000-05-23 19:52:35 +0000
commite814d2a0db522b0f163eef55a56d05aa226951f3 (patch)
tree1da11721b681774bb178bb312367ffc2820d4b98
parenta59616f51a9be8065a881e22420fcce648129f82 (diff)
downloadFreeBSD-src-e814d2a0db522b0f163eef55a56d05aa226951f3.zip
FreeBSD-src-e814d2a0db522b0f163eef55a56d05aa226951f3.tar.gz
Describe errx/warnx in comparison to errc/warnc/err/warn.
Use .Fa instead of .Va for function arguments. Reviewed by: sheldonh
-rw-r--r--lib/libc/gen/err.345
1 files changed, 33 insertions, 12 deletions
diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3
index d13525a..413441b 100644
--- a/lib/libc/gen/err.3
+++ b/lib/libc/gen/err.3
@@ -96,8 +96,29 @@ function.
In all cases, the last component of the program name, a colon character,
and a space are output.
If the
-.Va fmt
+.Fa fmt
argument is not NULL, the formatted error message is output.
+The output is terminated by a newline character.
+.Pp
+The
+.Fn err ,
+.Fn errc ,
+.Fn verr ,
+.Fn verrc ,
+.Fn warn ,
+.Fn warnc ,
+.Fn vwarn ,
+and
+.Fn vwarnc
+functions append an error message obtained from
+.Xr strerror 3
+based on a code or the global variable
+.Va errno ,
+preceeded by another colon and space unless the
+.Fa fmt
+argument is
+.Dv NULL .
+.Pp
In the case of the
.Fn errc ,
.Fn verrc ,
@@ -105,11 +126,9 @@ In the case of the
and
.Fn vwarnc
functions,
-the error message string affiliated with the
-.Va code
-argument is also output,
-preceded by another colon and space if necessary.
-In all cases, the output is followed by a newline character.
+the
+.Fa code
+argument is used to look up the error message.
.Pp
The
.Fn err ,
@@ -119,11 +138,13 @@ and
.Fn vwarn
functions use the global variable
.Va errno
-rather than the
-.Va code
-argument of the
-.Fn errc
-family
+to look up the error message.
+.Pp
+The
+.Fn errx
+and
+.Fn warnx
+functions do not append an error message.
.Pp
The
.Fn err ,
@@ -146,7 +167,7 @@ The
.Fn err_set_file
function sets the output stream used by the other functions.
Its
-.Va vfp
+.Fa vfp
argument must be either a pointer to an open stream
(possibly already converted to void *)
or a null pointer
OpenPOWER on IntegriCloud