/[pcre]/code/trunk/pcre_printint.src
ViewVC logotype

Diff of /code/trunk/pcre_printint.src

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 475 by ph10, Sat Jan 2 18:21:30 2010 UTC revision 498 by ph10, Wed Mar 3 19:29:38 2010 UTC
# Line 190  for(;;) Line 190  for(;;)
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");

Legend:
Removed from v.475  
changed lines
  Added in v.498

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12