summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-03-18 16:37:19 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-03-19 12:52:05 +0100
commit30bcbe60b93a0e4a697871f69e8367476796f27c (patch)
tree39c2fa6d826a866fe6a5692b6e3575956b41c44c /scripts
parent4c2715a0bcecfed6ebdfee901920631b09364d7e (diff)
downloadmupdf-30bcbe60b93a0e4a697871f69e8367476796f27c.tar.xz
Implement our own vsnprintf variant.
The primary motivator for this is so that we can print floating point values and get the full accuracy out, without having to print 1.5 as 1.5000000, and without getting 23e24 etc. We only support %c, %f, %d, %o, %x and %s currently. We only support the zero padding qualifier, for integers. We do support some extensions: %C turns values >=128 into UTF-8. %M prints a fz_matrix. %R prints a fz_rect. %P prints a fz_point. We also implement a fprintf variant on top of this to allow for consistent results when using fz_output. a
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmapdump.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c
index a9e5de18..2e0e0852 100644
--- a/scripts/cmapdump.c
+++ b/scripts/cmapdump.c
@@ -15,6 +15,7 @@
#include "../source/fitz/buffer.c"
#include "../source/fitz/stream-open.c"
#include "../source/fitz/stream-read.c"
+#include "../source/fitz/printf.c"
#include "../source/pdf/pdf-lex.c"
#include "../source/pdf/pdf-cmap.c"