aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Helmer <ghelmer@FreeBSD.org>2000-05-23 19:52:35 +0000
committerGuy Helmer <ghelmer@FreeBSD.org>2000-05-23 19:52:35 +0000
commitb4183771fd8ab7a5946fd38df04c1e24b1268bea (patch)
tree5a2d3bbd4b28be6f1fe5aadacdaa961c0a3c83c8
parentcbd280c6e0ecff8141b41ba23339c0e39287da15 (diff)
downloadsrc-b4183771fd8ab7a5946fd38df04c1e24b1268bea.tar.gz
src-b4183771fd8ab7a5946fd38df04c1e24b1268bea.zip
Describe errx/warnx in comparison to errc/warnc/err/warn.
Use .Fa instead of .Va for function arguments. Reviewed by: sheldonh
Notes
Notes: svn path=/head/; revision=60832
-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 d13525ab924a..413441bd0c13 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