| 142 |
|
|
| 143 |
/* Make this function work for a regex with integers either byte order. |
/* Make this function work for a regex with integers either byte order. |
| 144 |
However, we assume that what we are passed is a compiled regex. The |
However, we assume that what we are passed is a compiled regex. The |
| 145 |
print_lengths flag controls whether offsets and lengths of items are printed. |
print_lengths flag controls whether offsets and lengths of items are printed. |
| 146 |
They can be turned off from pcretest so that automatic tests on bytecode can be |
They can be turned off from pcretest so that automatic tests on bytecode can be |
| 147 |
written that do not depend on the value of LINK_SIZE. */ |
written that do not depend on the value of LINK_SIZE. */ |
| 148 |
|
|
| 181 |
if (print_lengths) |
if (print_lengths) |
| 182 |
fprintf(f, "%3d ", (int)(code - codestart)); |
fprintf(f, "%3d ", (int)(code - codestart)); |
| 183 |
else |
else |
| 184 |
fprintf(f, " "); |
fprintf(f, " "); |
| 185 |
|
|
| 186 |
switch(*code) |
switch(*code) |
| 187 |
{ |
{ |
| 219 |
case OP_CBRA: |
case OP_CBRA: |
| 220 |
case OP_SCBRA: |
case OP_SCBRA: |
| 221 |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
| 222 |
else fprintf(f, " "); |
else fprintf(f, " "); |
| 223 |
fprintf(f, "%s %d", OP_names[*code], GET2(code, 1+LINK_SIZE)); |
fprintf(f, "%s %d", OP_names[*code], GET2(code, 1+LINK_SIZE)); |
| 224 |
break; |
break; |
| 225 |
|
|
| 238 |
case OP_SCOND: |
case OP_SCOND: |
| 239 |
case OP_REVERSE: |
case OP_REVERSE: |
| 240 |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
| 241 |
else fprintf(f, " "); |
else fprintf(f, " "); |
| 242 |
fprintf(f, "%s", OP_names[*code]); |
fprintf(f, "%s", OP_names[*code]); |
| 243 |
break; |
break; |
| 244 |
|
|
| 356 |
|
|
| 357 |
case OP_RECURSE: |
case OP_RECURSE: |
| 358 |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); |
| 359 |
else fprintf(f, " "); |
else fprintf(f, " "); |
| 360 |
fprintf(f, "%s", OP_names[*code]); |
fprintf(f, "%s", OP_names[*code]); |
| 361 |
break; |
break; |
| 362 |
|
|