Age | Commit message (Collapse) | Author |
|
We call Memento_takeRef etc throughout the code so that each block
keeps a history of the events on which it's reference count changes.
I'd missed a case - fixed here.
|
|
key_storable objects can either be freed 'directly' by an API call
(such as fz_drop_image), or 'internally' by the store realising that
the sole thing holding onto a key_storable is a key.
The current code frees more structure in the direct call than it
does in the internal call. Clearly this is wrong and leads to
leaks.
The fix is to do ALL the freeing in the internal 'drop' function
within the key_storable.
This means we don't need (or want) either fz_drop_key_storable_key or
fz_drop_key_storable to return an int to tell us whether they were
actually dropped, so we make that change to simplify the code.
This shifts the responsibility for freeing the extra internal
structure into the innermost drop functions - fz_drop_image_imp and
fz_drop_image_gprf_imp. To avoid duplicating code, we put the
extra freeing logic into a fz_drop_image_base function.
|
|
|
|
Previously this caused memory checker errors due to
a non-temporary pixmap being accidentally freed and
then later reused as expected.
|
|
When using .incbin, we forgot to zero-terminate. Add a -0 option to the
hexdump script.
|
|
|
|
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.
|
|
A nicer fix wouldn't require this #ifdeffery everywhere. Maybe
later.
|
|
|
|
|
|
|
|
TIFF already provides the a/b components prescaled.
Previously the colorspace color conversion process
scaled them again, causing out of range behaviour.
|
|
Previously, if a TIFF file was encoded using CCITT
fax group 3 compression and mixing 1D and 2D codes,
the fax decoder was not instructed to parse the
1D/2D indication bit after EOL. This caused later
issues when parsing the succeeding 1D/2D code,
e.g. resulting in the decoder encountering a
negative 1D code and returning with an error.
Setting k>0 means the 1D/2D indication bit is parsed.
The CCITT fax group 3 specification recommends
setting k based on the vertical resolution. MuPDF's
fax decoder depends only on if k is <0, 0 or >0, not
its value (as recommended by the PDF specification).
Therefore it is not necessary to use the vertical
resolution to determine a particular value for k.
|
|
This fixes a compilation warning when compiling for Android.
|
|
This really should have been part of commit
5030ba7ebf7b3706ac065deef750d647570525b3
which changed most places where ucdn.h is used.
|
|
|
|
|
|
Do the typecasting in the functions instead, reducing the risk
of function prototype mismatches.
|
|
|
|
It's not used, so prone to bit rot. Better to purge it.
|
|
|
|
|
|
Replace fz_print_hash with fz_hash_for_each iterator.
Use string formatting callback.
|
|
That's where it's actually being used.
|
|
Don't depend on stdio.h for our own I/O functions.
|
|
|
|
|
|
There is only one implementation, so don't bother with the abstraction.
Just use pdf_function directly.
|
|
|
|
If DISABLE_MUTHREADS is set, don't include the thread helper library.
If FZ_ENABLE_PDF is 0, don't include mupdf/pdf.h.
|
|
|
|
Move the two SVG utility functions into fitz/util.h
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
When we climb up the box tree to create a new block box for block-level
elements that are deep inside inline-level elements, we should propagate
this to the caller so it can also climb up. Otherwise other child
elements in the inline-level element will be inserted before the
block box that was created for the content that was shunted up the tree.
|
|
|
|
Also remove -I../../ucdn from the visual studio project.
|
|
|
|
Previously the default color of ink annotations was red, but
according to the pdf specification the default color should be
colorless transparent if no color is given.
|
|
|
|
This avoids altering the matrices previously given to the Text walker.
|
|
|