Age | Commit message (Collapse) | Author |
|
Avoids gcc giving spurious warnings.
|
|
|
|
Thanks to Simon Reinhardt for these.
|
|
Take on a (slightly tweaked) version of Simon Reinhardt's
patch.
The actual logic is left entirely unchanged; minor changes
have been made to the names of functions/types to avoid
clashing in the cmapdump.c repeated inclusion.
Currently this should really only affect xps files, as strtof
is only used as fz_atof, and that's (effectively) all xps for
now.
I will look at updating lex_number to call this in future.
|
|
|
|
|
|
|
|
During pdf_save_document the main performance bottleneck is the formatting
of floats to decimal ASCII representations in fz_ftoa.
Fix this by using the Grisu2 algorithm, the fastest known algorithm for
accurate printing of IEEE floating point numbers while minimizing the number
of produced decimal digits.
This requires no libc support, only integer arithmetic.
|
|
|
|
|
|
In file included from scripts/cmapdump.c:19:
scripts/../source/fitz/ftoa.c:30:23: warning: redefinition of typedef 'ulong' is a C11 feature [-Wtypedef-redefinition]
typedef unsigned long ulong;
^
scripts/../source/fitz/strtod.c:30:23: note: previous definition is here
typedef unsigned long ulong;
^
1 warning generated.
(Apparently in earlier versions of clang this is an error.)
|
|
The dtoa function is for doubles (which is what MuJS uses) but for MuPDF
we only need and want float precision in our output formatting.
|