aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/wordexp.3
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2003-06-01 19:19:59 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2003-06-01 19:19:59 +0000
commit0e35e492fcbda3368c44c083ea1a21edbe11d997 (patch)
treef495bf3128d9be6ce3ff5718a8f276d66156a67a /lib/libc/gen/wordexp.3
parentd8f9e010d2b854e69c4cf128e850f55c7704731e (diff)
downloadsrc-0e35e492fcbda3368c44c083ea1a21edbe11d997.tar.gz
src-0e35e492fcbda3368c44c083ea1a21edbe11d997.zip
Notes
Diffstat (limited to 'lib/libc/gen/wordexp.3')
-rw-r--r--lib/libc/gen/wordexp.334
1 files changed, 14 insertions, 20 deletions
diff --git a/lib/libc/gen/wordexp.3 b/lib/libc/gen/wordexp.3
index 7cddc088e449..dac41d04e27e 100644
--- a/lib/libc/gen/wordexp.3
+++ b/lib/libc/gen/wordexp.3
@@ -36,15 +36,9 @@
.Sh SYNOPSIS
.In wordexp.h
.Ft int
-.Fo wordexp
-.Fa "const char * restrict words"
-.Fa "wordexp_t * restrict we"
-.Fa "int flags"
-.Fc
+.Fn wordexp "const char * restrict words" "wordexp_t * restrict we" "int flags"
.Ft void
-.Fo wordfree
-.Fa "wordexp_t *we"
-.Fc
+.Fn wordfree "wordexp_t *we"
.Sh DESCRIPTION
The
.Fn wordexp
@@ -53,16 +47,16 @@ function performs shell-style word expansion on
and places the list of words into the
.Va we_wordv
member of
-.Va we ,
+.Fa we ,
and the number of words into
.Va we_wordc .
.Pp
The
-.Va flags
+.Fa flags
argument is the bitwise inclusive OR of any of the following constants:
.Bl -tag -width ".Dv WRDE_SHOWERR"
.It Dv WRDE_APPEND
-Append the words to those generate by a previous call to
+Append the words to those generated by a previous call to
.Fn wordexp .
.It Dv WRDE_DOOFS
As many
@@ -70,7 +64,7 @@ As many
pointers as are specified by the
.Va we_offs
member of
-.Va we
+.Fa we
are added to the front of
.Va we_wordv .
.It Dv WRDE_NOCMD
@@ -81,7 +75,7 @@ See the note in
before using this.
.It Dv WRDE_REUSE
The
-.Va we
+.Fa we
argument was passed to a previous successful call to
.Fn wordexp
but has not been passed to
@@ -97,13 +91,13 @@ Report error on an attempt to expand an undefined shell variable.
The
.Vt wordexp_t
structure is defined in
-.Pa wordexp.h
+.Aq Pa wordexp.h
as:
.Bd -literal -offset indent
typedef struct {
- size_t we_wordc; /* count of words matched */
- char **we_wordv; /* pointer to list of words */
- size_t we_offs; /* slots to reserve in we_wordv */
+ size_t we_wordc; /* count of words matched */
+ char **we_wordv; /* pointer to list of words */
+ size_t we_offs; /* slots to reserve in we_wordv */
} wordexp_t;
.Ed
.Pp
@@ -127,7 +121,7 @@ error codes:
The
.Fa words
argument contains one of the following unquoted characters:
-<newline>,
+.Aq newline ,
.Ql | ,
.Ql & ,
.Ql \&; ,
@@ -164,8 +158,8 @@ Field separator.
.El
.Sh EXAMPLES
Invoke the editor on all
-.Dq Li \&.c
-files in the current directory,
+.Pa .c
+files in the current directory
and
.Pa /etc/motd
(error checking omitted):