OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / wordexp.3
index 4a30b32..ff22e11 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
@@ -16,9 +17,9 @@
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
 .TH WORDEXP 3 2008-07-14  "" "Linux Programmer's Manual"
 .SH NAME
@@ -61,7 +62,7 @@ that gives the number of words in the expansion of
 The field
 .I we_wordv
 is a
-.I char **
+.I "char\ **"
 that points to the array of words found.
 The field
 .I we_offs
@@ -80,7 +81,7 @@ More precisely, it does not free
 its argument, but it frees the array
 .I we_wordv
 and the strings that points to.
-.SS "The string argument"
+.SS The string argument
 Since the expansion is the same as the expansion by the shell (see
 .BR sh (1))
 of the parameters to a command, the string
@@ -96,7 +97,7 @@ If the argument
 contains a word that starts with an unquoted comment character #,
 then it is unspecified whether that word and all following words
 are ignored, or the # is treated as a non-comment character.
-.SS "The expansion"
+.SS The expansion
 The expansion done consists of the following stages:
 tilde expansion (replacing ~user by user's home directory),
 variable substitution (replacing $FOO by the value of the environment
@@ -109,11 +110,11 @@ The result of expansion of special parameters
 .LP
 Field splitting is done using the environment variable $IFS.
 If it is not set, the field separators are space, tab and newline.
-.SS "The output array"
+.SS The output array
 The array
 .I we_wordv
 contains the words found, followed by a NULL.
-.SS "The flags argument"
+.SS The flags argument
 The
 .I flag
 argument is a bitwise inclusive OR of the following values:
@@ -153,7 +154,7 @@ is not to be redirected.
 .TP
 .B WRDE_UNDEF
 Consider it an error if an undefined shell variable is expanded.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 In case of success 0 is returned.
 In case of error
 one of the following five values is returned.
@@ -183,7 +184,7 @@ unmatched quotes.
 and
 .BR wordfree ()
 are provided in glibc since version 2.1.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 POSIX.1-2001.
 .SH EXAMPLE
 The output of the following example program
@@ -201,7 +202,7 @@ main(int argc, char **argv)
     char **w;
     int i;
 
-    wordexp("[a-c]*.c", &p, 0);
+    wordexp("[a\-c]*.c", &p, 0);
     w = p.we_wordv;
     for (i = 0; i < p.we_wordc; i++)
         printf("%s\en", w[i]);
@@ -209,6 +210,14 @@ main(int argc, char **argv)
     exit(EXIT_SUCCESS);
 }
 .fi
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR fnmatch (3),
 .BR glob (3)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.