From c22e6a6dc2bf6acbac955bd5fbdd896329dfd725 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 9 Nov 2015 14:17:00 +0100 Subject: Use fz_output instead of FILE* for most of our output needs. Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj. --- source/fitz/text.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'source/fitz/text.c') diff --git a/source/fitz/text.c b/source/fitz/text.c index 466c869a..0616d6a9 100644 --- a/source/fitz/text.c +++ b/source/fitz/text.c @@ -109,31 +109,3 @@ fz_add_text(fz_context *ctx, fz_text *text, int gid, int ucs, float x, float y) text->items[text->len].y = y; text->len++; } - -static int -isxmlmeta(int c) -{ - return c < 32 || c >= 128 || c == '&' || c == '<' || c == '>' || c == '\'' || c == '"'; -} - -static void -do_print_text(FILE *out, fz_text *text, int indent) -{ - int i, n; - for (i = 0; i < text->len; i++) - { - for (n = 0; n < indent; n++) - fputc(' ', out); - if (!isxmlmeta(text->items[i].ucs)) - fprintf(out, "\n", - text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); - else - fprintf(out, "\n", - text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); - } -} - -void fz_print_text(fz_context *ctx, FILE *out, fz_text *text) -{ - do_print_text(out, text, 0); -} -- cgit v1.2.3