summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/system.h
AgeCommit message (Collapse)Author
2018-06-22Don't pollute namespace with our 'restrict' macro. Use FZ_RESTRICT instead.Tor Andersson
2018-06-02Fix include file ifdefs when building with -std=c11.Tor Andersson
2018-04-03Fix VS2008 build.Robin Watts
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.
2018-03-22Clean up windows ifdefs.Tor Andersson
_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.
2018-02-12Don't pollute global namespace with __printflike.Tor Andersson
Use a FZ_PRINTFLIKE macro instead.
2017-12-13Define constant INT64_MAX where int64_t is declared.Sebastian Rasmussen
2017-11-10Remove fz_android_fprintf.Tor Andersson
Use android logging for throw/warn like we do with OutputDebugString on windows.
2017-11-10Purge obsolete NDK_PROFILER code.Tor Andersson
2017-11-02Fixes for win32 build.Tor Andersson
2017-11-01Use int64_t for public file API offsets.Tor Andersson
Don't mess with conditional compilation with LARGEFILE -- always expose 64-bit file offsets in our public API.
2017-09-12Remove redundant #define that is only used at the same place it's set.Tor Andersson
2017-09-12Move fz_strcasecmp to the header it belongs to.Tor Andersson
2017-08-15Move S_ISDIR workaround to common header file.Sebastian Rasmussen
Might be useful in locations other than directory.c.
2017-08-02Sort FILE interface defines, to make sure all defined.Sebastian Rasmussen
2017-08-01If largefile=yes is set, make sure fz_remove is defined.Sebastian Rasmussen
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-05-31Change forgotten M_PI uses to FZ_PI.Sebastian Rasmussen
2017-05-29Make PI/RADIAN/SQRT2/LN2 global single precision float constants.Sebastian Rasmussen
2017-05-04Drop FZ_PATH_MAX macro.Tor Andersson
Define PATH_MAX in the few files that use it, should it be missing.
2017-05-03Fix windows build: Don't set _LARGEFILE64_SOURCE on windowsRobin Watts
This causes zlib to look for a header we don't have.
2017-04-27Use FZ_SEEK_SET macros for fz_seek.Tor Andersson
Don't depend on stdio.h for our own I/O functions.
2017-04-27Use FZ_PATH_MAX.Tor Andersson
PATH_MAX is Linux specific.
2017-04-27Rename FMT_zu to FZ_FMT_zu.Tor Andersson
Don't use FMT_zu macro for fz_throw/fz_warn, since we can portably handle '%zu' in our own printf formatting.
2017-02-22Move PATH_MAX to system.hMichael Vrhel
Better to have this defined at the system level rather than scattered about in various files.
2017-02-06Fix FMT_zu definition for windows 64.Robin Watts
2017-01-17Automatically turn on PACIFY_VALGRIND for debug builds.Tor Andersson
Add 'build=valgrind' configuration.
2017-01-17Remove preprocessor defines from vcproj.Tor Andersson
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.
2017-01-09Be consistent in use of DEBUG/NDEBUG macros.Tor Andersson
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.
2016-12-12Add fz_remove to cope with utf-8 file names on windows.Tor Andersson
2016-11-23Convert mudraw and muraster to use mu-threads.Robin Watts
Saves having the same threading code repeatedly.
2016-09-14Redirect fprintf to android logcat in debug builds.Robin Watts
This makes debugging much simpler.
2016-09-09Fix VS2005 build; missing stat definition.Robin Watts
Windows requires sys/stat.h to be included.
2016-09-08Make fz_archive a generic archive type.Sebastian Rasmussen
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.
2016-06-13Fix VS2012 builds.Robin Watts
Slight tweak to the #ifdeffery required.
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-05-27Add facility to track usage of functions.Robin Watts
Use this for plotters so we can see which ones are being used in any given build. Build with -DTRACK_USAGE to enable.
2016-05-10Enable ARCH_ARM on ARM platforms.Robin Watts
2016-02-15Drop UNUSED macro -- it dirties the namespace and is not needed.Tor Andersson
We compile with -Wno-unused-parameters instead.
2016-02-09Don't use unsafe _snprintf on MSVC older than 2015.Tor Andersson
Wrap the unsafe _snprintf to ensure that the string is null-terminated even on overflow.
2016-01-06Add missing signbit definition for MSVC.Robin Watts
2016-01-05Clean up trailing whitespace.Tor Andersson
2015-10-14Add FZ_UNUSED macro for use with public static inline functions.Tor Andersson
We should allow client code to build without warnings even with the -Wunused-parameters flag. Thanks to Simon Reinhardt for the patch.
2015-10-02Bug 696117: Add NaCl cross compile rules.Robin Watts
Add NaCl cross compile rules to Makerules (together with a tiny header tweak). Thanks to Robert Bamler for the rules to include.
2015-06-02Fix FZ_LARGEFILE operation for large files with old style xrefs.Robin Watts
I'd missed converting some int's to fz_off_t's.
2015-05-15Support pdf files larger than 2Gig.Robin Watts
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.
2015-05-14Remove stray duplicate #defineRobin Watts
2014-09-02Add locale-independent number formatting and parsing functions.Tor Andersson
2014-03-25Add va_copy/va_copy_end macros to support both C89 and C99.Tor Andersson
2014-03-19Implement our own vsnprintf variant.Tor Andersson
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
2014-01-07Introduce 'document handlers'.Robin Watts
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).