diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-02-22 10:23:56 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-02-22 10:23:56 +0000 |
commit | 5f83aeee3273dc59fa8878eb3e830e64213fcbd2 (patch) | |
tree | 324e6f3bfd1df70b681706ddf23bda00d3338111 /pcre_printint.c | |
parent | e65ea5ac9477071cc408ce00a2d3e80f791c8570 (diff) | |
download | pcre-5f83aeee3273dc59fa8878eb3e830e64213fcbd2.tar.gz |
OP_NOT now supports any UTF character
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@924 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_printint.c')
-rw-r--r-- | pcre_printint.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/pcre_printint.c b/pcre_printint.c index a95e6a4..b6f720d 100644 --- a/pcre_printint.c +++ b/pcre_printint.c @@ -477,12 +477,9 @@ for(;;) flag = "/i"; /* Fall through */ case OP_NOT: - c = code[1]; - if (PRINTABLE(c)) fprintf(f, " %s [^%c]", flag, c); - else if (utf || c > 0xff) - fprintf(f, " %s [^\\x{%02x}]", flag, c); - else - fprintf(f, " %s [^\\x%02x]", flag, c); + fprintf(f, " %s [^", flag); + extra = print_char(f, code + 1, utf); + fprintf(f, "]"); break; case OP_NOTSTARI: @@ -506,10 +503,9 @@ for(;;) case OP_NOTQUERY: case OP_NOTMINQUERY: case OP_NOTPOSQUERY: - c = code[1]; - if (PRINTABLE(c)) fprintf(f, " %s [^%c]", flag, c); - else fprintf(f, " %s [^\\x%02x]", flag, c); - fprintf(f, "%s", priv_OP_names[*code]); + fprintf(f, " %s [^", flag); + extra = print_char(f, code + 1, utf); + fprintf(f, "]%s", priv_OP_names[*code]); break; case OP_NOTEXACTI: @@ -523,9 +519,9 @@ for(;;) case OP_NOTUPTO: case OP_NOTMINUPTO: case OP_NOTPOSUPTO: - c = code[1 + IMM2_SIZE]; - if (PRINTABLE(c)) fprintf(f, " %s [^%c]{", flag, c); - else fprintf(f, " %s [^\\x%02x]{", flag, c); + fprintf(f, " %s [^", flag); + extra = print_char(f, code + 1 + IMM2_SIZE, utf); + fprintf(f, "]{"); if (*code != OP_NOTEXACT && *code != OP_NOTEXACTI) fprintf(f, "0,"); fprintf(f, "%d}", GET2(code,1)); if (*code == OP_NOTMINUPTO || *code == OP_NOTMINUPTOI) fprintf(f, "?"); |