Lines Matching refs:f
92 print_char(FILE *f, PCRE2_SPTR ptr, BOOL utf) in print_char() argument
116 if (PRINTABLE(c)) fprintf(f, "%c", (char)c); in print_char()
117 else if (c < 0x80) fprintf(f, "\\x%02x", c); in print_char()
118 else fprintf(f, "\\x{%02x}", c); in print_char()
137 fprintf(f, "\\X{%x}", c); /* Invalid starting byte */ in print_char()
150 fprintf(f, "\\X{%x}", c); /* Invalid secondary byte */ in print_char()
156 fprintf(f, "\\x{%x}", c); in print_char()
167 fprintf(f, "\\X{%x}", c); in print_char()
171 fprintf(f, "\\x{%x}", c); in print_char()
180 fprintf(f, "\\X{%x}", c); in print_char()
205 print_custring(FILE *f, PCRE2_SPTR ptr) in print_custring() argument
210 if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c); in print_custring()
215 print_custring_bylen(FILE *f, PCRE2_SPTR ptr, PCRE2_UCHAR len) in print_custring_bylen() argument
220 if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c); in print_custring_bylen()
302 print_prop(FILE *f, PCRE2_SPTR code, const char *before, const char *after) in print_prop() argument
308 fprintf(f, "%s%s %s%c%s%s", before, OP_names[*code], sc, toupper(s[0]), s+1, after); in print_prop()
313 fprintf (f, "%s%sclist", before, (*code == OP_PROP)? "" : "not "); in print_prop()
314 while (*p < NOTACHAR) fprintf(f, " %04x", *p++); in print_prop()
315 fprintf(f, "%s", after); in print_prop()
338 pcre2_printint(pcre2_code *re, FILE *f, BOOL print_lengths) in pcre2_printint() argument
356 fprintf(f, "%3d ", (int)(code - codestart)); in pcre2_printint()
358 fprintf(f, " "); in pcre2_printint()
377 fprintf(f, " %s\n", OP_names[*code]); in pcre2_printint()
378 fprintf(f, "------------------------------------------------------------------\n"); in pcre2_printint()
382 fprintf(f, " "); in pcre2_printint()
386 code += 1 + print_char(f, code, utf); in pcre2_printint()
389 fprintf(f, "\n"); in pcre2_printint()
393 fprintf(f, " /i "); in pcre2_printint()
397 code += 1 + print_char(f, code, utf); in pcre2_printint()
400 fprintf(f, "\n"); in pcre2_printint()
407 if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); in pcre2_printint()
408 else fprintf(f, " "); in pcre2_printint()
409 fprintf(f, "%s %d", OP_names[*code], GET2(code, 1+LINK_SIZE)); in pcre2_printint()
431 if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); in pcre2_printint()
432 else fprintf(f, " "); in pcre2_printint()
433 fprintf(f, "%s", OP_names[*code]); in pcre2_printint()
437 if (print_lengths) fprintf(f, "%3d ", GET2(code, 1)); in pcre2_printint()
438 else fprintf(f, " "); in pcre2_printint()
439 fprintf(f, "%s", OP_names[*code]); in pcre2_printint()
443 if (print_lengths) fprintf(f, "%3d %d ", GET2(code, 1), in pcre2_printint()
445 else fprintf(f, " "); in pcre2_printint()
446 fprintf(f, "%s", OP_names[*code]); in pcre2_printint()
450 fprintf(f, " %s %d", OP_names[*code], GET2(code, 1)); in pcre2_printint()
454 fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]); in pcre2_printint()
460 fprintf(f, " %s Cond ref <", flag); in pcre2_printint()
461 print_custring(f, entry); in pcre2_printint()
462 fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); in pcre2_printint()
469 fprintf(f, " Cond recurse any"); in pcre2_printint()
471 fprintf(f, " Cond recurse %d", c); in pcre2_printint()
477 fprintf(f, " %s Cond recurse <", flag); in pcre2_printint()
478 print_custring(f, entry); in pcre2_printint()
479 fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); in pcre2_printint()
484 fprintf(f, " Cond false"); in pcre2_printint()
488 fprintf(f, " Cond true"); in pcre2_printint()
520 fprintf(f, " %s ", flag); in pcre2_printint()
526 print_prop(f, code + 1, "", " "); in pcre2_printint()
529 else fprintf(f, "%s", OP_names[code[1]]); in pcre2_printint()
531 else extra = print_char(f, code+1, utf); in pcre2_printint()
532 fprintf(f, "%s", OP_names[*code]); in pcre2_printint()
545 fprintf(f, " %s ", flag); in pcre2_printint()
546 extra = print_char(f, code + 1 + IMM2_SIZE, utf); in pcre2_printint()
547 fprintf(f, "{"); in pcre2_printint()
548 if (*code != OP_EXACT && *code != OP_EXACTI) fprintf(f, "0,"); in pcre2_printint()
549 fprintf(f, "%d}", GET2(code,1)); in pcre2_printint()
550 if (*code == OP_MINUPTO || *code == OP_MINUPTOI) fprintf(f, "?"); in pcre2_printint()
551 else if (*code == OP_POSUPTO || *code == OP_POSUPTOI) fprintf(f, "+"); in pcre2_printint()
560 print_prop(f, code + IMM2_SIZE + 1, " ", " "); in pcre2_printint()
563 else fprintf(f, " %s", OP_names[code[1 + IMM2_SIZE]]); in pcre2_printint()
564 fprintf(f, "{"); in pcre2_printint()
565 if (*code != OP_TYPEEXACT) fprintf(f, "0,"); in pcre2_printint()
566 fprintf(f, "%d}", GET2(code,1)); in pcre2_printint()
567 if (*code == OP_TYPEMINUPTO) fprintf(f, "?"); in pcre2_printint()
568 else if (*code == OP_TYPEPOSUPTO) fprintf(f, "+"); in pcre2_printint()
575 fprintf(f, " %s [^", flag); in pcre2_printint()
576 extra = print_char(f, code + 1, utf); in pcre2_printint()
577 fprintf(f, "]"); in pcre2_printint()
601 fprintf(f, " %s [^", flag); in pcre2_printint()
602 extra = print_char(f, code + 1, utf); in pcre2_printint()
603 fprintf(f, "]%s", OP_names[*code]); in pcre2_printint()
617 fprintf(f, " %s [^", flag); in pcre2_printint()
618 extra = print_char(f, code + 1 + IMM2_SIZE, utf); in pcre2_printint()
619 fprintf(f, "]{"); in pcre2_printint()
620 if (*code != OP_NOTEXACT && *code != OP_NOTEXACTI) fprintf(f, "0,"); in pcre2_printint()
621 fprintf(f, "%d}", GET2(code,1)); in pcre2_printint()
622 if (*code == OP_NOTMINUPTO || *code == OP_NOTMINUPTOI) fprintf(f, "?"); in pcre2_printint()
624 if (*code == OP_NOTPOSUPTO || *code == OP_NOTPOSUPTOI) fprintf(f, "+"); in pcre2_printint()
628 if (print_lengths) fprintf(f, "%3d ", GET(code, 1)); in pcre2_printint()
629 else fprintf(f, " "); in pcre2_printint()
630 fprintf(f, "%s", OP_names[*code]); in pcre2_printint()
637 fprintf(f, " %s \\%d", flag, GET2(code,1)); in pcre2_printint()
647 fprintf(f, " %s \\k<", flag); in pcre2_printint()
648 print_custring(f, entry); in pcre2_printint()
649 fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE)); in pcre2_printint()
655 fprintf(f, " %s %d %d %d", OP_names[*code], code[1 + 2*LINK_SIZE], in pcre2_printint()
661 fprintf(f, " %s %c", OP_names[*code], c); in pcre2_printint()
663 print_custring_bylen(f, code + 2 + 4*LINK_SIZE, extra - 3 - 4*LINK_SIZE); in pcre2_printint()
670 fprintf(f, "%c %d %d %d", c, GET(code, 1 + 3*LINK_SIZE), GET(code, 1), in pcre2_printint()
676 print_prop(f, code, " ", ""); in pcre2_printint()
689 fprintf(f, " ["); in pcre2_printint()
703 fprintf(f, "^"); in pcre2_printint()
734 if (i == '-' || i == ']') fprintf(f, "\\"); in pcre2_printint()
735 if (PRINTABLE(i)) fprintf(f, "%c", i); in pcre2_printint()
736 else fprintf(f, "\\x%02x", i); in pcre2_printint()
739 if (j != i + 1) fprintf(f, "-"); in pcre2_printint()
740 if (j == '-' || j == ']') fprintf(f, "\\"); in pcre2_printint()
741 if (PRINTABLE(j)) fprintf(f, "%c", j); in pcre2_printint()
742 else fprintf(f, "\\x%02x", j); in pcre2_printint()
775 fprintf(f, "[:%sgraph:]", notch); in pcre2_printint()
779 fprintf(f, "[:%sprint:]", notch); in pcre2_printint()
783 fprintf(f, "[:%spunct:]", notch); in pcre2_printint()
787 fprintf(f, "[:%sxdigit:]", notch); in pcre2_printint()
792 fprintf(f, "\\%c{%c%s}", ((notch[0] == '^')? 'P':'p'), in pcre2_printint()
800 ccode += 1 + print_char(f, ccode, utf); in pcre2_printint()
803 fprintf(f, "-"); in pcre2_printint()
804 ccode += 1 + print_char(f, ccode, utf); in pcre2_printint()
813 fprintf(f, "]%s", (*code == OP_NCLASS)? " (neg)" : ""); in pcre2_printint()
831 fprintf(f, "%s", OP_names[*ccode]); in pcre2_printint()
840 if (max == 0) fprintf(f, "{%u,}", min); in pcre2_printint()
841 else fprintf(f, "{%u,%u}", min, max); in pcre2_printint()
842 if (*ccode == OP_CRMINRANGE) fprintf(f, "?"); in pcre2_printint()
843 else if (*ccode == OP_CRPOSRANGE) fprintf(f, "+"); in pcre2_printint()
860 fprintf(f, " %s ", OP_names[*code]); in pcre2_printint()
861 print_custring_bylen(f, code + 2, code[1]); in pcre2_printint()
866 fprintf(f, " %s", OP_names[*code]); in pcre2_printint()
877 fprintf(f, " %s %s", flag, OP_names[*code]); in pcre2_printint()
882 fprintf(f, "\n"); in pcre2_printint()