summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jbig2dec/jbig2.h4
-rw-r--r--jbig2dec/jbig2_halftone.c14
-rw-r--r--jbig2dec/jbig2_huffman.c8
-rw-r--r--jbig2dec/jbig2_image_png.c2
-rw-r--r--jbig2dec/jbig2_metadata.c2
-rw-r--r--jbig2dec/jbig2_page.c6
-rw-r--r--jbig2dec/jbig2_priv.h2
-rw-r--r--jbig2dec/jbig2_segment.c2
-rw-r--r--jbig2dec/jbig2_text.c6
-rw-r--r--jbig2dec/jbig2dec.c10
-rw-r--r--jbig2dec/memento.c4
-rwxr-xr-xjbig2dec/test_jbig2dec.py2
12 files changed, 31 insertions, 31 deletions
diff --git a/jbig2dec/jbig2.h b/jbig2dec/jbig2.h
index 985a6e346..f03d98d19 100644
--- a/jbig2dec/jbig2.h
+++ b/jbig2dec/jbig2.h
@@ -71,7 +71,7 @@ void jbig2_image_clear(Jbig2Ctx *ctx, Jbig2Image *image, int value);
Jbig2Image *jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image, uint32_t width, uint32_t height);
/* errors are returned from the library via a callback. If no callback
- is provided (a NULL argument is passed ot jbig2_ctx_new) a default
+ is provided (a NULL argument is passed to jbig2_ctx_new) a default
handler is used which prints fatal errors to the stderr stream. */
/* error callback */
@@ -79,7 +79,7 @@ typedef int (*Jbig2ErrorCallback)(void *data, const char *msg, Jbig2Severity sev
/* memory allocation is likewise done via a set of callbacks so that
clients can better control memory usage. If a NULL is passed for
- this argumennt of jbig2_ctx_new, a default allocator based on malloc()
+ this argument of jbig2_ctx_new, a default allocator based on malloc()
is used. */
/* dynamic memory callbacks */
diff --git a/jbig2dec/jbig2_halftone.c b/jbig2dec/jbig2_halftone.c
index f826e1e94..e4dc0a19f 100644
--- a/jbig2dec/jbig2_halftone.c
+++ b/jbig2dec/jbig2_halftone.c
@@ -72,7 +72,7 @@ jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *im
return NULL;
}
/* compose with the REPLACE operator; the source
- will be clipped to the destintion, selecting the
+ will be clipped to the destination, selecting the
proper sub image */
jbig2_image_compose(ctx, new->patterns[i], image, -i * HPW, 0, JBIG2_COMPOSE_REPLACE);
}
@@ -108,9 +108,9 @@ jbig2_hd_release(Jbig2Ctx *ctx, Jbig2PatternDict *dict)
* @params: parameters from the pattern dictionary header
* @data: pointer to text region data to be decoded
* @size: length of text region data
- * @GB_stats: artimetic coding context to use
+ * @GB_stats: arithmetic coding context to use
*
- * Implements the patten dictionary decoding proceedure
+ * Implements the pattern dictionary decoding procedure
* described in section 6.7 of the JBIG2 spec.
*
* returns: a pointer to the resulting dictionary on success
@@ -241,7 +241,7 @@ jbig2_pattern_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segme
* @GSBPP: number of bitplanes/Jbig2Images to use
* @GSKIP: mask indicating which values should be skipped
* @GSTEMPLATE: template used to code the gray-scale bitplanes
- * @GB_stats: artimetic coding context to use
+ * @GB_stats: arithmetic coding context to use
*
* Implements the decoding a gray-scale image described in
* annex C.5. This is part of the halftone region decoding.
@@ -431,9 +431,9 @@ jbig2_decode_ht_region_get_hpats(Jbig2Ctx *ctx, Jbig2Segment *segment)
* @params: parameters
* @data: pointer to halftone region data to be decoded
* @size: length of halftone region data
- * @GB_stats: artimetic coding context to use
+ * @GB_stats: arithmetic coding context to use
*
- * Implements the halftone region decoding proceedure
+ * Implements the halftone region decoding procedure
* described in section 6.6.5 of the JBIG2 spec.
*
* returns: 0 on success
@@ -495,7 +495,7 @@ jbig2_decode_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
gray_val = GI[ng][mg];
if (gray_val >= HNUMPATS) {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "gray-scale image uses value %d which larger than pattern dictionary", gray_val);
- /* use highest aviable pattern */
+ /* use highest available pattern */
gray_val = HNUMPATS - 1;
}
jbig2_image_compose(ctx, image, HPATS->patterns[gray_val], x, y, params->op);
diff --git a/jbig2dec/jbig2_huffman.c b/jbig2dec/jbig2_huffman.c
index 8889ea3d3..54b513cc0 100644
--- a/jbig2dec/jbig2_huffman.c
+++ b/jbig2dec/jbig2_huffman.c
@@ -132,7 +132,7 @@ jbig2_dump_huffman_table(const Jbig2HuffmanTable *table)
int i;
int table_size = (1 << table->log_table_size);
- fprintf(stderr, "huffman table %p (log_table_size=%d, %d entries, entryies=%p):\n", table, table->log_table_size, table_size, table->entries);
+ fprintf(stderr, "huffman table %p (log_table_size=%d, %d entries, entries=%p):\n", table, table->log_table_size, table_size, table->entries);
for (i = 0; i < table_size; i++) {
fprintf(stderr, "%6d: PREFLEN=%d, RANGELEN=%d, ", i, table->entries[i].PREFLEN, table->entries[i].RANGELEN);
if (table->entries[i].flags & JBIG2_HUFFMAN_FLAGS_ISEXT) {
@@ -532,11 +532,11 @@ jbig2_table(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
/* B.2 2) (B.2.2) The lower bound of the first table line in the encoded table */
const int32_t HTLOW = jbig2_get_int32(segment_data + 1);
- /* B.2 3) (B.2.3) One larger than the upeer bound of
+ /* B.2 3) (B.2.3) One larger than the upper bound of
the last normal table line in the encoded table */
const int32_t HTHIGH = jbig2_get_int32(segment_data + 5);
- /* estimated number of lines int this table, used for alloacting memory for lines */
+ /* estimated number of lines int this table, used for allocating memory for lines */
const size_t lines_max = (segment->data_length * 8 - HTPS * (HTOOB ? 3 : 2)) / (HTPS + HTRS) + (HTOOB ? 3 : 2);
/* points to a first table line data */
@@ -718,7 +718,7 @@ main(int argc, char **argv)
ws.get_next_word = test_get_word;
hs = jbig2_huffman_new(ctx, &ws);
- printf("testing jbig2 huffmann decoding...");
+ printf("testing jbig2 huffman decoding...");
printf("\t(should be 8 5 (oob) 8)\n");
{
diff --git a/jbig2dec/jbig2_image_png.c b/jbig2dec/jbig2_image_png.c
index 4776c74f3..44b42662a 100644
--- a/jbig2dec/jbig2_image_png.c
+++ b/jbig2dec/jbig2_image_png.c
@@ -117,7 +117,7 @@ jbig2_image_write_png(Jbig2Image *image, FILE *out)
png_set_IHDR(png, info, image->width, image->height, 1, PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
png_write_info(png, info);
- /* png natively treates 0 as black. This will convert for us */
+ /* png natively treats 0 as black. This will convert for us */
png_set_invert_mono(png);
/* write out each row in turn */
diff --git a/jbig2dec/jbig2_metadata.c b/jbig2dec/jbig2_metadata.c
index 8065a1785..7d7de1620 100644
--- a/jbig2dec/jbig2_metadata.c
+++ b/jbig2dec/jbig2_metadata.c
@@ -153,7 +153,7 @@ too_short:
return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unexpected end of comment segment");
}
-/* decode a UCS-16 comment segement 7.4.15.2 */
+/* decode a UCS-16 comment segment 7.4.15.2 */
int
jbig2_comment_unicode(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
{
diff --git a/jbig2dec/jbig2_page.c b/jbig2dec/jbig2_page.c
index e193f5fac..3a32ab6fe 100644
--- a/jbig2dec/jbig2_page.c
+++ b/jbig2dec/jbig2_page.c
@@ -118,7 +118,7 @@ jbig2_page_info(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_dat
}
}
if (page->height == 0xFFFFFFFF && page->striped == FALSE) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "height is unspecified but page is not markes as striped");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "height is unspecified but page is not marks as striped");
page->striped = TRUE;
}
page->end_row = 0;
@@ -129,7 +129,7 @@ jbig2_page_info(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_dat
dump_page_info(ctx, segment, page);
- /* allocate an approprate page image buffer */
+ /* allocate an appropriate page image buffer */
/* 7.4.8.2 */
if (page->height == 0xFFFFFFFF) {
page->image = jbig2_image_new(ctx, page->width, page->stripe_size);
@@ -246,7 +246,7 @@ jbig2_page_add_result(Jbig2Ctx *ctx, Jbig2Page *page, Jbig2Image *image, int x,
return 0;
}
- /* grow the page to accomodate a new stripe if necessary */
+ /* grow the page to accommodate a new stripe if necessary */
if (page->striped && page->height == 0xFFFFFFFF) {
uint32_t new_height = y + image->height + page->end_row;
diff --git a/jbig2dec/jbig2_priv.h b/jbig2dec/jbig2_priv.h
index 64a7d276e..196771273 100644
--- a/jbig2dec/jbig2_priv.h
+++ b/jbig2dec/jbig2_priv.h
@@ -114,7 +114,7 @@ int jbig2_error(Jbig2Ctx *ctx, Jbig2Severity severity, int32_t seg_idx, const ch
/* the page structure handles decoded page
results. it's allocated by a 'page info'
- segement and marked complete by an 'end of page'
+ segment and marked complete by an 'end of page'
segment.
*/
typedef enum {
diff --git a/jbig2dec/jbig2_segment.c b/jbig2dec/jbig2_segment.c
index 9cb0e286f..5e124af9a 100644
--- a/jbig2dec/jbig2_segment.c
+++ b/jbig2dec/jbig2_segment.c
@@ -206,7 +206,7 @@ jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_
bool necessary = type & 0x80000000;
if (necessary && !reserved) {
- jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "extension segment is marked 'necessary' but " "not 'reservered' contrary to spec");
+ jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "extension segment is marked 'necessary' but " "not 'reserved' contrary to spec");
}
switch (type) {
diff --git a/jbig2dec/jbig2_text.c b/jbig2dec/jbig2_text.c
index 630fa5f18..7f2fada73 100644
--- a/jbig2dec/jbig2_text.c
+++ b/jbig2dec/jbig2_text.c
@@ -58,7 +58,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
const Jbig2SymbolDict *const *dicts, const uint32_t n_dicts,
Jbig2Image *image, const byte *data, const size_t size, Jbig2ArithCx *GR_stats, Jbig2ArithState *as, Jbig2WordStream *ws)
{
- /* relevent bits of 6.4.4 */
+ /* relevant bits of 6.4.4 */
uint32_t NINSTANCES;
uint32_t ID;
int32_t STRIPT;
@@ -122,7 +122,7 @@ jbig2_decode_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
goto cleanup1;
}
- /* decode the symbol id codelengths using the runlength table */
+ /* 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!");
@@ -783,7 +783,7 @@ jbig2_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data
goto cleanup1;
}
if (dicts == NULL) {
- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "unable to retrive symbol dictionaries! previous parsing error?");
+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "unable to retrieve symbol dictionaries! previous parsing error?");
goto cleanup1;
} else {
uint32_t index;
diff --git a/jbig2dec/jbig2dec.c b/jbig2dec/jbig2dec.c
index 45d87f5b0..9ab48e726 100644
--- a/jbig2dec/jbig2dec.c
+++ b/jbig2dec/jbig2dec.c
@@ -248,23 +248,23 @@ error_callback(void *error_callback_data, const char *buf, Jbig2Severity severit
if (params->verbose < 3)
return 0;
type = "DEBUG";
- break;;
+ break;
case JBIG2_SEVERITY_INFO:
if (params->verbose < 2)
return 0;
type = "info";
- break;;
+ break;
case JBIG2_SEVERITY_WARNING:
if (params->verbose < 1)
return 0;
type = "WARNING";
- break;;
+ break;
case JBIG2_SEVERITY_FATAL:
type = "FATAL ERROR";
- break;;
+ break;
default:
type = "unknown message";
- break;;
+ break;
}
if (seg_idx == -1)
segment[0] = '\0';
diff --git a/jbig2dec/memento.c b/jbig2dec/memento.c
index cb189c110..7e32b10f8 100644
--- a/jbig2dec/memento.c
+++ b/jbig2dec/memento.c
@@ -102,7 +102,7 @@ enum {
/* When we list leaked blocks at the end of execution, we search for pointers
* between blocks in order to be able to give a nice nested view.
* Unfortunately, if you have are running your own allocator (such as
- * ghostscripts chunk allocator) you can often find that the header of the
+ * Ghostscript's chunk allocator) you can often find that the header of the
* block always contains pointers to next or previous blocks. This tends to
* mean the nesting displayed is "uninteresting" at best :)
*
@@ -740,7 +740,7 @@ Memento_init(void)
/* MacOSX has 10240, Ubuntu seems to have 256 */
#define OPEN_MAX 10240
-/* stashed_map[j] = i means that filedescriptor i-1 was duplicated to j */
+/* stashed_map[j] = i means that file descriptor i-1 was duplicated to j */
int stashed_map[OPEN_MAX];
extern size_t backtrace(void **, int);
diff --git a/jbig2dec/test_jbig2dec.py b/jbig2dec/test_jbig2dec.py
index 628beb33c..a84143833 100755
--- a/jbig2dec/test_jbig2dec.py
+++ b/jbig2dec/test_jbig2dec.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python
-# this is the testtest script for jbig2dec
+# this is the test script for jbig2dec
import os, re
import sys, time