w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

glob.c File Reference
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
#include <stdio.h>
#include <pwd.h>
#include <string.h>
#include <fnmatch.h>
#include <glob.h>
Include dependency graph for glob.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE   1
 
#define GLOB_INTERFACE_VERSION   1
 
#define __set_errno(val)   errno = (val)
 
#define NULL   0
 
#define dirent   direct
 
#define NAMLEN(dirent)   (dirent)->d_namlen
 
#define REAL_DIR_ENTRY(dp)   (dp->d_ino != 0)
 
#define ANSI_STRING
 
#define strcoll   strcmp
 
#define realloc   my_realloc
 
#define __stat   stat
 
#define S_ISDIR(mode)   (((mode) & S_IFMT) == S_IFDIR)
 
#define size_t   unsigned int
 
#define __alloca   alloca
 
#define DIRSEP_CHAR   '/'
 

Functions

char * getenv ()
 
char * malloc ()
 
void free ()
 
void qsort ()
 
void abort ()
 
void exit ()
 
static char * my_realloc (char *p, unsigned int n)
 
char * alloca ()
 
char *getlogin __P ((void))
 
static const char *next_brace_sub __P ((const char *begin))
 
static int glob_in_dir __P ((const char *pattern, const char *directory, int flags, int(*errfunc)(const char *, int), glob_t *pglob))
 
static int prefix_array __P ((const char *prefix, char **array, unsigned int n))
 
static int collated_compare __P ((const __ptr_t, const __ptr_t))
 
int __glob_pattern_p __P ((const char *pattern, int quote))
 
static const char * next_brace_sub (char *begin) const
 
int glob (char *pattern, int flags, int *errfunc, glob_t *pglob) const
 
void globfree (glob_t *pglob)
 
static int collated_compare (__ptr_t a, const __ptr_t b) const
 
static int prefix_array (char *dirname, char **array, unsigned int n) const
 
int __glob_pattern_p (char *pattern, int quote) const
 
static int glob_in_dir (char *pattern, const char *directory, int flags, int *errfunc, glob_t *pglob) const
 

Variables

int errno
 

Macro Definition Documentation

◆ __alloca

#define __alloca   alloca

Definition at line 284 of file glob.c.

◆ __set_errno

#define __set_errno (   val)    errno = (val)

Definition at line 83 of file glob.c.

◆ __stat

#define __stat   stat

Definition at line 232 of file glob.c.

◆ _GNU_SOURCE

#define _GNU_SOURCE   1

Definition at line 30 of file glob.c.

◆ ANSI_STRING

#define ANSI_STRING

Definition at line 143 of file glob.c.

◆ dirent

Definition at line 95 of file glob.c.

◆ DIRSEP_CHAR

#define DIRSEP_CHAR   '/'

◆ GLOB_INTERFACE_VERSION

#define GLOB_INTERFACE_VERSION   1

Definition at line 52 of file glob.c.

◆ NAMLEN

#define NAMLEN (   dirent)    (dirent)->d_namlen

Definition at line 96 of file glob.c.

◆ NULL

#define NULL   0

Definition at line 87 of file glob.c.

◆ REAL_DIR_ENTRY

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

Definition at line 130 of file glob.c.

◆ realloc

char * realloc   my_realloc

Definition at line 206 of file glob.c.

Referenced by __caryll_reallocate(), __gmp_default_reallocate(), _cmsReallocDefaultFn(), _Ex_AddArgument(), _Ex_ExpandIndirectFile(), _GP_AddArgument(), _IVParse(), _lzw_buf_grow(), _synctex_decode_string(), _TIFFrealloc(), addChar(), AddEncodedName(), AddExtensionBlock(), addflood(), addFold(), addkernpair(), AddMacName(), AddSerifOrBall(), AddToStem(), AddWordToBlock(), hb_vector_t< Type >::alloc(), allocate_mem(), AnchorsAway(), append(), assign_points_to_edge(), AssignStemToPoint(), bm_resize(), BreakSubroutine(), build_string_grow(), charstring_byte(), checked_realloc(), CheckForNewlines(), ck_realloc(), Clp_AddStringListType(), Clp_AddType(), Compiler::Compiler(), ctest_libRealloc(), define_font(), DGifGetImageDesc(), dogeninstructions(), dumpGPOSpairpos(), dumpGSUBligdata(), DVIGetCommand(), EncMapFromEncoding(), hb_buffer_t::enlarge(), extend(), FcCharLeafEntCreate(), FcCharSetPutLeaf(), FcFontSetAdd(), FcInitLoadOwnConfig(), FcObjectSetAdd(), fconcisecontour(), FcParseCacheDir(), FcParseInclude(), FcPatternObjectInsertElt(), FcScandir(), FcStrBufChar(), FindFonts(), FindOrMakeNewFeatureLookup(), findpath(), FindSubs(), FormedScripts(), FPSTGlyphToClass(), ft_realloc(), gabc_notes_determination_realloc(), gabc_score_determination_realloc(), gdRealloc(), get_avail(), get_dir(), getquotedeol(), gm_resize(), gmp_default_realloc(), grealloc(), gregorio_realloc(), gregorio_vowel_rulefile_realloc(), grow_build_string(), GrowBuffer(), hb_blob_create_from_file(), hnj_realloc(), icatalloc(), init_cvt(), init_fpgm(), init_maxp(), init_node_mem(), init_prep(), input_file(), intarray_set(), kpathsea_find_file_generic(), l_alloc(), l_CHAR(), LUAUI__LogError(), LUAUI_IError(), main(), MakeSavedImage(), MMMatchGlyphs(), morx_dumpLigaFeature(), mrb_default_allocf(), my_luaalloc(), my_realloc(), myrealloc(), names_add(), NeedsVariationSequenceTable(), nkf_xrealloc(), optimize_edge(), ParsePSArray(), parserCreate(), pfed_read_spiro_contour(), pfed_read_ucs2_len(), pfed_readotherlayers(), pixman_rect_alloc(), pm_read_unknown_size(), ppmd_fill_drawproc(), prescan_entry(), priv_xrealloc(), psscan(), push(), push_fail_stack(), push_link_target(), re_alloc(), read_cfg(), readEntireStdin(), readFile(), ReadInputFileNames(), graphite2::Pass::readRules(), ReadUptoMatch(), realloc_buffer(), realloc_font(), realloc_font_info(), realloc_hyphen(), realloc_input_stack(), realloc_mem(), realloc_nest_stack(), realloc_param_stack(), realloc_save_stack(), realloc_str_pool(), realloc_str_start(), realloc_virfinfo(), renew(), graphite2::Vector< T >::reserve(), reserve_code(), resize_buffer(), resource_parser_update(), saferealloc(), scanfont(), scanpages(), search_edge(), setup_add(), SFAddScriptLangIndex(), SFD_GetFontMetaData(), SFDGetChar(), SFDGetSpiros(), SFDGetTtInstrs(), SFDGetTtTable(), SFDLookupList(), SFDParseJustify(), SFDParseLookup(), SFDParseMMSubroutine(), SFDReadUTF7Str(), SFDSetEncMap(), SFDSizeMap(), SFDUnPickle(), SFFeaturesInScriptLang(), SFJstfSort(), SFLangsInScript(), SFLigaturePrepare(), SFLookupsInScriptLangFeature(), SFMatchGlyphs(), SFScriptsInLookups(), slow_get_node(), spc_handler_ps_header(), spc_handler_ps_tricks_bput(), spc_handler_ps_tricks_brotate(), spc_handler_xtx_bscale(), SplineFont2FullSubrs2(), StartNextSubroutine(), tfm_open(), tfmload(), TT_Realloc(), TTF__getcvtval(), util_realloc(), validate(), vasprintf(), xrealloc(), and yyrealloc().

◆ S_ISDIR

#define S_ISDIR (   mode)    (((mode) & S_IFMT) == S_IFDIR)

Definition at line 237 of file glob.c.

◆ size_t

#define size_t   unsigned int

Definition at line 257 of file glob.c.

◆ strcoll

#define strcoll   strcmp

Definition at line 176 of file glob.c.

Function Documentation

◆ __glob_pattern_p()

int __glob_pattern_p ( char *  pattern,
int  quote 
) const

Definition at line 1181 of file glob.c.

References open, p, and quote.

◆ __P() [1/6]

◆ __P() [2/6]

