summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libpng/contrib/tools')
-rwxr-xr-xlibpng/contrib/tools/chkfmt2
-rw-r--r--libpng/contrib/tools/makesRGB.c6
-rw-r--r--libpng/contrib/tools/pngcp.c26
-rw-r--r--libpng/contrib/tools/pngfix.c16
4 files changed, 25 insertions, 25 deletions
diff --git a/libpng/contrib/tools/chkfmt b/libpng/contrib/tools/chkfmt
index a1b88ccb..95181fde 100755
--- a/libpng/contrib/tools/chkfmt
+++ b/libpng/contrib/tools/chkfmt
@@ -54,7 +54,7 @@ doed(){
}
# In beta versions the version string which appears in files can be a little
-# long and cause spuriously overlong lines. To avoid this subtitute the version
+# long and cause spuriously overlong lines. To avoid this substitute the version
# string with a 'standard' version a.b.cc before checking for long lines.
if test -r png.h
then
diff --git a/libpng/contrib/tools/makesRGB.c b/libpng/contrib/tools/makesRGB.c
index e66c9f15..d0c0ca93 100644
--- a/libpng/contrib/tools/makesRGB.c
+++ b/libpng/contrib/tools/makesRGB.c
@@ -388,7 +388,7 @@ main(int argc, char **argv)
if (!test_only)
{
- printf("PNG_CONST png_uint_16 png_sRGB_table[256] =\n{\n ");
+ printf("const png_uint_16 png_sRGB_table[256] =\n{\n ");
for (i=0; i<255; )
{
do
@@ -401,7 +401,7 @@ main(int argc, char **argv)
printf("%d\n};\n\n", png_sRGB_table[i]);
- printf("PNG_CONST png_uint_16 png_sRGB_base[512] =\n{\n ");
+ printf("const png_uint_16 png_sRGB_base[512] =\n{\n ");
for (i=0; i<511; )
{
do
@@ -413,7 +413,7 @@ main(int argc, char **argv)
}
printf("%d\n};\n\n", png_sRGB_base[i]);
- printf("PNG_CONST png_byte png_sRGB_delta[512] =\n{\n ");
+ printf("const png_byte png_sRGB_delta[512] =\n{\n ");
for (i=0; i<511; )
{
do
diff --git a/libpng/contrib/tools/pngcp.c b/libpng/contrib/tools/pngcp.c
index e82dddcc..16d4e7f4 100644
--- a/libpng/contrib/tools/pngcp.c
+++ b/libpng/contrib/tools/pngcp.c
@@ -191,7 +191,7 @@ vl_strategy[] =
/* This controls the order of search. */
{ "huffman", Z_HUFFMAN_ONLY },
{ "RLE", Z_RLE },
- { "fixed", Z_FIXED }, /* the remainder do window searchs */
+ { "fixed", Z_FIXED }, /* the remainder do window searches */
{ "filtered", Z_FILTERED },
{ "default", Z_DEFAULT_STRATEGY },
{ all, 0 }
@@ -336,7 +336,7 @@ static const option options[] =
# define VLC(name) VLCIDAT(name) VLCiCCP(name) VLCzTXt(name)
# ifdef PNG_SW_COMPRESS_png_level
- /* The libpng compression level isn't searched beause it justs sets the
+ /* The libpng compression level isn't searched because it justs sets the
* other things that are searched!
*/
VLO("compression", compression, 0)
@@ -735,7 +735,7 @@ option_index(struct display *dp, const char *opt, size_t len)
static int
get_option(struct display *dp, const char *opt, int *value)
{
- const png_byte i = option_index(dp, opt, strlen(opt));
+ png_byte i = option_index(dp, opt, strlen(opt));
if (dp->entry[i]) /* option was set on command line */
{
@@ -789,7 +789,7 @@ record_opt(struct display *dp, png_byte opt, const char *entry_name)
* numerical value.
*/
{
- const unsigned int sp = dp->csp; /* stack entry of next searched option */
+ unsigned int sp = dp->csp; /* stack entry of next searched option */
if (sp >= dp->tsp)
{
@@ -797,7 +797,7 @@ record_opt(struct display *dp, png_byte opt, const char *entry_name)
* searched entry or the start of the dp->curr buffer if there is nothing
* on the stack yet (sp == 0).
*/
- const int offset = set_opt_string_(dp, sp, opt, entry_name);
+ int offset = set_opt_string_(dp, sp, opt, entry_name);
if (sp > 0)
dp->stack[sp-1].opt_string_end = offset;
@@ -1222,7 +1222,7 @@ advance_opt(struct display *dp, png_byte opt, int search)
}
static int
-getallopts_(struct display *dp, const png_byte opt, int *value, int record)
+getallopts_(struct display *dp, png_byte opt, int *value, int record)
/* Like getop but iterate over all the values if the option was set to "all".
*/
{
@@ -1259,7 +1259,7 @@ getsearchopts(struct display *dp, const char *opt_str, int *value)
/* As above except that if the option was not set try a search */
{
png_byte istrat;
- const png_byte opt = option_index(dp, opt_str, strlen(opt_str));
+ png_byte opt = option_index(dp, opt_str, strlen(opt_str));
int record = options[opt].search;
const char *entry_name;
@@ -1725,7 +1725,7 @@ display_start_read(struct display *dp, const char *filename)
}
static void PNGCBAPI
-read_function(png_structp pp, png_bytep data, png_size_t size)
+read_function(png_structp pp, png_bytep data, size_t size)
{
struct display *dp = get_dp(pp);
@@ -1881,7 +1881,7 @@ display_start_write(struct display *dp, const char *filename)
}
static void PNGCBAPI
-write_function(png_structp pp, png_bytep data, png_size_t size)
+write_function(png_structp pp, png_bytep data, size_t size)
{
struct display *dp = get_dp(pp);
@@ -2117,7 +2117,7 @@ better_options(const struct display *dp)
*
* This function looks through the stack from the bottom up looking for an
* option that does not match the current best value. When it finds one it
- * checks to see if it is more or less desireable and returns true or false
+ * checks to see if it is more or less desirable and returns true or false
* as appropriate.
*
* Notice that this means that the order options are pushed onto the stack
@@ -2220,7 +2220,7 @@ cp_one_file(struct display *dp, const char *filename, const char *destname)
strcpy(dp->best, dp->curr);
dp->best_size = dp->write_size;
- if (dp->nsp > 0) /* interating over lists */
+ if (dp->nsp > 0) /* iterating over lists */
{
char *tmpname, tmpbuf[(sizeof dp->namebuf) + 4];
assert(dp->curr[0] == ' ' && dp->tsp > 0);
@@ -2302,7 +2302,7 @@ cppng(struct display *dp, const char *file, const char *gv dest)
}
int
-main(const int argc, const char * const * const argv)
+main(int argc, char **argv)
{
/* For each file on the command line test it with a range of transforms */
int option_end;
@@ -2379,7 +2379,7 @@ main(const int argc, const char * const * const argv)
/* Here on any return, including failures, except user/internal issues
*/
{
- const int pass = (d.options & STRICT) ?
+ int pass = (d.options & STRICT) ?
RESULT_STRICT(d.results) : RESULT_RELAXED(d.results);
if (!pass)
diff --git a/libpng/contrib/tools/pngfix.c b/libpng/contrib/tools/pngfix.c
index 69ffc170..2fa5d13e 100644
--- a/libpng/contrib/tools/pngfix.c
+++ b/libpng/contrib/tools/pngfix.c
@@ -772,7 +772,7 @@ skip_chunk_type(const struct global *global, png_uint_32 type)
return 0;
/* Chunks that specify gamma encoding which should therefore only be
- * removed the the user insists:
+ * removed if the user insists:
*/
case png_gAMA: case png_sRGB:
if (global->skip >= SKIP_ALL)
@@ -2363,7 +2363,7 @@ zlib_advance(struct zlib *zlib, png_uint_32 nbytes)
flush = Z_NO_FLUSH;
out_bytes = 0;
- /* NOTE: expression 3 is only evaluted on 'continue', because of the
+ /* NOTE: expression 3 is only evaluated on 'continue', because of the
* 'break' at the end of this loop below.
*/
for (;endrc == ZLIB_OK;
@@ -2514,7 +2514,7 @@ zlib_run(struct zlib *zlib)
*/
for (;;)
{
- const unsigned int count = list->count;
+ unsigned int count = list->count;
unsigned int i;
for (i = 0; i<count; ++i)
@@ -2664,7 +2664,7 @@ zlib_check(struct file *file, png_uint_32 offset)
* this case, so do the optimization anyway.
*/
if (zlib.cksum)
- chunk_message(zlib.chunk, "zlib checkum");
+ chunk_message(zlib.chunk, "zlib checksum");
break;
@@ -2791,7 +2791,7 @@ process_chunk(struct file *file, png_uint_32 file_crc, png_uint_32 next_length,
* to read_chunk.
*/
{
- const png_uint_32 type = file->type;
+ png_uint_32 type = file->type;
if (file->global->verbose > 1)
{
@@ -3152,7 +3152,7 @@ read_chunk(struct file *file)
}
}
- /* Control gets to here if the the stream seems invalid or damaged in some
+ /* Control gets to here if the stream seems invalid or damaged in some
* way. Either there was a problem reading all the expected data (this
* chunk's data, its CRC and the length and type of the next chunk) or the
* next chunk length/type are invalid. Notice that the cases that end up
@@ -3678,7 +3678,7 @@ usage(const char *prog)
size_t i;
static const char *usage_string[] = {
" Tests, optimizes and optionally fixes the zlib header in PNG files.",
-" Optionally, when fixing, strips ancilliary chunks from the file.",
+" Optionally, when fixing, strips ancillary chunks from the file.",
0,
"OPTIONS",
" OPERATION",
@@ -3710,7 +3710,7 @@ usage(const char *prog)
" practice most programs will ignore it.",
" bKGD [transform]: This is used by libpng transforms."
" --max=<number>:",
-" Use IDAT chunks sized <number>. If no number is given the the IDAT",
+" Use IDAT chunks sized <number>. If no number is given the IDAT",
" chunks will be the maximum size permitted; 2^31-1 bytes. If the option",
" is omitted the original chunk sizes will not be changed. When the",
" option is given --strip=unsafe is set automatically. This may be",