summaryrefslogtreecommitdiff
path: root/source/fitz/text.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-11-09 14:17:00 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-12-11 12:11:31 +0100
commitc22e6a6dc2bf6acbac955bd5fbdd896329dfd725 (patch)
treed9d84d3a6a74ed74c9d470b532097769545e8dc6 /source/fitz/text.c
parent95b928431f233052e4bbbd1b2bf9fc705657b5a7 (diff)
downloadmupdf-c22e6a6dc2bf6acbac955bd5fbdd896329dfd725.tar.xz
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.
Diffstat (limited to 'source/fitz/text.c')
-rw-r--r--source/fitz/text.c28
1 files changed, 0 insertions, 28 deletions
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, "<g ucs=\"%c\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n",
- text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y);
- else
- fprintf(out, "<g ucs=\"U+%04X\" gid=\"%d\" x=\"%g\" y=\"%g\" />\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);
-}