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

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

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

revision 806 by zherczeg, Thu Dec 15 11:57:39 2011 UTC revision 826 by zherczeg, Tue Dec 27 09:42:33 2011 UTC
# Line 114  print_char(FILE *f, pcre_uchar *ptr, BOO Line 114  print_char(FILE *f, pcre_uchar *ptr, BOO
114  int c = *ptr;  int c = *ptr;
115    
116  #ifndef SUPPORT_UTF  #ifndef SUPPORT_UTF
117    
118  (void)utf;  /* Avoid compiler warning */  (void)utf;  /* Avoid compiler warning */
119  if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c);  if (PRINTABLE(c)) fprintf(f, "%c", c);
120    else if (c <= 0xff) fprintf(f, "\\x%02x", c);
121    else fprintf(f, "\\x{%x}", c);
122  return 0;  return 0;
123    
124  #else  #else
# Line 473  for(;;) Line 476  for(;;)
476      case OP_NOT:      case OP_NOT:
477      c = code[1];      c = code[1];
478      if (PRINTABLE(c)) fprintf(f, " %s [^%c]", flag, c);      if (PRINTABLE(c)) fprintf(f, " %s [^%c]", flag, c);
479        else fprintf(f, " %s [^\\x%02x]", flag, c);      else if (utf || c > 0xff)
480          fprintf(f, " %s [^\\x{%02x}]", flag, c);
481        else
482          fprintf(f, " %s [^\\x%02x]", flag, c);
483      break;      break;
484    
485      case OP_NOTSTARI:      case OP_NOTSTARI:

Legend:
Removed from v.806  
changed lines
  Added in v.826

  ViewVC Help
Powered by ViewVC 1.1.5