Age | Commit message (Collapse) | Author |
|
|
|
|
|
Ken reports that a VS2008 import of the projects fails with
complaints about __restrict whereever stdlib.h is included.
Fix the #ifdeffery so that we don't mess with it on VS2008.
|
|
_WIN32 is always defined on windows (it means the WinAPI is available).
_WIN64 is also defined on 64-bit targets.
This means the test for defined(_WIN32) || defined(_WIN64) is redundant,
since if _WIN64 is defined, then _WIN32 is always also defined.
MSC_VER is only defined for MSVC, so split the ifdef sections in
include/fitz/system.h into separate MSVC and WIN32 parts so that
we can build with MinGW and other non-MSVC compilers on windows.
|
|
Use a FZ_PRINTFLIKE macro instead.
|
|
|
|
Use android logging for throw/warn like we do with OutputDebugString
on windows.
|
|
|
|
|
|
Don't mess with conditional compilation with LARGEFILE -- always expose
64-bit file offsets in our public API.
|
|
|
|
|
|
Might be useful in locations other than directory.c.
|
|
|
|
|
|
|
|
|
|
|
|
Define PATH_MAX in the few files that use it, should it be missing.
|
|
This causes zlib to look for a header we don't have.
|
|
Don't depend on stdio.h for our own I/O functions.
|
|
PATH_MAX is Linux specific.
|
|
Don't use FMT_zu macro for fz_throw/fz_warn, since we can portably handle '%zu'
in our own printf formatting.
|
|
Better to have this defined at the system level
rather than scattered about in various files.
|
|
|
|
Add 'build=valgrind' configuration.
|
|
Keeping them up to date is difficult and prone to errors, so we move
setting the USE_OUTPUT_DEBUG_STRING and FZ_LARGEFILE flags to the source
instead of relying on project file definitions.
|
|
Only use NDEBUG as it's the one that most environments already set, so
is likely to lead to the least amount of confusion if compiling with a
custom build system.
|
|
|
|
Saves having the same threading code repeatedly.
|
|
This makes debugging much simpler.
|
|
Windows requires sys/stat.h to be included.
|
|
Previously it was inherently tied to zip archives and directories.
Now these are separated out into distinct subclasses. This prepares
for support for further archive formats.
|
|
Slight tweak to the #ifdeffery required.
|
|
This has knock on effects in the store.
fix
|
|
Use this for plotters so we can see which ones are being used
in any given build.
Build with -DTRACK_USAGE to enable.
|
|
|
|
We compile with -Wno-unused-parameters instead.
|
|
Wrap the unsafe _snprintf to ensure that the string is null-terminated
even on overflow.
|
|
|
|
|
|
We should allow client code to build without warnings even
with the -Wunused-parameters flag.
Thanks to Simon Reinhardt for the patch.
|
|
Add NaCl cross compile rules to Makerules (together with a tiny
header tweak). Thanks to Robert Bamler for the rules to include.
|
|
I'd missed converting some int's to fz_off_t's.
|
|
If FZ_LARGEFILE is defined when building, MuPDF uses 64bit offsets
for files; this allows us to open streams larger than 2Gig.
The downsides to this are that:
* The xref entries are larger.
* All PDF ints are held as 64bit things rather than 32bit things
(to cope with /Prev entries, hint stream offsets etc).
* All file positions are stored as 64bits rather than 32.
The implementation works by detecting FZ_LARGEFILE. Some #ifdeffery
in fitz/system.h sets fz_off_t to either int or int64_t as appropriate,
and sets defines for fz_fopen, fz_fseek, fz_ftell etc as required.
These call the fseeko64 etc functions on linux (and so define
_LARGEFILE64_SOURCE) and the explicit 64bit functions on windows.
|
|
|
|
|
|
|
|
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
|
|
We define a document handler for each file type (2 in the case of PDF, one
to handle files with the ability to 'run' them, and one without).
We then register these handlers with the context at startup, and then
call fz_open_document... as usual. This enables people to select the
document types they want at will (and even to extend the library with more
document types should they wish).
|