Back to index

php5  5.3.10
Classes | Defines | Functions
glob.h File Reference
#include <sys/cdefs.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  glob_t

Defines

#define GLOB_APPEND   0x0001 /* Append to output from previous call. */
#define GLOB_DOOFFS   0x0002 /* Use gl_offs. */
#define GLOB_ERR   0x0004 /* Return on error. */
#define GLOB_MARK   0x0008 /* Append / to matching directories. */
#define GLOB_NOCHECK   0x0010 /* Return pattern itself if nothing matches. */
#define GLOB_NOSORT   0x0020 /* Don't sort. */
#define GLOB_ALTDIRFUNC   0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE   0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR   0x0100 /* Pattern had globbing characters. */
#define GLOB_NOMAGIC   0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE   0x0400 /* Quote special chars with \. */
#define GLOB_TILDE   0x0800 /* Expand tilde names from the passwd file. */
#define GLOB_NOESCAPE   0x1000 /* Disable backslash escaping. */
#define GLOB_LIMIT   0x2000 /* Limit pattern match output to ARG_MAX */
#define GLOB_NOSPACE   (-1) /* Malloc call failed. */
#define GLOB_ABORTED   (-2) /* Unignored error. */
#define GLOB_NOMATCH   (-3) /* No match and GLOB_NOCHECK not set. */
#define GLOB_NOSYS   (-4) /* Function not supported. */
#define GLOB_ABEND   GLOB_ABORTED

Functions

PHPAPI int glob (const char *, int, int(*)(const char *, int), glob_t *)
PHPAPI void globfree (glob_t *)

Define Documentation

#define GLOB_ABEND   GLOB_ABORTED

Definition at line 96 of file glob.h.

#define GLOB_ABORTED   (-2) /* Unignored error. */

Definition at line 93 of file glob.h.

#define GLOB_ALTDIRFUNC   0x0040 /* Use alternately specified directory funcs. */

Definition at line 81 of file glob.h.

#define GLOB_APPEND   0x0001 /* Append to output from previous call. */

Definition at line 73 of file glob.h.

#define GLOB_BRACE   0x0080 /* Expand braces ala csh. */

Definition at line 82 of file glob.h.

#define GLOB_DOOFFS   0x0002 /* Use gl_offs. */

Definition at line 74 of file glob.h.

#define GLOB_ERR   0x0004 /* Return on error. */

Definition at line 75 of file glob.h.

#define GLOB_LIMIT   0x2000 /* Limit pattern match output to ARG_MAX */

Definition at line 88 of file glob.h.

#define GLOB_MAGCHAR   0x0100 /* Pattern had globbing characters. */

Definition at line 83 of file glob.h.

#define GLOB_MARK   0x0008 /* Append / to matching directories. */

Definition at line 76 of file glob.h.

#define GLOB_NOCHECK   0x0010 /* Return pattern itself if nothing matches. */

Definition at line 77 of file glob.h.

#define GLOB_NOESCAPE   0x1000 /* Disable backslash escaping. */

Definition at line 87 of file glob.h.

#define GLOB_NOMAGIC   0x0200 /* GLOB_NOCHECK without magic chars (csh). */

Definition at line 84 of file glob.h.

#define GLOB_NOMATCH   (-3) /* No match and GLOB_NOCHECK not set. */

Definition at line 94 of file glob.h.

#define GLOB_NOSORT   0x0020 /* Don't sort. */

Definition at line 78 of file glob.h.

#define GLOB_NOSPACE   (-1) /* Malloc call failed. */

Definition at line 92 of file glob.h.

#define GLOB_NOSYS   (-4) /* Function not supported. */

Definition at line 95 of file glob.h.

#define GLOB_QUOTE   0x0400 /* Quote special chars with \. */

Definition at line 85 of file glob.h.

#define GLOB_TILDE   0x0800 /* Expand tilde names from the passwd file. */

Definition at line 86 of file glob.h.


Function Documentation

PHPAPI int glob ( const char *  ,
int  ,
int(*)(const char *, int ,
glob_t  
)
PHPAPI void globfree ( glob_t )

Definition at line 813 of file glob.c.

{
       register int i;
       register char **pp;

       if (pglob->gl_pathv != NULL) {
              pp = pglob->gl_pathv + pglob->gl_offs;
              for (i = pglob->gl_pathc; i--; ++pp)
                     if (*pp)
                            free(*pp);
              free(pglob->gl_pathv);
              pglob->gl_pathv = NULL;
       }
}

Here is the caller graph for this function: