Match.cxx File Reference

#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "Match.h"

Go to the source code of this file.

Defines

#define BOL   '^'
#define EOL   '$'
#define ANY   '.'
#define CCL   '['
#define CCLEND   ']'
#define NCCL   '^'
#define CLOSURE   '*'
#define PCLOSE   '+'
#define OPT   '?'
#define ISHEXDIGIT(x)   isxdigit((unsigned char)x)
#define ISOCTDIGIT(x)   ('0'<=(x) && (x)<='7')
#define MAPSIZE   16
#define E_NONE   0
#define E_ILLEGAL   1
#define E_NOMEM   2
#define E_PAT   3

Enumerations

enum  Eaction

Functions

void ADVANCE (const Pattern_t *&pat)
static void SETBIT (unsigned char b, Pattern_t *map)
static int TSTBIT (unsigned char b, const Pattern_t *map)
static const char * doccl (Pattern_t *, const char *)
static int hex2bin (int)
static int oct2bin (int)
static int omatch (const char **, size_t *, const Pattern_t *, const char *)
static const char * patcmp (const char *, size_t, const Pattern_t *, const char *)
static int esc (const char **)
int Makepat (const char *exp, Pattern_t *pat, int maxpat)
const char * Matchs (const char *str, size_t slen, const Pattern_t *pat, const char **startpat)


Define Documentation

#define ANY   '.'

Definition at line 32 of file Match.cxx.

Referenced by Makepat().

#define BOL   '^'

Definition at line 30 of file Match.cxx.

Referenced by Makepat().

#define CCL   '['

Definition at line 33 of file Match.cxx.

Referenced by doccl(), and Makepat().

#define CCLEND   ']'

Definition at line 34 of file Match.cxx.

Referenced by doccl(), and Makepat().

#define CLOSURE   '*'

Definition at line 36 of file Match.cxx.

Referenced by Makepat().

#define E_ILLEGAL   1

Definition at line 102 of file Match.cxx.

Referenced by Makepat().

#define E_NOMEM   2

Definition at line 103 of file Match.cxx.

Referenced by Makepat().

#define E_NONE   0

Definition at line 101 of file Match.cxx.

Referenced by Makepat().

#define E_PAT   3

Definition at line 104 of file Match.cxx.

Referenced by Makepat().

#define EOL   '$'

Definition at line 31 of file Match.cxx.

Referenced by Makepat().

#define ISHEXDIGIT ( x   )     isxdigit((unsigned char)x)

Definition at line 54 of file Match.cxx.

Referenced by esc().

#define ISOCTDIGIT ( x   )     ('0'<=(x) && (x)<='7')

Definition at line 61 of file Match.cxx.

Referenced by esc().

#define MAPSIZE   16

Definition at line 64 of file Match.cxx.

Referenced by ADVANCE(), doccl(), and Makepat().

#define NCCL   '^'

Definition at line 35 of file Match.cxx.

Referenced by doccl().

#define OPT   '?'

Definition at line 38 of file Match.cxx.

Referenced by Makepat(), ROOT::Math::IntegOptionsUtil::Print(), and ROOT::Math::IntegOptionsUtil::PrintDefault().

#define PCLOSE   '+'

Definition at line 37 of file Match.cxx.

Referenced by Makepat().


Enumeration Type Documentation

enum Eaction

Definition at line 40 of file Match.cxx.


Function Documentation

void ADVANCE ( const Pattern_t *&  pat  )  [inline]

Definition at line 68 of file Match.cxx.

References kCCL, and MAPSIZE.

Referenced by patcmp().

static const char * doccl ( Pattern_t ,
const char *   
) [static]

Definition at line 239 of file Match.cxx.

References CCL, CCLEND, esc(), i, MAPSIZE, NCCL, and SETBIT.

Referenced by Makepat().

static int esc ( const char **   )  [static]

Definition at line 419 of file Match.cxx.

References hex2bin(), ISHEXDIGIT, ISOCTDIGIT, and oct2bin().

Referenced by doccl(), and Makepat().

static int hex2bin ( int   )  [static]

Definition at line 401 of file Match.cxx.

Referenced by esc().

int Makepat ( const char *  exp,
Pattern_t pat,
int  maxpat 
)

Definition at line 118 of file Match.cxx.

References ANY, BOL, CCL, CCLEND, CLOSURE, doccl(), E_ILLEGAL, E_NOMEM, E_NONE, E_PAT, EOL, esc(), kANY, kBOL, kCCL, kCLOSE, kEND, kEOL, kOPT, kPCLOSE, MAPSIZE, memmove, OPT, and PCLOSE.

const char* Matchs ( const char *  str,
size_t  slen,
const Pattern_t pat,
const char **  startpat 
)

Definition at line 216 of file Match.cxx.

References kBOL, patcmp(), and start.

static int oct2bin ( int   )  [static]

Definition at line 410 of file Match.cxx.

Referenced by esc().

static int omatch ( const char **  ,
size_t ,
const Pattern_t ,
const char *   
) [static]

Definition at line 358 of file Match.cxx.

References kANY, kBOL, kCCL, kEOL, and TSTBIT().

Referenced by patcmp().

static const char * patcmp ( const char *  ,
size_t  ,
const Pattern_t ,
const char *   
) [static]

Definition at line 277 of file Match.cxx.

References ADVANCE(), kCLOSE, kEND, kOPT, kPCLOSE, and omatch().

Referenced by Matchs().

static void SETBIT ( unsigned char  b,
Pattern_t map 
) [static]

Definition at line 88 of file Match.cxx.

static int TSTBIT ( unsigned char  b,
const Pattern_t map 
) [static]

Definition at line 94 of file Match.cxx.

Referenced by omatch().


Generated on Tue Jul 5 15:57:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1