|
void | ADVANCE (const Pattern_t *&pat) |
| Advance a pointer into the pattern template to the next pattern element, this is a+1 for all pattern elements but kCCL, where you have to skip past both the kCCL character and the bitmap that follows that character. More...
|
|
static const char * | doccl (Pattern_t *map, const char *src) |
| Set bits in the map corresponding to characters specified in the src character class. More...
|
|
static int | esc (const char **s) |
| Map escape sequences into their equivalent symbols. More...
|
|
static int | hex2bin (int c) |
| Convert the hex digit represented by 'c' to an int. More...
|
|
int | Makepat (const char *exp, Pattern_t *pat, int maxpat) |
| Make a pattern template from the string pointed to by exp. More...
|
|
const char * | Matchs (const char *str, size_t slen, const Pattern_t *pat, const char **startpat) |
| Match a string with a pattern. More...
|
|
static int | oct2bin (int c) |
| Convert the hex digit represented by 'c' to an int. More...
|
|
static int | omatch (const char **strp, size_t *slenp, const Pattern_t *pat, const char *start) |
| Match one pattern element, pointed at by pat, against the character at **strp. More...
|
|
static const char * | patcmp (const char *str, size_t slen, const Pattern_t *pat, const char *start) |
| Like strcmp, but compares str against pat. More...
|
|
static void | SETBIT (unsigned char b, Pattern_t *map) |
|
static int | TSTBIT (unsigned char b, const Pattern_t *map) |
|
static int omatch |
( |
const char ** |
strp, |
|
|
size_t * |
slenp, |
|
|
const Pattern_t * |
pat, |
|
|
const char * |
start |
|
) |
| |
|
static |
Match one pattern element, pointed at by pat, against the character at **strp.
Return 0 on a failure, 1 on success. *strp is advanced to skip over the matched character on a successful match. Closure is handled one level up by patcmp().
"start" points at the character at the left edge of the line. This might not be the same thing as *strp if the search is starting in the middle of the string. An end-of- line anchor matches end of string only.
Definition at line 369 of file Match.cxx.
static const char * patcmp |
( |
const char * |
str, |
|
|
size_t |
slen, |
|
|
const Pattern_t * |
pat, |
|
|
const char * |
start |
|
) |
| |
|
static |
Like strcmp, but compares str against pat.
Each element of str is compared with the template until either a mis-match is found or the end of the template is reached. In the former case a 0 is returned; in the latter, a pointer into str (pointing after the last character in the matched pattern) is returned. start points at the first character in the string, which might not be the same thing as str if the search started in the middle of the string.
Definition at line 287 of file Match.cxx.