summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-05-24 03:18:04 +0800
committerSebastian Rasmussen <sebras@gmail.com>2018-07-13 16:54:30 +0800
commit6cc76f397ff5af382e4e49914d1b42df3e0a78e4 (patch)
tree561d33a017e66f4246276f20e3571f1743f612f6
parent344a90c91dc03e9ae80500303e67594f175374e3 (diff)
downloadghostpdl-6cc76f397ff5af382e4e49914d1b42df3e0a78e4.tar.gz
jbig2dec: Rephrase error messages.
-rw-r--r--jbig2dec/jbig2.c10
-rw-r--r--jbig2dec/jbig2_arith_int.c12
-rw-r--r--jbig2dec/jbig2_generic.c4
-rw-r--r--jbig2dec/jbig2_halftone.c16
-rw-r--r--jbig2dec/jbig2_huffman.c8
-rw-r--r--jbig2dec/jbig2_image.c2
-rw-r--r--jbig2dec/jbig2_image_png.c2
-rw-r--r--jbig2dec/jbig2_mmr.c20
-rw-r--r--jbig2dec/jbig2_page.c4
-rw-r--r--jbig2dec/jbig2_refinement.c10
-rw-r--r--jbig2dec/jbig2_segment.c4
-rw-r--r--jbig2dec/jbig2_symbol_dict.c34
-rw-r--r--jbig2dec/jbig2_text.c46
13 files changed, 86 insertions, 86 deletions
diff --git a/jbig2dec/jbig2.c b/jbig2dec/jbig2.c
index d58ad27eb..cdb49cd3b 100644
--- a/jbig2dec/jbig2.c
+++ b/jbig2dec/jbig2.c
@@ -111,7 +111,7 @@ jbig2_ctx_new(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCtx *g
result = (Jbig2Ctx *) jbig2_alloc(allocator, sizeof(Jbig2Ctx), 1);
if (result == NULL) {
- error_callback(error_callback_data, "initial context allocation failed!", JBIG2_SEVERITY_FATAL, -1);
+ error_callback(error_callback_data, "initial context allocation failed", JBIG2_SEVERITY_FATAL, -1);
return result;
}
@@ -129,7 +129,7 @@ jbig2_ctx_new(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCtx *g
result->n_segments_max = 16;
result->segments = jbig2_new(result, Jbig2Segment *, result->n_segments_max);
if (result->segments == NULL) {
- error_callback(error_callback_data, "initial segments allocation failed!", JBIG2_SEVERITY_FATAL, -1);
+ error_callback(error_callback_data, "initial segments allocation failed", JBIG2_SEVERITY_FATAL, -1);
jbig2_free(allocator, result);
return result;
}
@@ -139,7 +139,7 @@ jbig2_ctx_new(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCtx *g
result->max_page_index = 4;
result->pages = jbig2_new(result, Jbig2Page, result->max_page_index);
if (result->pages == NULL) {
- error_callback(error_callback_data, "initial pages allocation failed!", JBIG2_SEVERITY_FATAL, -1);
+ error_callback(error_callback_data, "initial pages allocation failed", JBIG2_SEVERITY_FATAL, -1);
jbig2_free(allocator, result->segments);
jbig2_free(allocator, result);
return result;
@@ -256,7 +256,7 @@ jbig2_data_in(Jbig2Ctx *ctx, const unsigned char *data, size_t size)
if (ctx->buf_wr_ix - ctx->buf_rd_ix < 9)
return 0;
if (memcmp(ctx->buf + ctx->buf_rd_ix, jbig2_id_string, 8))
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "Not a JBIG2 file header");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "not a JBIG2 file header");
/* D.4.2 */
ctx->file_header_flags = ctx->buf[ctx->buf_rd_ix + 8];
if (ctx->file_header_flags & 0xFC) {
@@ -333,7 +333,7 @@ jbig2_data_in(Jbig2Ctx *ctx, const unsigned char *data, size_t size)
case JBIG2_FILE_EOF:
if (ctx->buf_rd_ix == ctx->buf_wr_ix)
return 0;
- return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "Garbage beyond end of file");
+ return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "garbage beyond end of file");
}
}
}
diff --git a/jbig2dec/jbig2_arith_int.c b/jbig2dec/jbig2_arith_int.c
index f99132436..93baddcde 100644
--- a/jbig2dec/jbig2_arith_int.c
+++ b/jbig2dec/jbig2_arith_int.c
@@ -70,30 +70,30 @@ jbig2_arith_int_decode(Jbig2Ctx *ctx, Jbig2ArithIntCtx *actx, Jbig2ArithState *a
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx bit 0");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx decision bit 0");
PREV = (PREV << 1) | bit;
if (bit) {
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx bit 1");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx decision bit 1");
PREV = (PREV << 1) | bit;
if (bit) {
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx bit 2");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx decision bit 2");
PREV = (PREV << 1) | bit;
if (bit) {
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx bit 3");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx decision bit 3");
PREV = (PREV << 1) | bit;
if (bit) {
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx bit 4");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx decision bit 4");
PREV = (PREV << 1) | bit;
if (bit) {
@@ -124,7 +124,7 @@ jbig2_arith_int_decode(Jbig2Ctx *ctx, Jbig2ArithIntCtx *actx, Jbig2ArithState *a
for (i = 0; i < n_tail; i++) {
bit = jbig2_arith_decode(as, &IAx[PREV], &code);
if (code)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx code 7");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to decode IAx V bit %d", i);
PREV = ((PREV << 1) & 511) | (PREV & 256) | bit;
V = (V << 1) | bit;
}
diff --git a/jbig2dec/jbig2_generic.c b/jbig2dec/jbig2_generic.c
index d3959b224..be185616a 100644
--- a/jbig2dec/jbig2_generic.c
+++ b/jbig2dec/jbig2_generic.c
@@ -768,7 +768,7 @@ jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte
/* 7.4.6 */
if (segment->data_length < 18)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
jbig2_get_region_segment_info(&rsi, segment_data);
jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "generic region: %d x %d @ (%d, %d), flags = %02x", rsi.width, rsi.height, rsi.x, rsi.y, rsi.flags);
@@ -783,7 +783,7 @@ jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte
if (!(seg_flags & 1)) {
gbat_bytes = (seg_flags & 6) ? 2 : 8;
if (18 + gbat_bytes > segment->data_length)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
memcpy(gbat, segment_data + 18, gbat_bytes);
jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "gbat: %d, %d", gbat[0], gbat[1]);
}
diff --git a/jbig2dec/jbig2_halftone.c b/jbig2dec/jbig2_halftone.c
index 32857b01a..ccb8b48de 100644
--- a/jbig2dec/jbig2_halftone.c
+++ b/jbig2dec/jbig2_halftone.c
@@ -135,7 +135,7 @@ jbig2_decode_pattern_dict(Jbig2Ctx *ctx, Jbig2Segment *segment,
/* allocate the collective image */
image = jbig2_image_new(ctx, params->HDPW * (params->GRAYMAX + 1), params->HDPH);
if (image == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate collective bitmap for halftone dict!");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate collective bitmap for halftone dict");
return NULL;
}
@@ -164,13 +164,13 @@ jbig2_decode_pattern_dict(Jbig2Ctx *ctx, Jbig2Segment *segment,
if (as != NULL) {
code = jbig2_decode_generic_region(ctx, segment, &rparams, as, image, GB_stats);
} else {
- code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate storage for as in halftone dict!");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate storage for as in halftone dict");
}
jbig2_free(ctx->allocator, as);
jbig2_word_stream_buf_free(ctx, ws);
} else {
- code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate storage for ws in halftone dict!");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to allocate storage for ws in halftone dict");
}
}
@@ -194,7 +194,7 @@ jbig2_pattern_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segme
/* 7.4.4.1 - Data header */
if (segment->data_length < 7) {
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
}
flags = segment_data[0];
params.HDMMR = flags & 1;
@@ -211,7 +211,7 @@ jbig2_pattern_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segme
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "HDTEMPLATE is %d when HDMMR is %d, contrary to spec", params.HDTEMPLATE, params.HDMMR);
}
if (flags & 0xf8) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "Reserved flag bits non-zero");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "reserved flag bits non-zero");
}
/* 7.4.4.2 */
@@ -341,7 +341,7 @@ jbig2_decode_gray_scale_image(Jbig2Ctx *ctx, Jbig2Segment *segment,
code = jbig2_decode_generic_region(ctx, segment, &rparams, as, GSPLANES[j], GB_stats);
}
if (code != 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding GSPLANES for halftone image");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "failed to decode GSPLANES for halftone image");
goto cleanup;
}
@@ -608,7 +608,7 @@ jbig2_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_
if (code < 0) {
jbig2_image_release(ctx, image);
jbig2_free(ctx->allocator, GB_stats);
- return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to decode halftone region");
+ return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode halftone region");
}
/* todo: retain GB_stats? */
@@ -627,5 +627,5 @@ jbig2_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_
return code;
too_short:
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
}
diff --git a/jbig2dec/jbig2_huffman.c b/jbig2dec/jbig2_huffman.c
index ea9192edc..7783266ce 100644
--- a/jbig2dec/jbig2_huffman.c
+++ b/jbig2dec/jbig2_huffman.c
@@ -559,12 +559,12 @@ jbig2_table(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
/* allocate HuffmanParams & HuffmanLine */
params = jbig2_new(ctx, Jbig2HuffmanParams, 1);
if (params == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Could not allocate Huffman Table Parameter");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not allocate Huffman Table Parameter");
goto error_exit;
}
line = jbig2_new(ctx, Jbig2HuffmanLine, lines_max);
if (line == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Could not allocate Huffman Table Lines");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not allocate Huffman Table Lines");
goto error_exit;
}
/* B.2 5) */
@@ -611,7 +611,7 @@ jbig2_table(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
Jbig2HuffmanLine, NTEMP);
if (new_line == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Could not reallocate Huffman Table Lines");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not reallocate Huffman Table Lines");
goto error_exit;
}
line = new_line;
@@ -636,7 +636,7 @@ jbig2_table(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
return 0;
too_short:
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
error_exit:
if (line != NULL) {
jbig2_free(ctx->allocator, line);
diff --git a/jbig2dec/jbig2_image.c b/jbig2dec/jbig2_image.c
index 2a1185048..345786138 100644
--- a/jbig2dec/jbig2_image.c
+++ b/jbig2dec/jbig2_image.c
@@ -119,7 +119,7 @@ jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image, uint32_t width, uint32_t he
/* use the same stride, just change the length */
image->data = jbig2_renew(ctx, image->data, uint8_t, (int)check);
if (image->data == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "could not resize image buffer!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "could not resize image buffer");
return NULL;
}
if (height > image->height) {
diff --git a/jbig2dec/jbig2_image_png.c b/jbig2dec/jbig2_image_png.c
index 8b64469d6..73be4bc7a 100644
--- a/jbig2dec/jbig2_image_png.c
+++ b/jbig2dec/jbig2_image_png.c
@@ -59,7 +59,7 @@ jbig2_png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
check = fwrite(data, 1, length, f);
if (check != length) {
- png_error(png_ptr, "Write Error");
+ png_error(png_ptr, "write error");
}
}
diff --git a/jbig2dec/jbig2_mmr.c b/jbig2dec/jbig2_mmr.c
index 06fa6b6a3..e2d8e957d 100644
--- a/jbig2dec/jbig2_mmr.c
+++ b/jbig2dec/jbig2_mmr.c
@@ -863,7 +863,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
if (a2 > mmr->width)
a2 = mmr->width;
if (a1 == MINUS1 || a2 < a1)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative black run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white H run");
jbig2_set_bits(dst, a1, a2);
a0 = a2;
/* printf ("H %d %d\n", white_run, black_run); */
@@ -877,7 +877,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
if (a2 > mmr->width)
a2 = mmr->width;
if (a0 == MINUS1 || a1 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative black H run");
jbig2_set_bits(dst, a0, a1);
a0 = a2;
/* printf ("H %d %d\n", black_run, white_run); */
@@ -891,7 +891,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
b2 = jbig2_find_changing_element(ref, b1, mmr->width);
if (c) {
if (a0 == MINUS1 || b2 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative P run");
jbig2_set_bits(dst, a0, b2);
}
a0 = b2;
@@ -903,7 +903,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
b1 = jbig2_find_changing_element_of_color(ref, a0, mmr->width, !c);
if (c) {
if (a0 == MINUS1 || b1 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative V(0) run");
jbig2_set_bits(dst, a0, b1);
}
a0 = b1;
@@ -918,7 +918,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 + 1 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VR(1) run");
jbig2_set_bits(dst, a0, b1 + 1);
}
a0 = b1 + 1;
@@ -933,7 +933,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 + 2 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VR(2) run");
jbig2_set_bits(dst, a0, b1 + 2);
}
a0 = b1 + 2;
@@ -948,7 +948,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 + 3 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VR(3) run");
jbig2_set_bits(dst, a0, b1 + 3);
}
a0 = b1 + 3;
@@ -963,7 +963,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 - 1 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VL(1) run");
jbig2_set_bits(dst, a0, b1 - 1);
}
a0 = b1 - 1;
@@ -978,7 +978,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 - 2 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VL(2) run");
jbig2_set_bits(dst, a0, b1 - 2);
}
a0 = b1 - 2;
@@ -993,7 +993,7 @@ jbig2_decode_mmr_line(Jbig2Ctx *ctx, Jbig2MmrCtx *mmr, const byte *ref, byte *ds
break;
if (c) {
if (a0 == MINUS1 || b1 - 3 < a0)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative white run");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "negative VL(3) run");
jbig2_set_bits(dst, a0, b1 - 3);
}
a0 = b1 - 3;
diff --git a/jbig2dec/jbig2_page.c b/jbig2dec/jbig2_page.c
index f3f6f569c..43e17c945 100644
--- a/jbig2dec/jbig2_page.c
+++ b/jbig2dec/jbig2_page.c
@@ -161,7 +161,7 @@ jbig2_end_of_stripe(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment
uint32_t end_row;
if (segment->data_length < 4)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
end_row = jbig2_get_uint32(segment_data);
if (end_row < page.end_row) {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
@@ -196,7 +196,7 @@ jbig2_complete_page(Jbig2Ctx *ctx)
with the segment data length field of the last segment
set to -1. Try to cope with this here. */
if ((segment->data_length & 0xffffffff) == 0xffffffff) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "File has an invalid segment data length!" " Trying to decode using the available data.");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "file has an invalid segment data length; trying to decode using the available data");
segment->data_length = ctx->buf_wr_ix - ctx->buf_rd_ix;
code = jbig2_parse_segment(ctx, segment, ctx->buf + ctx->buf_rd_ix);
ctx->buf_rd_ix += segment->data_length;
diff --git a/jbig2dec/jbig2_refinement.c b/jbig2dec/jbig2_refinement.c
index 6a39bbb11..b05c6dff1 100644
--- a/jbig2dec/jbig2_refinement.c
+++ b/jbig2dec/jbig2_refinement.c
@@ -408,7 +408,7 @@ jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
/* 7.4.7 */
if (segment->data_length < 18)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
jbig2_get_region_segment_info(&rsi, segment_data);
jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "generic region: %d x %d @ (%d, %d), flags = %02x", rsi.width, rsi.height, rsi.x, rsi.y, rsi.flags);
@@ -426,7 +426,7 @@ jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
/* 7.4.7.3 */
if (!params.GRTEMPLATE) {
if (segment->data_length < 22)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
params.grat[0] = segment_data[offset + 0];
params.grat[1] = segment_data[offset + 1];
params.grat[2] = segment_data[offset + 2];
@@ -442,7 +442,7 @@ jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
ref = jbig2_region_find_referred(ctx, segment);
if (ref == NULL)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not find reference bitmap!");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not find reference bitmap");
/* the reference bitmap is the result of a previous
intermediate region segment; the reference selection
rules say to use the first one available, and not to
@@ -456,7 +456,7 @@ jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
/* the reference is just (a subset of) the page buffer */
params.reference = jbig2_image_clone(ctx, ctx->pages[ctx->current_page].image);
if (params.reference == NULL)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not clone reference bitmap!");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not clone reference bitmap");
/* TODO: subset the image if appropriate */
}
@@ -499,7 +499,7 @@ jbig2_refinement_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
code = jbig2_decode_refinement_region(ctx, segment, &params, as, image, GR_stats);
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "unable to decode refinement region");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "failed to decode refinement region");
goto cleanup;
}
diff --git a/jbig2dec/jbig2_segment.c b/jbig2dec/jbig2_segment.c
index 1d34b46b5..c2e238f96 100644
--- a/jbig2dec/jbig2_segment.c
+++ b/jbig2dec/jbig2_segment.c
@@ -204,7 +204,7 @@ jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_
bool necessary;
if (segment->data_length < 4)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
type = jbig2_get_uint32(segment_data);
reserved = type & 0x20000000;
@@ -234,7 +234,7 @@ int
jbig2_parse_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
{
jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
- "Segment %d, flags=%x, type=%d, data_length=%d", segment->number, segment->flags, segment->flags & 63, segment->data_length);
+ "segment %d, flags=%x, type=%d, data_length=%d", segment->number, segment->flags, segment->flags & 63, segment->data_length);
switch (segment->flags & 63) {
case 0:
return jbig2_symbol_dictionary(ctx, segment, segment_data);
diff --git a/jbig2dec/jbig2_symbol_dict.c b/jbig2dec/jbig2_symbol_dict.c
index 4c9a3175d..65d0e0518 100644
--- a/jbig2dec/jbig2_symbol_dict.c
+++ b/jbig2dec/jbig2_symbol_dict.c
@@ -340,7 +340,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
HCFIRSTSYM = NSYMSDECODED;
if ((int32_t) HCHEIGHT < 0) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Invalid HCHEIGHT value");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "invalid HCHEIGHT value");
goto cleanup2;
}
#ifdef JBIG2_DEBUG
@@ -366,14 +366,14 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
/* check for broken symbol table */
if (NSYMSDECODED >= params->SDNUMNEWSYMS) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "No OOB signaling end of height class %d", HCHEIGHT);
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "no OOB signaling end of height class %d", HCHEIGHT);
goto cleanup4;
}
SYMWIDTH = SYMWIDTH + DW;
TOTWIDTH = TOTWIDTH + SYMWIDTH;
if ((int32_t) SYMWIDTH < 0) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED + 1);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED + 1);
goto cleanup4;
}
#ifdef JBIG2_DEBUG
@@ -437,12 +437,12 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
/* as well as the text region parameters structure */
refagg_dicts = jbig2_new(ctx, Jbig2SymbolDict *, n_refagg_dicts);
if (refagg_dicts == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Out of memory allocating dictionary array");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "out of memory allocating dictionary array");
goto cleanup4;
}
refagg_dicts[0] = jbig2_sd_new(ctx, params->SDNUMINSYMS + params->SDNUMNEWSYMS);
if (refagg_dicts[0] == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Out of memory allocating symbol dictionary");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "out of memory allocating symbol dictionary");
goto cleanup4;
}
for (i = 0; i < params->SDNUMINSYMS; i++) {
@@ -451,7 +451,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
tparams = jbig2_new(ctx, Jbig2TextRegionParams, 1);
if (tparams == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Out of memory creating text region params");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "out of memory creating text region params");
goto cleanup4;
}
if (!params->SDHUFF) {
@@ -506,7 +506,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
image = jbig2_image_new(ctx, SYMWIDTH, HCHEIGHT);
if (image == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Out of memory creating symbol image");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "out of memory creating symbol image");
goto cleanup4;
}
@@ -562,7 +562,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
image = jbig2_image_new(ctx, SYMWIDTH, HCHEIGHT);
if (image == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Out of memory creating symbol image");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "out of memory creating symbol image");
goto cleanup4;
}
@@ -571,7 +571,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
rparams.reference = (ID < ninsyms) ? params->SDINSYMS->glyphs[ID] : SDNEWSYMS->glyphs[ID - ninsyms];
/* SumatraPDF: fail on missing glyphs */
if (rparams.reference == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "missing glyph %d/%d!", ID, ninsyms);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "missing glyph %d/%d", ID, ninsyms);
jbig2_image_release(ctx, image);
goto cleanup4;
}
@@ -634,7 +634,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
int x;
if (code) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding size of collective bitmap!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding size of collective bitmap");
goto cleanup4;
}
@@ -643,7 +643,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
image = jbig2_image_new(ctx, TOTWIDTH, HCHEIGHT);
if (image == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not allocate collective bitmap image!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not allocate collective bitmap image");
goto cleanup4;
}
@@ -686,7 +686,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
rparams.MMR = 1;
code = jbig2_decode_generic_mmr(ctx, segment, &rparams, data + jbig2_huffman_offset(hs), BMSIZE, image);
if (code) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding MMR bitmap image!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "failed to decode MMR-coded generic region");
jbig2_image_release(ctx, image);
goto cleanup4;
}
@@ -859,7 +859,7 @@ jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom DH huffman table not found (%d)", table_index);
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom DH huffman table not found (%d)", table_index);
}
params.SDHUFFDH = jbig2_build_huffman_table(ctx, huffman_params);
++table_index;
@@ -883,7 +883,7 @@ jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom DW huffman table not found (%d)", table_index);
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom DW huffman table not found (%d)", table_index);
break;
}
params.SDHUFFDW = jbig2_build_huffman_table(ctx, huffman_params);
@@ -903,7 +903,7 @@ jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
/* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom BMSIZE huffman table not found (%d)", table_index);
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom BMSIZE huffman table not found (%d)", table_index);
} else {
params.SDHUFFBMSIZE = jbig2_build_huffman_table(ctx, huffman_params);
++table_index;
@@ -921,7 +921,7 @@ jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segmen
/* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom REFAGG huffman table not found (%d)", table_index);
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom REFAGG huffman table not found (%d)", table_index);
} else {
params.SDHUFFAGGINST = jbig2_build_huffman_table(ctx, huffman_params);
++table_index;
@@ -1062,5 +1062,5 @@ too_short:
jbig2_release_huffman_table(ctx, params.SDHUFFBMSIZE);
jbig2_release_huffman_table(ctx, params.SDHUFFAGGINST);
}
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Segment too short");
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "segment too short");
}
diff --git a/jbig2dec/jbig2_text.c b/jbig2dec/jbig2_text.c
index 58d452211..f545fb738 100644
--- a/jbig2dec/jbig2_text.c
+++ b/jbig2dec/jbig2_text.c
@@ -117,7 +117,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
runcodeparams.n_lines = 35;
runcodes = jbig2_build_huffman_table(ctx, &runcodeparams);
if (runcodes == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error constructing symbol id runcode table!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error constructing symbol id runcode table");
code = -1;
goto cleanup1;
}
@@ -125,7 +125,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
/* decode the symbol id code lengths using the runlength table */
symcodelengths = jbig2_new(ctx, Jbig2HuffmanLine, SBNUMSYMS);
if (symcodelengths == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "memory allocation failure reading symbol ID huffman table!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "memory allocation failure reading symbol ID huffman table");
code = -1;
goto cleanup1;
}
@@ -133,7 +133,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
while (index < SBNUMSYMS) {
code = jbig2_huffman_get(hs, runcodes, &err);
if (err != 0 || code < 0 || code >= 35) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error reading symbol ID huffman table!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error reading symbol ID huffman table");
code = err ? err : -1;
goto cleanup1;
}
@@ -144,7 +144,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
} else {
if (code == 32) {
if (index < 1) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding symbol id table: run length with no antecedent!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding symbol id table: run length with no antecedent");
code = -1;
goto cleanup1;
}
@@ -165,7 +165,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, " read runcode%d at index %d (length %d range %d)", code, index, len, range);
if (index + range > SBNUMSYMS) {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
- "runlength extends %d entries beyond the end of symbol id table!", index + range - SBNUMSYMS);
+ "runlength extends %d entries beyond the end of symbol id table", index + range - SBNUMSYMS);
range = SBNUMSYMS - index;
}
for (r = 0; r < range; r++) {
@@ -194,7 +194,7 @@ cleanup1:
jbig2_release_huffman_table(ctx, runcodes);
if (SBSYMCODES == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not construct Symbol ID huffman table!");
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "could not construct Symbol ID huffman table");
jbig2_huffman_free(ctx, hs);
return ((code != 0) ? code : -1);
}
@@ -210,7 +210,7 @@ cleanup1:
code = jbig2_arith_int_decode(ctx, params->IADT, as, &STRIPT);
}
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to obtain strip T");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode strip T");
goto cleanup2;
}
@@ -228,7 +228,7 @@ cleanup1:
code = jbig2_arith_int_decode(ctx, params->IADT, as, &DT);
}
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to obtain delta T");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode delta T");
goto cleanup2;
}
DT *= params->SBSTRIPS;
@@ -246,7 +246,7 @@ cleanup1:
code = jbig2_arith_int_decode(ctx, params->IAFS, as, &DFS);
}
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to obtain strip symbol S-difference");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode strip symbol S-difference");
goto cleanup2;
}
FIRSTS += DFS;
@@ -279,7 +279,7 @@ cleanup1:
code = jbig2_arith_int_decode(ctx, params->IAIT, as, &CURT);
}
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to obtain symbol instance T coordinate");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode symbol instance T coordinate");
goto cleanup2;
}
T = STRIPT + CURT;
@@ -309,7 +309,7 @@ cleanup1:
IB = jbig2_image_clone(ctx, dicts[index]->glyphs[id]);
/* SumatraPDF: fail on missing glyphs */
if (!IB) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "missing glyph %d/%d!", index, id);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "missing glyph %d/%d", index, id);
goto cleanup2;
}
}
@@ -320,7 +320,7 @@ cleanup1:
code = jbig2_arith_int_decode(ctx, params->IARI, as, &RI);
}
if (code < 0) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to obtain symbol bitmap refinement indicator");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "failed to decode symbol bitmap refinement indicator");
goto cleanup2;
}
} else {
@@ -590,7 +590,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom FS huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom FS huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFFS = jbig2_build_huffman_table(ctx, huffman_params);
@@ -620,7 +620,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom DS huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom DS huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFDS = jbig2_build_huffman_table(ctx, huffman_params);
@@ -645,7 +645,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom DT huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom DT huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFDT = jbig2_build_huffman_table(ctx, huffman_params);
@@ -667,7 +667,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom RDW huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom RDW huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFRDW = jbig2_build_huffman_table(ctx, huffman_params);
@@ -694,7 +694,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom RDH huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom RDH huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFRDH = jbig2_build_huffman_table(ctx, huffman_params);
@@ -721,7 +721,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom RDX huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom RDX huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFRDX = jbig2_build_huffman_table(ctx, huffman_params);
@@ -748,7 +748,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 3: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom RDY huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom RDY huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFRDY = jbig2_build_huffman_table(ctx, huffman_params);
@@ -772,7 +772,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
case 1: /* Custom table from referred segment */
huffman_params = jbig2_find_table(ctx, segment, table_index);
if (huffman_params == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "Custom RSIZE huffman table not found (%d)", table_index);
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "custom RSIZE huffman table not found (%d)", table_index);
goto cleanup1;
}
params.SBHUFFRSIZE = jbig2_build_huffman_table(ctx, huffman_params);
@@ -800,7 +800,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
if (n_dicts != 0) {
dicts = jbig2_sd_list_referred(ctx, segment);
} else {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "text region refers to no symbol dictionaries!");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "text region refers to no symbol dictionaries");
goto cleanup1;
}
if (dicts == NULL) {
@@ -810,12 +810,12 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
uint32_t index;
if (dicts[0] == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to find first referenced symbol dictionary!");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to find first referenced symbol dictionary");
goto cleanup1;
}
for (index = 1; index < n_dicts; index++)
if (dicts[index] == NULL) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to find all referenced symbol dictionaries!");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to find all referenced symbol dictionaries");
n_dicts = index;
}
}