9 |
|
|
10 |
Written by: Philip Hazel <ph10@cam.ac.uk> |
Written by: Philip Hazel <ph10@cam.ac.uk> |
11 |
|
|
12 |
Copyright (c) 1998 University of Cambridge |
Copyright (c) 1997-2000 University of Cambridge |
13 |
|
|
14 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
15 |
Permission is granted to anyone to use this software for any purpose on any |
Permission is granted to anyone to use this software for any purpose on any |
25 |
|
|
26 |
3. Altered versions must be plainly marked as such, and must not be |
3. Altered versions must be plainly marked as such, and must not be |
27 |
misrepresented as being the original software. |
misrepresented as being the original software. |
28 |
|
|
29 |
|
4. If PCRE is embedded in any software that is released under the GNU |
30 |
|
General Purpose Licence (GPL), then the terms of that licence shall |
31 |
|
supersede any condition above with which it is incompatible. |
32 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
33 |
*/ |
*/ |
34 |
|
|
89 |
{ |
{ |
90 |
register int c; |
register int c; |
91 |
|
|
92 |
|
/* This next statement and the later reference to dummy are here in order to |
93 |
|
trick the optimizer of the IBM C compiler for OS/2 into generating correct |
94 |
|
code. Apparently IBM isn't going to fix the problem, and we would rather not |
95 |
|
disable optimization (in this module it actually makes a big difference, and |
96 |
|
the pcre module can use all the optimization it can get). */ |
97 |
|
|
98 |
|
volatile int dummy; |
99 |
|
|
100 |
do |
do |
101 |
{ |
{ |
102 |
const uschar *tcode = code + 3; |
const uschar *tcode = code + 3; |
144 |
case OP_BRAMINZERO: |
case OP_BRAMINZERO: |
145 |
if (!set_start_bits(++tcode, start_bits, caseless, cd)) |
if (!set_start_bits(++tcode, start_bits, caseless, cd)) |
146 |
return FALSE; |
return FALSE; |
147 |
|
dummy = 1; |
148 |
do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT); |
do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT); |
149 |
tcode += 3; |
tcode += 3; |
150 |
try_next = TRUE; |
try_next = TRUE; |
207 |
|
|
208 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
209 |
for (c = 0; c < 32; c++) |
for (c = 0; c < 32; c++) |
210 |
start_bits[c] |= ~(cd->cbits[c] | cd->cbits[c+cbit_word]); |
start_bits[c] |= ~cd->cbits[c+cbit_word]; |
211 |
break; |
break; |
212 |
|
|
213 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
214 |
for (c = 0; c < 32; c++) |
for (c = 0; c < 32; c++) |
215 |
start_bits[c] |= (cd->cbits[c] | cd->cbits[c+cbit_word]); |
start_bits[c] |= cd->cbits[c+cbit_word]; |
216 |
break; |
break; |
217 |
|
|
218 |
/* One or more character type fudges the pointer and restarts, knowing |
/* One or more character type fudges the pointer and restarts, knowing |
264 |
|
|
265 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
266 |
for (c = 0; c < 32; c++) |
for (c = 0; c < 32; c++) |
267 |
start_bits[c] |= ~(cd->cbits[c] | cd->cbits[c+cbit_word]); |
start_bits[c] |= ~cd->cbits[c+cbit_word]; |
268 |
break; |
break; |
269 |
|
|
270 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
271 |
for (c = 0; c < 32; c++) |
for (c = 0; c < 32; c++) |
272 |
start_bits[c] |= (cd->cbits[c] | cd->cbits[c+cbit_word]); |
start_bits[c] |= cd->cbits[c+cbit_word]; |
273 |
break; |
break; |
274 |
} |
} |
275 |
|
|