X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/59e0d9fe772464b93d835d2a2964457702469a43..6990d062918770ee2431fb3310826c5aefbffccd:/gen/FreeBSD/glob.3 diff --git a/gen/FreeBSD/glob.3 b/gen/FreeBSD/glob.3 index ce07fdd..4473427 100644 --- a/gen/FreeBSD/glob.3 +++ b/gen/FreeBSD/glob.3 @@ -11,10 +11,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -32,9 +28,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.23 2003/02/04 16:28:04 mikeh Exp $ +.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.32 2007/01/09 00:27:54 imp Exp $ .\" -.Dd April 16, 1994 +.Dd September 1, 2004 .Dt GLOB 3 .Os .Sh NAME @@ -57,15 +53,15 @@ is a pathname generator that implements the rules for file name pattern matching used by the shell. .Pp The include file -.Pa glob.h +.In glob.h defines the structure type .Fa glob_t , which contains at least the following fields: .Bd -literal typedef struct { - int gl_pathc; /* count of total paths so far */ - int gl_matchc; /* count of paths matching pattern */ - int gl_offs; /* reserved at beginning of gl_pathv */ + size_t gl_pathc; /* count of total paths so far */ + size_t gl_matchc; /* count of paths matching pattern */ + size_t gl_offs; /* reserved at beginning of gl_pathv */ int gl_flags; /* returned flags */ char **gl_pathv; /* list of paths matching pattern */ } glob_t; @@ -121,7 +117,7 @@ is the bitwise inclusive .Tn OR of any of the following values defined in -.Pa glob.h : +.In glob.h : .Bl -tag -width GLOB_ALTDIRFUNC .It Dv GLOB_APPEND Append pathnames generated to the ones from a previous call (or calls) @@ -376,7 +372,7 @@ If terminates due to an error, it sets errno and returns one of the following non-zero constants, which are defined in the include file -.Aq Pa glob.h : +.In glob.h : .Bl -tag -width GLOB_NOCHECK .It Dv GLOB_NOSPACE An attempt to allocate memory failed, or if @@ -423,12 +419,16 @@ execvp("ls", g.gl_pathv); .Xr fnmatch 3 , .Xr regexp 3 .Sh STANDARDS -The +The current implementation of the .Fn glob -function is expected to be -.St -p1003.2 -compatible with the exception -that the flags +function +.Em does not +conform to +.St -p1003.2 . +Collating symbol expressions, equivalence class expressions and +character class expressions are not supported. +.Pp +The flags .Dv GLOB_ALTDIRFUNC , .Dv GLOB_BRACE , .Dv GLOB_LIMIT , @@ -440,8 +440,10 @@ and the fields .Fa gl_matchc and .Fa gl_flags -should not be used by applications striving for strict +are extensions to the .Tn POSIX +standard and +should not be used by applications striving for strict conformance. .Sh HISTORY The