Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/lib/ape/man/0/glob.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "<glob.h>" 0P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" <glob.h> 
.SH NAME
glob.h \- pathname pattern-matching types
.SH SYNOPSIS
.LP
\fB#include <glob.h>\fP
.SH DESCRIPTION
.LP
The \fI<glob.h>\fP header shall define the structures and symbolic
constants used by the \fIglob\fP() function.
.LP
The structure type \fBglob_t\fP shall contain at least the following
members:
.sp
.RS
.nf

\fBsize_t   gl_pathc\fP Count of paths matched by \fIpattern.\fP \fB
char   **gl_pathv\fP Pointer to a list of matched pathnames. \fB
size_t   gl_offs \fP Slots to reserve at the beginning of \fIgl_pathv.\fP \fB
\fP
.fi
.RE
.LP
The following constants shall be provided as values for the \fIflags\fP
argument:
.TP 7
GLOB_APPEND
Append generated pathnames to those previously obtained.
.TP 7
GLOB_DOOFFS
Specify how many null pointers to add to the beginning of \fIgl_pathv\fP.
.TP 7
GLOB_ERR
Cause \fIglob\fP() to return on error.
.TP 7
GLOB_MARK
Each pathname that is a directory that matches \fIpattern\fP has a
slash appended.
.TP 7
GLOB_NOCHECK
If \fIpattern\fP does not match any pathname, then return a list consisting
of only \fIpattern\fP.
.TP 7
GLOB_NOESCAPE
Disable backslash escaping.
.TP 7
GLOB_NOSORT
Do not sort the pathnames returned.
.sp
.LP
The following constants shall be defined as error return values:
.TP 7
GLOB_ABORTED
The scan was stopped because GLOB_ERR was set or (*\fIerrfunc\fP)()
returned non-zero.
.TP 7
GLOB_NOMATCH
The pattern does not match any existing pathname, and GLOB_NOCHECK
was not set in \fIflags\fP.
.TP 7
GLOB_NOSPACE
An attempt to allocate memory failed.
.TP 7
GLOB_NOSYS
Reserved. 
.sp
.LP
The following shall be declared as functions and may also be defined
as macros. Function prototypes shall be provided.
.sp
.RS
.nf

\fBint  glob(const char *restrict, int, int (*)(const char *, int),
         glob_t *restrict);
void globfree (glob_t *);
\fP
.fi
.RE
.LP
The implementation may define additional macros or constants using
names beginning with GLOB_.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIglob\fP(),
the Shell
and Utilities volume of IEEE\ Std\ 1003.1-2001
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].