pike.git/
src/
modules/
Regexp/
pike_regexp.c
Branch:
Tag:
Non-build tags
All tags
No tags
2014-09-03
2014-09-03 21:11:21 by Martin Nilsson <nilsson@opera.com>
5aa54c07851a1de7423dde250737182dd3465319 (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
8.0
strchr is C89 and 4.3BSD
797:
/* If there is a "must appear" string, look for it. */ if (prog->regmust != (char *)NULL) { s = string;
-
while ((s =
STRCHR
(s, prog->regmust[0])) != (char *)NULL) {
+
while ((s =
strchr
(s, prog->regmust[0])) != (char *)NULL) {
if (strncmp(s, prog->regmust, prog->regmlen) == 0) break; /* Found it. */ s++;
816:
s = string; if (prog->regstart != '\0') /* We know what char it must start with. */
-
while ((s =
STRCHR
(s, prog->regstart)) != (char *)NULL) {
+
while ((s =
strchr
(s, prog->regstart)) != (char *)NULL) {
if (regtry(prog, s)) return (1); s++;
953:
break; case ANYOF: if (*reginput == '\0' ||
-
STRCHR
(OPERAND(scan), *reginput) == (char *)NULL)
+
strchr
(OPERAND(scan), *reginput) == (char *)NULL)
return (0); reginput++; break; case ANYBUT: if (*reginput == '\0' ||
-
STRCHR
(OPERAND(scan), *reginput) != (char *)NULL)
+
strchr
(OPERAND(scan), *reginput) != (char *)NULL)
return (0); reginput++; break;
1106:
} break; case ANYOF:
-
while (*scan != '\0' &&
STRCHR
(opnd, *scan) != (char *)NULL) {
+
while (*scan != '\0' &&
strchr
(opnd, *scan) != (char *)NULL) {
count++; scan++; } break; case ANYBUT:
-
while (*scan != '\0' &&
STRCHR
(opnd, *scan) == (char *)NULL) {
+
while (*scan != '\0' &&
strchr
(opnd, *scan) == (char *)NULL) {
count++; scan++; }