rpm 5.3.12
Defines | Functions
rpmio/glob.c File Reference
#include "system.h"
#include <stddef.h>
#include <assert.h>
#include <errno.h>
Include dependency graph for glob.c:

Go to the source code of this file.

Defines

#define __alloca   alloca
#define __stat   stat
#define NAMLEN(_d)   NLENGTH(_d)
#define CONVERT_D_NAMLEN(d64, d32)   (d64)->d_namlen = (d32)->d_namlen;
#define CONVERT_D_INO(d64, d32)   (d64)->d_ino = (d32)->d_ino;
#define CONVERT_D_TYPE(d64, d32)
#define CONVERT_DIRENT_DIRENT64(d64, d32)
#define REAL_DIR_ENTRY(dp)   (dp->d_ino != 0)
#define __set_errno(val)   errno = (val)
#define NAME_MAX   255
#define GLOB_INTERFACE_VERSION   1
#define DIRSEP_CHAR   '/'

Functions

static const char * next_brace_sub ()
static int glob_in_dir ()
static int prefix_array ()
static int collated_compare ()
static const char * next_brace_sub (const char *begin)
static int __glob_pattern_p (const char *pattern, int quote)
int glob64 (const char *pattern, int flags, int(*errfunc)(), glob64_t *pglob)
void globfree64 (glob64_t *pglob)
static int collated_compare (const char *a, const char *b)
static int prefix_array (const char *dirname, char **array, size_t n)
static int glob_in_dir (const char *pattern, const char *directory, int flags, int(*errfunc)(), glob64_t *pglob)

Define Documentation

#define __alloca   alloca

Definition at line 56 of file glob.c.

Referenced by glob64(), and glob_in_dir().

#define __set_errno (   val)    errno = (val)

Definition at line 98 of file glob.c.

Referenced by glob64(), and glob_in_dir().

#define __stat   stat

Definition at line 57 of file glob.c.

Referenced by glob64(), and glob_in_dir().

#define CONVERT_D_INO (   d64,
  d32 
)    (d64)->d_ino = (d32)->d_ino;

Definition at line 71 of file glob.c.

#define CONVERT_D_NAMLEN (   d64,
  d32 
)    (d64)->d_namlen = (d32)->d_namlen;

Definition at line 64 of file glob.c.

#define CONVERT_D_TYPE (   d64,
  d32 
)

Definition at line 79 of file glob.c.

#define CONVERT_DIRENT_DIRENT64 (   d64,
  d32 
)
Value:
memcpy ((d64)->d_name, (d32)->d_name, NAMLEN (d32) + 1);                      \
  CONVERT_D_NAMLEN (d64, d32)                                                 \
  CONVERT_D_INO (d64, d32)                                                    \
  CONVERT_D_TYPE (d64, d32)

Definition at line 82 of file glob.c.

Referenced by glob_in_dir().

#define DIRSEP_CHAR   '/'

Referenced by prefix_array().

#define GLOB_INTERFACE_VERSION   1

Definition at line 108 of file glob.c.

#define NAME_MAX   255

Definition at line 102 of file glob.c.

Referenced by glob_in_dir().

#define NAMLEN (   _d)    NLENGTH(_d)

Definition at line 58 of file glob.c.

Referenced by glob_in_dir().

#define REAL_DIR_ENTRY (   dp)    (dp->d_ino != 0)

Definition at line 93 of file glob.c.

Referenced by glob_in_dir().


Function Documentation

static int __glob_pattern_p ( const char *  pattern,
int  quote 
) [static]

Definition at line 977 of file glob.c.

Referenced by glob64(), and glob_in_dir().

static int collated_compare ( const char *  a,
const char *  b 
) [static]

Definition at line 892 of file glob.c.

static int collated_compare ( ) [static]

Referenced by glob64().

int glob64 ( const char *  pattern,
int  flags,
int(*)()  errfunc,
glob64_t *  pglob 
)
static int glob_in_dir ( ) [static]

Referenced by glob64().

static int glob_in_dir ( const char *  pattern,
const char *  directory,
int  flags,
int(*)()  errfunc,
glob64_t *  pglob 
) [static]
void globfree64 ( glob64_t *  pglob)

Definition at line 877 of file glob.c.

References __ptr_t, glob_t::gl_pathc, and glob_t::gl_pathv.

static const char* next_brace_sub ( ) [inline, static]

Referenced by glob64().

static const char* next_brace_sub ( const char *  begin) [inline, static]

Definition at line 128 of file glob.c.

static int prefix_array ( const char *  dirname,
char **  array,
size_t  n 
) [static]

Definition at line 912 of file glob.c.

References __ptr_t, DIRSEP_CHAR, and xmalloc().

static int prefix_array ( ) [static]

Referenced by glob64().