| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Fixes Coverity CID 355175.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the JBIG2 specification segments numbers are 32 bit unsigned
integer. Previously any segment numbers larger than INT32_MAX would be passed
as negative numbers.
Some parts of the decoder do not yet know, or do not have access to the
currently decoded segment number, and this needs to be specially indicated.
Therefore jbig2dec appropriates the unlikely segment number 0xffffffff to
indicate an unknown segment number.
This is a change of the public API.
|
| |
|
| |
|
|
|
|
|
|
| |
When a called function indicates an error, the caller should print warnings.
Since the arithmetic decoder now uses the normal way of reporting errors,
the callers of the decoder are changed to report warnings.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously we passed in an int * to get errors back, and
used the return code for 0 or 1. Now we use the return code
for 0, 1 or -ve for error.
This saves between 1% and 2% of gs runtime for decoding
tests/pdf/Jbig2_042_06.pdf.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Do not prefix messages with "jbig2 error:", this ought to be
done by the error callback itself.
* Avoid using function names in messages as they mean nothing to
the end user.
* Avoid contractions in messages.
* Try to adhere to "failed to" pattern as far as possible.
* Messages start with lower case character, unless it refers to
something in the specification.
* Messages do not end with punctuation.
|
|
|
|
| |
This makes it clearer what is being returned upon error.
|
|
|
|
| |
Previously this might result in a memory leak.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some functions detected errors but would not return these
to the caller. These functions may now indicate errors:
jbig2_arith_decode(), jbig2_image_resize()
Errors detected by following functions were not always
handled, but they are now handled properly:
jbig2_arith_decode(), jbig2_arith_iaid_decode()
jbig2_arith_int_ctx_new(), jbig2_build_huffman_table()
jbig2_complete_page(), jbig2_image_compose()
jbig2_decode_refinement_region(), jbig2_ctx_new()
jbig2_image_resize(), jbig2_image_write_pbm()
jbig2_image_write_pbm_file(), jbig2_image_write_png()
jbig2_image_write_png_file(), jbig2_metadata_add()
jbig2_page_add_result(), jbig2_renew()
jbig2_strndup()
Some functions detected errors but did not fail early enough:
jbig2_decode_pattern_dict(), jbig2_decode_halftone_region()
jbig2_decode_mmr_line() detected errors but did not produce
suitable error messages. This has been rectified.
Finally, if a subfunction indicates an error by returning an
error code, the calling function will report a warning and
return, indicating failure.
|
|
|
|
|
|
|
|
|
| |
Also update copyright dates.
Remove gs_cmdl.ps as we no longer use it, and remove its entry from
psfiles.htm.
Remove xfonts.htm as this feature (xfont support) is long, long gone.
|
|
|
|
|
|
|
|
|
|
| |
The first patch for this bug made the error return from
jbig2_word_stream_buf_get_next_word pointless so this
patch removes all the remaining redundant code.
jbig2_word_stream_buf_get_next_word does not need to return
any value so this is now defined as a void type and the rest
of the code has been updated accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
First a pass through gnu indent:
indent \
-bad -nbap -nsob -br -ce -cli0 \
-npcs -ncs -i4 -di0 -psl -lp -lps -nut -l160 \
*.c *.h
Followed by astyle to patch over some of the indentation bugs in gnu indent:
astyle --style=kr -H -U -k3 *.c *.h
|
|
Squashed into one commit (see branch for details of the evolution of the
branch).
This brings gpcl6 and gxps into the Ghostscript build system, and a shared
set of graphics library object files for all the interpreters.
Also, brings the same configuration options to the pcl and xps products as we
have for Ghostscript.
|