| 190 |
|
|
| 191 |
switch(*code) |
switch(*code) |
| 192 |
{ |
{ |
| 193 |
|
/* ========================================================================== */ |
| 194 |
|
/* These cases are never obeyed. This is a fudge that causes a compile- |
| 195 |
|
time error if the vectors OP_names or _pcre_OP_lengths, which are indexed |
| 196 |
|
by opcode, are not the correct length. It seems to be the only way to do |
| 197 |
|
such a check at compile time, as the sizeof() operator does not work in |
| 198 |
|
the C preprocessor. We do this while compiling pcretest, because that |
| 199 |
|
#includes pcre_tables.c, which holds _pcre_OP_lengths. We can't do this |
| 200 |
|
when building pcre_compile.c with PCRE_DEBUG set, because it doesn't then |
| 201 |
|
know the size of _pcre_OP_lengths. */ |
| 202 |
|
|
| 203 |
|
#ifdef COMPILING_PCRETEST |
| 204 |
|
case OP_TABLE_LENGTH: |
| 205 |
|
case OP_TABLE_LENGTH + |
| 206 |
|
((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) && |
| 207 |
|
(sizeof(_pcre_OP_lengths) == OP_TABLE_LENGTH)): |
| 208 |
|
break; |
| 209 |
|
#endif |
| 210 |
|
/* ========================================================================== */ |
| 211 |
|
|
| 212 |
case OP_END: |
case OP_END: |
| 213 |
fprintf(f, " %s\n", OP_names[*code]); |
fprintf(f, " %s\n", OP_names[*code]); |
| 214 |
fprintf(f, "------------------------------------------------------------------\n"); |
fprintf(f, "------------------------------------------------------------------\n"); |