| 193 |
while (p < endptr) |
while (p < endptr) |
| 194 |
{ |
{ |
| 195 |
int c, d; |
int c, d; |
| 196 |
|
if (eptr >= md->end_subject) return -1; |
| 197 |
GETCHARINC(c, eptr); |
GETCHARINC(c, eptr); |
| 198 |
GETCHARINC(d, p); |
GETCHARINC(d, p); |
| 199 |
if (c != d && c != UCD_OTHERCASE(d)) return -1; |
if (c != d && c != UCD_OTHERCASE(d)) return -1; |
| 205 |
|
|
| 206 |
/* The same code works when not in UTF-8 mode and in UTF-8 mode when there |
/* The same code works when not in UTF-8 mode and in UTF-8 mode when there |
| 207 |
is no UCP support. */ |
is no UCP support. */ |
| 208 |
|
{ |
| 209 |
while (length-- > 0) |
if (eptr + length > md->end_subject) return -1; |
| 210 |
{ if (md->lcc[*p++] != md->lcc[*eptr++]) return -1; } |
while (length-- > 0) |
| 211 |
|
{ if (md->lcc[*p++] != md->lcc[*eptr++]) return -1; } |
| 212 |
|
} |
| 213 |
} |
} |
| 214 |
|
|
| 215 |
/* In the caseful case, we can just compare the bytes, whether or not we |
/* In the caseful case, we can just compare the bytes, whether or not we |
| 216 |
are in UTF-8 mode. */ |
are in UTF-8 mode. */ |
| 217 |
|
|
| 218 |
else |
else |
| 219 |
{ while (length-- > 0) if (*p++ != *eptr++) return -1; } |
{ |
| 220 |
|
if (eptr + length > md->end_subject) return -1; |
| 221 |
|
while (length-- > 0) if (*p++ != *eptr++) return -1; |
| 222 |
|
} |
| 223 |
|
|
| 224 |
return eptr - eptr_start; |
return eptr - eptr_start; |
| 225 |
} |
} |