From efc4b697675e2f500408c67afa30fe977306d8a5 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 7 Nov 2011 23:31:34 -0600 Subject: [PATCH] [libpng15] Fixed some typos in comments. --- png.h | 4 ++-- pngpriv.h | 2 +- pngread.c | 5 +++-- pngrtran.c | 6 +++--- pngwrite.c | 13 +++++++------ 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/png.h b/png.h index 922fe16b3..7d44b7b2d 100644 --- a/png.h +++ b/png.h @@ -2652,7 +2652,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); * 3) Call the appropriate png_image_write... function with a pointer to the * image to write the PNG data. * - * png_image is a structure that describes the in-memory formant of an image + * png_image is a structure that describes the in-memory format of an image * when it is being read or define the in-memory format of an image that you * need to write: */ @@ -2734,7 +2734,7 @@ typedef struct #endif /* Supported formats are as follows. Future versions of libpng may support more - * formats, for compatibility with older versions simply check if the format + * formats; for compatibility with older versions simply check if the format * macro is defined using #ifdef. These defines describe the in-memory layout * of the components of the pixels of the image. * diff --git a/pngpriv.h b/pngpriv.h index 9a28382ea..0989521ec 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -515,7 +515,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; abs((int)((c1).green) - (int)((c2).green)) + \ abs((int)((c1).blue) - (int)((c2).blue))) -/* Added to libpng-1.5.7: sRGB convertion tables */ +/* Added to libpng-1.5.7: sRGB conversion tables */ #ifdef PNG_SIMPLIFIED_READ_SUPPORTED PNG_EXTERN /*PRIVATE*/ PNG_CONST png_uint_16 png_sRGB_table[256]; /* Convert from an sRGB encoded value 0..255 to a 16-bit linear value, diff --git a/pngread.c b/pngread.c index d96b98ae0..c4fb05b33 100644 --- a/pngread.c +++ b/pngread.c @@ -83,8 +83,9 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_SETJMP_SUPPORTED /* Applications that neglect to set up their own setjmp() and then - encounter a png_error() will longjmp here. Since the jmpbuf is - then meaningless we abort instead of returning. */ + * encounter a png_error() will longjmp here. Since the jmpbuf is + * then meaningless we abort instead of returning. + */ #ifdef USE_FAR_KEYWORD if (setjmp(tmp_jmpbuf)) #else diff --git a/pngrtran.c b/pngrtran.c index a4a1a9ffa..112d2b8f9 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -2562,7 +2562,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) if (row_info->bit_depth == 16) { png_bytep sp = row; /* source */ - png_bytep dp = row; /* destinaton */ + png_bytep dp = row; /* destination */ png_bytep ep = sp + row_info->rowbytes; /* end+1 */ while (sp < ep) @@ -2623,7 +2623,7 @@ png_do_chop(png_row_infop row_info, png_bytep row) if (row_info->bit_depth == 16) { png_bytep sp = row; /* source */ - png_bytep dp = row; /* destinaton */ + png_bytep dp = row; /* destination */ png_bytep ep = sp + row_info->rowbytes; /* end+1 */ while (sp < ep) @@ -3331,7 +3331,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) if (red != green || red != blue) rgb_error |= 1; - /* From 1.5.5 in the 16 bit case do the accurate convertion even + /* From 1.5.5 in the 16 bit case do the accurate conversion even * in the 'fast' case - this is because this is where the code * ends up when handling linear 16 bit data. */ diff --git a/pngwrite.c b/pngwrite.c index 76bdd791f..9c2e533fd 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -493,8 +493,9 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_SETJMP_SUPPORTED /* Applications that neglect to set up their own setjmp() and then - encounter a png_error() will longjmp here. Since the jmpbuf is - then meaningless we abort instead of returning. */ + * encounter a png_error() will longjmp here. Since the jmpbuf is + * then meaningless we abort instead of returning. + */ #ifdef USE_FAR_KEYWORD if (setjmp(tmp_jmpbuf)) #else @@ -1709,8 +1710,8 @@ typedef struct png_voidp local_row; } png_image_write_control; -/* Write png_uint_16 input to a 16-bit PNG, the png_ptr has already been set to - * do any necssary byte swapped. The component order is defined by the +/* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to + * do any necessary byte swapping. The component order is defined by the * png_image format value. */ static int @@ -1745,7 +1746,7 @@ png_write_image_16bit(png_voidp argument) /* Work out the output row end and count over this, note that the increment * above to 'row' means that row_end can actually be beyond the end of the - * row, this is correct. + * row; this is correct. */ row_end = output_row + image->width * (channels+1); @@ -1763,7 +1764,7 @@ png_write_image_16bit(png_voidp argument) out_ptr[aindex] = alpha; /* Calculate a reciprocal. The correct calculation is simply - * component/alpha*65535 << 15. (I.e. 15 bits of precision), this + * component/alpha*65535 << 15. (I.e. 15 bits of precision); this * allows correct rounding by adding .5 before the shift. 'reciprocal' * is only initialized when required. */