glob(5) glob(5)
NAME
glob - pathname pattern-matching types
SYNOPSIS
#include <glob.h>
DESCRIPTION
The glob.h header defines the structures and symbolic constants used
by the glob(3C) function. The structure type globt contains at least
the following members:
size-t glpathc Count of paths matched by pattern.
char **glpathv Pointer to a list of matched pathnames.
sizet gloffs Slots to reserve at the beginning of glpathv.
The following constants are provided as values for the flags argument:
GLOBAPPEND Append generated pathnames to those previously
obtained.
GLOBDOOFFS Specify how many null pointers to add to the begin-
ning of pglob->glpathv.
GLOBERR Cause glob() to return on error.
GLOBMARK Each pathname that is a directory that matches pat-
tern has a slash appended.
GLOBNOCHECK If pattern does not match any pathname, then return
a list consisting of only pattern.
GLOBNOESCAPE Disable backslash escaping.
GLOBNOSORT Do not sort the pathnames returned.
The following constants are defined as error return values:
GLOBABORTED The scan was stopped because GLOBERR was set or
(*errfunc)() returned non-zero.
GLOBBADPAT An invalid pattern was specified.
GLOBNOMATCH The pattern does not match any existing pathname,
and GLOBNOCHECK was not set in flags.
GLOBNOSPACE An attempt to allocate memory failed.
GLOBNOSYS The implementation does not support this function.
Page 1 Reliant UNIX 5.44 Printed 11/98
glob(5) glob(5)
The following are declared as functions and may also be declared as
macros:
int glob(const char *pattern, int flags, int (*errfunc)
(const char *epath, int eerrno), globt *pglob);
void globfree (globt *pglob);
The implementation may define additional macros or constants using
names beginning with GLOB.
SEE ALSO
glob(3C).
Page 2 Reliant UNIX 5.44 Printed 11/98