static const char* next_brace_sub __P ( (const char *begin )
static

◆ __P() [3/6]

static int glob_in_dir __P ( (const char *pattern, const char *directory, int flags, int(*errfunc)(const char *, int), glob_t *pglob)  )
static

◆ __P() [4/6]

int __glob_pattern_p __P ( (const char *pattern, int quote )

◆ __P() [5/6]

static int prefix_array __P ( (const char *prefix, char **array, unsigned int n )
static

◆ __P() [6/6]

char* getlogin __P ( (void )

◆ abort()

void abort ( )

Referenced by __gmp_assert_fail(), __gmp_default_allocate(), __gmp_default_free(), __gmp_default_reallocate(), __gmp_exception(), __gmp_invalid_operation(), __gmp_tmp_debug_alloc(), __gmp_tmp_debug_free(), __gmp_tmp_debug_mark(), __gmpz_init2(), __gmpz_n_pow_ui(), __gmpz_realloc(), __gmpz_realloc2(), _FcObjectLookupOtherTypeByName(), ErrorHandler::account(), add_gray_list(), alloca(), AllocateMemoryCell(), ar_name_equal(), assertisfloat(), assertisint(), assertpath(), avl_dup(), brw_lookup_label(), checked_malloc(), checked_realloc(), child_access(), convertpng(), drvPPTX::create_pptx(), drvPPTX::create_pptx_file(), decode_switches(), default_trap(), define_makeflags(), do_variable_definition(), drvWMF::drawPoly(), drvPPTX::drvPPTX(), emulate_cc_new(), encode(), drvPPTX::eot2texinfo(), exc_throw(), ErrorHandler::fatal(), FcCompareSize(), fcheckcv(), fgetcvdir(), fixcvdir(), fixcvends(), freerule(), func_origin(), g_malloc(), Array::get(), Array::getNF(), gmalloc(), gmallocn(), gmallocn3(), gmp_die(), grealloc(), greallocn(), gsfax_xalloc(), icheckcv(), igetcvdir(), jbig2_encode_generic(), jbig2_pages_complete(), jbig2_produce_page(), jbig2enc_int(), jbig2enc_textregion(), ErrorHandler::lfatal(), drvNOI::LoadNOIProxy(), luaD_throw(), main(), maininit(), memchr(), mpfr_abort_prec_max(), mpfr_assert_fail(), mrb_vm_exec(), panic(), pdftex_fail(), png_safe_error(), drvPPTX::print_color(), drvASY::print_coords(), drvCAIRO::print_coords(), drvCFDG::print_coords(), drvHPGL::print_coords(), drvJAVA::print_coords(), drvJAVA2::print_coords(), drvKontour::print_coords(), drvLATEX2E::print_coords(), drvplot::print_coords(), drvLWO::print_coords(), drvMMA::print_coords(), drvMPOST::print_coords(), drvPCB1::print_coords(), drvPDF::print_coords(), drvPIC::print_coords(), drvRIB::print_coords(), drvRPL::print_coords(), drvSAMPL::print_coords(), drvSK::print_coords(), drvTGIF::print_coords(), drvVTK::print_coords(), drvPPTX::print_coords(), print_file(), drvPPTX::print_join(), drvFIG::print_polyline_coords(), drvFIG::print_spline_coords1(), drvFIG::print_spline_coords2(), print_variable(), re_compile_fastmap(), re_match_2_internal(), regerror(), rehash_file(), graphite2::Vector< T >::reserve(), set_program_name(), drvCAIRO::show_image(), drvJAVA2::show_image(), drvPPTX::show_image(), drvWMF::show_image(), drvJAVA2::show_rectangle(), drvPPTX::show_text(), sig_die(), drvbase::simulate_fill(), strerror(), Mapping::DoubleHash15::vi_scale(), work(), Segment::write(), xalloc_die(), and drvPPTX::~drvPPTX().

◆ alloca()

char* alloca ( )

Referenced by _GP_ExpandField().

◆ collated_compare()

static int collated_compare ( __ptr_t  a,
const __ptr_t  b 
) const
static

Definition at line 1091 of file glob.c.

References a, b, NULL, s1, s2, and strcoll.

◆ exit()

void exit ( )

◆ free()

void free ( )

Referenced by globfree(), and prefix_array().

◆ getenv()

char* getenv ( )

◆ glob()

int glob ( char *  pattern,
int  flags,
int errfunc,
glob_t pglob 
) const

Definition at line 367 of file glob.c.

◆ glob_in_dir()

static int glob_in_dir ( char *  pattern,
const char *  directory,
int  flags,
int errfunc,
glob_t pglob 
) const
static

Definition at line 1223 of file glob.c.

◆ globfree()

void globfree ( glob_t pglob)

Definition at line 1075 of file glob.c.

References __ptr_t, free(), glob_t::gl_pathc, glob_t::gl_pathv, i, and NULL.

◆ malloc()

char* malloc ( )

Referenced by my_realloc(), and prefix_array().

◆ my_realloc()

static char* my_realloc ( char *  p,
unsigned int  n 
)
static

Definition at line 195 of file glob.c.

References malloc(), n, NULL, p, and realloc.

◆ next_brace_sub()

static const char* next_brace_sub ( char *  begin) const
static

Definition at line 320 of file glob.c.

References begin, cp, depth, and NULL.

◆ prefix_array()

static int prefix_array ( char *  dirname,
char **  array,
unsigned int  n 
) const
static

Definition at line 1113 of file glob.c.

References __ptr_t, dirname(), DIRSEP_CHAR, free(), i, malloc(), memcpy, n, NULL, and strlen().

◆ qsort()

void qsort ( )

Variable Documentation

◆ errno

int errno
extern

Referenced by _GP_ExpandField().