42 const char *
re_cmp(
const char *,
const char *);
69 const char *
re_cmp(
const char *
str,
const char *regexp) {
70 const char *next_regexp;
78 if (regexp == NULL ||
str == NULL)
98 if (matched && *next_regexp == 0)
107 if (matched ==
False)
112 if (matched ==
False)
120 if (matched ==
False)
167 else if (*(
str+1) != 0)
191 const char *next_regexp;
211 if (next_regexp == NULL) {
305 return (
c >= sel->
u.
range.low && c <= sel->u.range.high);
314 return (c < sel->u.range.low &&
c > sel->
u.
range.high);
333 # define exit_if_null if (*regexp == 0) return NULL
335 # define exit_if_null
341 if (sel == NULL || regexp == NULL || *regexp == 0)
346 looking_at = *regexp++;
347 switch (looking_at) {
378 uchar first, last = 0;
381 looking_at = *regexp++;
383 if (looking_at ==
'^') {
386 looking_at = *regexp++;
390 looking_at = *regexp++;
391 if (looking_at ==
']') {
396 }
else if (looking_at ==
'-') {
410 looking_at = *regexp++;
411 if (looking_at ==
']') {
441 for (i = first; i <= last; i++) {
446 sel->
u.
array[first] = !neg;
448 sel->
u.
array[looking_at] = !neg;
452 looking_at = *regexp++;
460 while (looking_at !=
']') {
461 if (looking_at ==
'-') {
463 looking_at = *regexp++;
464 if (looking_at !=
']') {
469 for (i =
previous+1; i < looking_at; i++) {
481 sel->
u.
array[looking_at] = !neg;
484 looking_at = *regexp++;
508 if (*regexp ==
'*') {
511 }
else if (*regexp ==
'?') {
514 }
else if (*regexp ==
'+') {