X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/ad3c9f2af814c84582fdd1649e49ec4f68572c5a..aa54d2fad3d9038b43475aa93c76795c5141a993:/gen/FreeBSD/glob.3 diff --git a/gen/FreeBSD/glob.3 b/gen/FreeBSD/glob.3 index a71c96b..75bebc4 100644 --- a/gen/FreeBSD/glob.3 +++ b/gen/FreeBSD/glob.3 @@ -11,7 +11,7 @@ .\" 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. -.\" 4. Neither the name of the University nor the names of its contributors +.\" 3. 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. .\" @@ -28,40 +28,24 @@ .\" SUCH DAMAGE. .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.32 2007/01/09 00:27:54 imp Exp $ +.\" $FreeBSD$ .\" -.Dd May 20, 2008 +.Dd June 11, 2017 .Dt GLOB 3 .Os .Sh NAME .Nm glob , -#ifdef UNIFDEF_BLOCKS .Nm glob_b , -#endif .Nm globfree .Nd generate pathnames matching a pattern .Sh SYNOPSIS .In glob.h .Ft int -.Fo glob -.Fa "const char *restrict pattern" -.Fa "int flags" -.Fa "int (*errfunc)(const char *epath, int errno)" -.Fa "glob_t *restrict pglob" -.Fc -#ifdef UNIFDEF_BLOCKS +.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *epath, int errno)" "glob_t * restrict pglob" .Ft int -.Fo glob_b -.Fa "const char *restrict pattern" -.Fa "int flags" -.Fa "int (^errblk)(const char *epath, int errno)" -.Fa "glob_t *restrict pglob" -.Fc -#endif +.Fn glob_b "const char * restrict pattern" "int flags" "int (^errblk)(const char *epath, int errno)" "glob_t * restrict pglob" .Ft void -.Fo globfree -.Fa "glob_t *pglob" -.Fc +.Fn globfree "glob_t *pglob" .Sh DESCRIPTION The .Fn glob @@ -211,7 +195,7 @@ If is set, backslash escaping is disabled. .It Dv GLOB_NOSORT By default, the pathnames are sorted in ascending -.Tn ASCII +collation order; this flag prevents that sorting (speeding up .Fn glob ) . @@ -339,7 +323,6 @@ is or .Fa errfunc returns zero, the error is ignored. -#ifdef UNIFDEF_BLOCKS .Pp The .Fn glob_b @@ -347,30 +330,21 @@ function is like .Fn glob except that the error callback is a block pointer instead of a function pointer. -#endif .Pp The .Fn globfree function frees any space associated with .Fa pglob from a previous call(s) to -#ifdef UNIFDEF_BLOCKS .Fn glob or .Fn glob_b . -#else -.Fn glob . -#endif .Sh RETURN VALUES On successful completion, .Fn glob -#ifdef UNIFDEF_BLOCKS and .Fn glob_b return zero. -#else -returns zero. -#endif In addition, the fields of .Fa pglob contain the values described below: @@ -379,22 +353,16 @@ contain the values described below: contains the total number of matched pathnames so far. This includes other matches from previous invocations of .Fn glob -#ifdef UNIFDEF_BLOCKS or .Fn glob_b -#endif if .Dv GLOB_APPEND was specified. .It Fa gl_matchc contains the number of matched pathnames in the current invocation of -#ifdef UNIFDEF_BLOCKS .Fn glob or .Fn glob_b . -#else -.Fn glob . -#endif .It Fa gl_flags contains a copy of the .Fa flags @@ -417,10 +385,8 @@ are undefined. .Pp If .Fn glob -#ifdef UNIFDEF_BLOCKS or .Fn glob_b -#endif terminates due to an error, it sets errno and returns one of the following non-zero constants, which are defined in the include file @@ -429,7 +395,7 @@ file .It Dv GLOB_NOSPACE An attempt to allocate memory failed, or if .Fa errno -was 0 +was E2BIG, .Dv GLOB_LIMIT was specified in the flags and .Fa pglob\->gl_matchc @@ -469,13 +435,9 @@ execvp("ls", g.gl_pathv); .Sh CAVEATS The .Fn glob -#ifdef UNIFDEF_BLOCKS and .Fn glob_b functions -#else -function -#endif will not match filenames that begin with a period unless this is specifically requested (e.g., by ".*"). .Sh SEE ALSO @@ -516,11 +478,9 @@ and .Fn globfree functions first appeared in .Bx 4.4 . -#ifdef UNIFDEF_BLOCKS The .Fn glob_b function first appeared in Mac OS X 10.6. -#endif .Sh BUGS Patterns longer than .Dv MAXPATHLEN @@ -528,13 +488,9 @@ may cause unchecked errors. .Pp The .Fn glob -#ifdef UNIFDEF_BLOCKS and .Fn glob_b functions -#else -function -#endif may fail and set errno for any of the errors specified for the library routines .Xr stat 2 ,