| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
The specification in 5.4.4 states that numbers are unsigned unless
otherwise stated. 7.4.1.1 through 7.4.1.4 specifying the region segment
height, width, x and y do not mention that these fields are signed,
hence they ought to read and handled as unsigned.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Attempting to take a reference to NULL is a no-op anyway.
|
|
|
|
|
| |
This more accurately explains what the function does, and
mirrors jbig2_image_release() quite well.
|
| |
|
|
|
|
|
| |
The first error detected ought to be a fatal error, but when this
error condition is propagated to callers, they should indicate warnings.
|
|
|
|
|
|
| |
This is because the debug code calls functions that write
PBM images or similar, these may fail and when this happens
the calling function ought to print a warning and fail itself.
|
|
|
|
|
|
|
| |
Only calls to jbig2_error() using fatal errors or warnings may
return, no calls to jbig2_error() using informational or debug
messages may return. This is preparation for jbig2_error() to
always return -1 for errors/warnings.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
ifdef out some used code.
Make some functions static that should be.
|
| |
|
|
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.
|