/[pcre]/code/tags/pcre-8.10/pcre_printint.src
ViewVC logotype

Diff of /code/tags/pcre-8.10/pcre_printint.src

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

revision 305 by ph10, Sun Jan 20 20:07:32 2008 UTC revision 475 by ph10, Sat Jan 2 18:21:30 2010 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2008 University of Cambridge             Copyright (c) 1997-2010 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 43  internal form of a compiled regular expr Line 43  internal form of a compiled regular expr
43  local functions. This source file is used in two places:  local functions. This source file is used in two places:
44    
45  (1) It is #included by pcre_compile.c when it is compiled in debugging mode  (1) It is #included by pcre_compile.c when it is compiled in debugging mode
46  (DEBUG defined in pcre_internal.h). It is not included in production compiles.  (PCRE_DEBUG defined in pcre_internal.h). It is not included in production
47    compiles.
48    
49  (2) It is always #included by pcretest.c, which can be asked to print out a  (2) It is always #included by pcretest.c, which can be asked to print out a
50  compiled regex for debugging purposes. */  compiled regex for debugging purposes. */
# Line 54  hexadecimal. We don't use isprint() beca Line 55  hexadecimal. We don't use isprint() beca
55  (even without the use of locales) and we want the output always to be the same,  (even without the use of locales) and we want the output always to be the same,
56  for testing purposes. This macro is used in pcretest as well as in this file. */  for testing purposes. This macro is used in pcretest as well as in this file. */
57    
58    #ifdef EBCDIC
59    #define PRINTABLE(c) ((c) >= 64 && (c) < 255)
60    #else
61  #define PRINTABLE(c) ((c) >= 32 && (c) < 127)  #define PRINTABLE(c) ((c) >= 32 && (c) < 127)
62    #endif
63    
64  /* The table of operator names. */  /* The table of operator names. */
65    
# Line 242  for(;;) Line 247  for(;;)
247      fprintf(f, "%s", OP_names[*code]);      fprintf(f, "%s", OP_names[*code]);
248      break;      break;
249    
250        case OP_CLOSE:
251        fprintf(f, "    %s %d", OP_names[*code], GET2(code, 1));
252        break;
253    
254      case OP_CREF:      case OP_CREF:
255        case OP_NCREF:
256      fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]);      fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]);
257      break;      break;
258    
# Line 254  for(;;) Line 264  for(;;)
264        fprintf(f, "    Cond recurse %d", c);        fprintf(f, "    Cond recurse %d", c);
265      break;      break;
266    
267        case OP_NRREF:
268        c = GET2(code, 1);
269        if (c == RREF_ANY)
270          fprintf(f, "    Cond nrecurse any");
271        else
272          fprintf(f, "    Cond nrecurse %d", c);
273        break;
274    
275      case OP_DEF:      case OP_DEF:
276      fprintf(f, "    Cond def");      fprintf(f, "    Cond def");
277      break;      break;

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

  ViewVC Help
Powered by ViewVC 1.1.5