Age | Commit message (Collapse) | Author |
|
When writing few enough bits that they would fit into the 'spare' bits
in the last byte, I was failing to update the buffer.
Also, I was failing to grow the buffer enough, and calculating the
wrong number of bits left over in various places.
Both fixed here. Thanks to Robert Jedrzejczyk and Sebras!
|
|
|
|
|
|
Extend mupdfclean to have a new -l file that writes the file
linearized. This should still be considered experimental
When writing a pdf file, analyse object use, flatten resource use,
reorder the objects, generate a hintstream and output with linearisaton
parameters.
This is enough for Acrobat to accept the file as being optimised
for Fast Web View. We ought to add more tables to the hintstream
in some cases, but I doubt anyone actually uses it, the spec is so
badly written. Certainly acrobat accepts the file as being optimised
for 'Fast Web View'.
Update fz_dict_put to allow for us adding a reference to the dictionary
that is the sole owner of that reference already (i.e. don't drop then
keep something that has a reference count of just 1).
Update pdf_load_image_stream to use the stm_buf from the xref if there
is one.
Update pdf_close_document to discard any stm_bufs it may be holding.
Update fz_dict_put to be pdf_dict_put - this was missed in a renaming
ages ago and has been inconsistent since.
|
|
Details of buffers hidden in fitz-internal.h. Public API now just
lets us keep/drop and get storage details for a buffer.
fz_debug_outline{,_xml} lose the 'level' param in their public API.
fz_matrix_max_expansion hidden, as it's only used internally.
Document fz_setjmp/fz_longjmp and Apple specific hackery.
|
|
Attempt to separate public API from internal functions.
|
|
Remove stray space at the end of buffers.
|
|
|
|
The new fz_malloc_struct(A,B) macro allocates sizeof(B) bytes using
fz_malloc, and then passes the resultant pointer to Memento_label
to label it with "B".
This costs nothing in non-memento builds, but gives much nicer
listings of leaked blocks when memento is enabled.
|
|
|
|
Also: use 'cannot' instead of 'failed to' in error messages.
|
|
Another missed fz_rethrow. Also, ensure that fz_drop_buffer copes
with NULL input.
|
|
|
|
Huge pervasive change to lots of files, adding a context for exception
handling and allocation.
In time we'll move more statics into there.
Also fix some for(i = 0; i < function(...); i++) calls.
|
|
The run-together words are dead! Long live the underscores!
The postscript inspired naming convention of using all run-together
words has served us well, but it is now time for more readable code.
In this commit I have also added the sed script, rename.sed, that I used
to convert the source. Use it on your patches and application code.
|
|
and change the signature of fz_realloc to match.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the malloc-related patches.
|
|
|
|
|
|
|
|
|
|
|
|
|