[libpng16] Fixed some spelling errors.
This commit is contained in:
parent
e9567514dd
commit
810c99583b
@ -99,8 +99,8 @@ typedef png_byte *png_const_bytep;
|
||||
#define png_vpAg PNG_CHUNK('v', 'p', 'A', 'g')
|
||||
|
||||
/* Test on flag values as defined in the spec (section 5.4): */
|
||||
#define PNG_CHUNK_ANCILLIARY(c) (1 & ((c) >> 29))
|
||||
#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLIARY(c))
|
||||
#define PNG_CHUNK_ANCILLARY(c ) (1 & ((c) >> 29))
|
||||
#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c))
|
||||
#define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21))
|
||||
#define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13))
|
||||
#define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5))
|
||||
@ -195,15 +195,15 @@ find_by_flag(png_uint_32 flag)
|
||||
}
|
||||
|
||||
static int
|
||||
ancilliary(const char *name)
|
||||
ancillary(const char *name)
|
||||
{
|
||||
return PNG_CHUNK_ANCILLIARY(PNG_CHUNK(name[0], name[1], name[2], name[3]));
|
||||
return PNG_CHUNK_ANCILLARY(PNG_CHUNK(name[0], name[1], name[2], name[3]));
|
||||
}
|
||||
|
||||
static int
|
||||
ancilliaryb(const png_byte *name)
|
||||
ancillaryb(const png_byte *name)
|
||||
{
|
||||
return PNG_CHUNK_ANCILLIARY(PNG_CHUNK(name[0], name[1], name[2], name[3]));
|
||||
return PNG_CHUNK_ANCILLARY(PNG_CHUNK(name[0], name[1], name[2], name[3]));
|
||||
}
|
||||
|
||||
static int error_count = 0;
|
||||
@ -286,7 +286,7 @@ get_unknown(const char *file, int def, png_const_structp png_ptr,
|
||||
break;
|
||||
|
||||
case PNG_HANDLE_CHUNK_IF_SAFE:
|
||||
if (!ancilliaryb(unknown[num_unknown].name))
|
||||
if (!ancillaryb(unknown[num_unknown].name))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: if-safe: %s: unknown critical chunk saved\n",
|
||||
@ -528,10 +528,10 @@ check_handling(const char *file, int def, png_uint_32 chunks, png_uint_32 known,
|
||||
break;
|
||||
|
||||
case PNG_HANDLE_CHUNK_IF_SAFE:
|
||||
if (ancilliary(chunk_info[i].name))
|
||||
if (ancillary(chunk_info[i].name))
|
||||
{
|
||||
if (!(flag & unknown))
|
||||
error = "IF-SAFE: unknown ancilliary chunk lost";
|
||||
error = "IF-SAFE: unknown ancillary chunk lost";
|
||||
}
|
||||
|
||||
else if (flag & unknown)
|
||||
@ -570,10 +570,10 @@ check_handling(const char *file, int def, png_uint_32 chunks, png_uint_32 known,
|
||||
break;
|
||||
|
||||
case PNG_HANDLE_CHUNK_IF_SAFE:
|
||||
if (ancilliary(chunk_info[i].name))
|
||||
if (ancillary(chunk_info[i].name))
|
||||
{
|
||||
if (!(flag & unknown))
|
||||
error = "IF-SAFE: known ancilliary chunk lost";
|
||||
error = "IF-SAFE: known ancillary chunk lost";
|
||||
}
|
||||
|
||||
else if (flag & unknown)
|
||||
@ -643,7 +643,7 @@ main(int argc, const char **argv)
|
||||
/* Chunks should either be known or unknown, never both and this should apply
|
||||
* whether the chunk is before or after the IDAT (actually, the app can
|
||||
* probably change this by swapping the handling after the image, but this
|
||||
* test does not to that.)
|
||||
* test does not do that.)
|
||||
*/
|
||||
check_error(argc[argv],
|
||||
(flags[0][0]|flags[0][2]) & (flags[0][1]|flags[0][3]),
|
||||
|
6
png.h
6
png.h
@ -718,7 +718,7 @@ typedef struct png_unknown_chunk_t
|
||||
png_byte *data; /* Data, should not be modified on read! */
|
||||
png_size_t size;
|
||||
|
||||
/* On write 'locaation' must be set using the flag values listed below.
|
||||
/* On write 'location' must be set using the flag values listed below.
|
||||
* Notice that on read it is set by libpng however the values stored have
|
||||
* more bits set than are listed below. Always treat the value as a
|
||||
* bitmask. On write set only one bit - setting multiple bits may cause the
|
||||
@ -2373,7 +2373,7 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
|
||||
* PNG_HANDLE_CHUNK_NEVER:
|
||||
* Discard the chunk data.
|
||||
* PNG_HANDLE_CHUNK_IF_SAFE:
|
||||
* Keep the chunk data if the chunk is not critial else raise a chunk
|
||||
* Keep the chunk data if the chunk is not critical else raise a chunk
|
||||
* error.
|
||||
* PNG_HANDLE_CHUNK_ALWAYS:
|
||||
* Keep the chunk data.
|
||||
@ -2775,7 +2775,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
||||
* formats do not accomodate your needs then you can, and should, use the more
|
||||
* sophisticated APIs above - these support a wide variety of in-memory formats
|
||||
* and a wide variety of sophisticated transformations to those formats as well
|
||||
* as a wide variety of APIs to manipulate ancilliary information.
|
||||
* as a wide variety of APIs to manipulate ancillary information.
|
||||
*
|
||||
* To read a PNG file using the simplified API:
|
||||
*
|
||||
|
@ -38,7 +38,7 @@ write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr,
|
||||
int keep = png_handle_as_unknown(png_ptr, up->name);
|
||||
|
||||
/* NOTE: this code is radically different from the read side in the
|
||||
* matter of handling an ancilliary unknown chunk. In the read side
|
||||
* matter of handling an ancillary unknown chunk. In the read side
|
||||
* the default behavior is to discard it, in the code below the default
|
||||
* behavior is to write it. Critical chunks are, however, only
|
||||
* written if explicitly listed or if the default is set to write all
|
||||
@ -1330,7 +1330,7 @@ png_set_compression_window_bits(png_structrp png_ptr, int window_bits)
|
||||
/* Prior to 1.6.0 this would warn but then set the window_bits value, this
|
||||
* meant that negative window bits values could be selected which would cause
|
||||
* libpng to write a non-standard PNG file with raw deflate or gzip
|
||||
* compressed IDAT or ancilliary chunks. Such files can be read and there is
|
||||
* compressed IDAT or ancillary chunks. Such files can be read and there is
|
||||
* no warning on read, so this seems like a very bad idea.
|
||||
*/
|
||||
if (window_bits > 15)
|
||||
|
@ -677,7 +677,7 @@ png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp)
|
||||
|
||||
/* This is an internal error; 'next' must have been NULL! */
|
||||
if (output_len > 0)
|
||||
png_error(png_ptr, "error writing ancilliary chunked compressed data");
|
||||
png_error(png_ptr, "error writing ancillary chunked compressed data");
|
||||
}
|
||||
#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */
|
||||
|
||||
|
@ -669,7 +669,7 @@ option READ_USER_CHUNKS enables READ_UNKNOWN_CHUNKS USER_CHUNKS
|
||||
# on by the following option. In 1.6.0 turning this option *off* no longer
|
||||
# disables png_set_keep_unknown_chunks, a behavior which effectively prevented
|
||||
# unknown chunk saving by the first mechanism on read.
|
||||
#
|
||||
#
|
||||
# Notice that this option no longer affects the write code either. It can be
|
||||
# safely disabled and will prevent applications stopping libpng reading known
|
||||
# chunks.
|
||||
|
Loading…
Reference in New Issue
Block a user