/[pcre]/code/branches/pcre16/pcre_printint.src
ViewVC logotype

Diff of /code/branches/pcre16/pcre_printint.src

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

revision 766 by zherczeg, Wed Nov 23 17:23:20 2011 UTC revision 767 by zherczeg, Sat Nov 26 12:48:56 2011 UTC
# Line 77  print_char(FILE *f, pcre_uchar *ptr, BOO Line 77  print_char(FILE *f, pcre_uchar *ptr, BOO
77  int c = *ptr;  int c = *ptr;
78    
79  #ifndef SUPPORT_UTF8  #ifndef SUPPORT_UTF8
80  utf8 = utf8;  /* Avoid compiler warning */  (void)utf8;  /* Avoid compiler warning */
81  if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c);  if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c);
82  return 0;  return 0;
83    
# Line 116  else Line 116  else
116  #endif  #endif
117  }  }
118    
119    /*************************************************
120    *  Print uchar string (regardless of utf8)       *
121    *************************************************/
122    
123    static void
124    print_puchar(FILE *f, PCRE_PUCHAR ptr)
125    {
126    while (*ptr != '\0')
127      {
128      register int c = *ptr++;
129      if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c);
130      }
131    }
132    
133  /*************************************************  /*************************************************
134  *          Find Unicode property name            *  *          Find Unicode property name            *
# Line 583  for(;;) Line 595  for(;;)
595      case OP_MARK:      case OP_MARK:
596      case OP_PRUNE_ARG:      case OP_PRUNE_ARG:
597      case OP_SKIP_ARG:      case OP_SKIP_ARG:
598      fprintf(f, "    %s %s", OP_names[*code], code + 2);      case OP_THEN_ARG:
599        fprintf(f, "    %s ", OP_names[*code]);
600        print_puchar(f, code + 2);
601      extra += code[1];      extra += code[1];
602      break;      break;
603    
# Line 591  for(;;) Line 605  for(;;)
605      fprintf(f, "    %s", OP_names[*code]);      fprintf(f, "    %s", OP_names[*code]);
606      break;      break;
607    
     case OP_THEN_ARG:  
     fprintf(f, "    %s %s", OP_names[*code], code + 2);  
     extra += code[1];  
     break;  
   
608      case OP_CIRCM:      case OP_CIRCM:
609      case OP_DOLLM:      case OP_DOLLM:
610      flag = "/m";      flag = "/m";

Legend:
Removed from v.766  
changed lines
  Added in v.767

  ViewVC Help
Powered by ViewVC 1.1.5