From 81ce889435d4fcd2468d233e6a2bc9655c5183b7 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 24 Jan 2011 08:04:37 -0600 Subject: [PATCH] [devel] Fixed incorrect examples of callback prototypes in the manual. "png_ptr ptr" should be "png_structp png_ptr" --- ANNOUNCE | 1 + CHANGES | 1 + libpng-manual.txt | 14 +++++++------- libpng.3 | 14 +++++++------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 8f63b05ee..7c3b797df 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -97,6 +97,7 @@ Version 1.5.1beta09 [January 24, 2011] converting RGB to gray. Version 1.5.1beta10 [January 24, 2011] + Fixed incorrect examples of callback prototypes in the manual. Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 15869bd3b..4d1a3f090 100644 --- a/CHANGES +++ b/CHANGES @@ -3213,6 +3213,7 @@ Version 1.5.1beta09 [January 24, 2011] converting RGB to gray. Version 1.5.1beta10 [January 24, 2011] + Fixed incorrect examples of callback prototypes in the manual. In addition the order of the png_get_uint macros with respect to the relevant function definitions has been reversed. This helps the preprocessing of the diff --git a/libpng-manual.txt b/libpng-manual.txt index b583d8777..0a5a95914 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -455,7 +455,7 @@ Setting up callback code You can set up a callback function to handle any unknown chunks in the input stream. You must supply the function - read_chunk_callback(png_ptr ptr, + read_chunk_callback(png_structp png_ptr, png_unknown_chunkp chunk); { /* The unknown chunk structure contains your @@ -501,8 +501,8 @@ called after each row has been read, which you can use to control a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function - void read_row_callback(png_ptr ptr, png_uint_32 row, - int pass); + void read_row_callback(png_structp png_ptr, + png_uint_32 row, int pass); { /* put your code here */ } @@ -1507,7 +1507,7 @@ with You must supply the function - void read_transform_fn(png_ptr ptr, row_info_ptr + void read_transform_fn(png_structp png_ptr, row_info_ptr row_info, png_bytep data) See pngtest.c for a working example. Your function will be called @@ -2167,7 +2167,7 @@ called after each row has been written, which you can use to control a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function - void write_row_callback(png_ptr, png_uint_32 row, + void write_row_callback(png_structp png_ptr, png_uint_32 row, int pass); { /* put your code here */ @@ -2772,8 +2772,8 @@ with You must supply the function - void write_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) + void write_transform_fn(png_structp png_ptr ptr, + row_info_ptr row_info, png_bytep data) See pngtest.c for a working example. Your function will be called before any of the other transformations are processed. If supported diff --git a/libpng.3 b/libpng.3 index 186ded0df..98a658781 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1374,7 +1374,7 @@ Choices for (int) ancil_action are You can set up a callback function to handle any unknown chunks in the input stream. You must supply the function - read_chunk_callback(png_ptr ptr, + read_chunk_callback(png_structp png_ptr, png_unknown_chunkp chunk); { /* The unknown chunk structure contains your @@ -1420,8 +1420,8 @@ called after each row has been read, which you can use to control a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function - void read_row_callback(png_ptr ptr, png_uint_32 row, - int pass); + void read_row_callback(png_structp png_ptr, + png_uint_32 row, int pass); { /* put your code here */ } @@ -2426,7 +2426,7 @@ with You must supply the function - void read_transform_fn(png_ptr ptr, row_info_ptr + void read_transform_fn(png_structp png_ptr, row_info_ptr row_info, png_bytep data) See pngtest.c for a working example. Your function will be called @@ -3086,7 +3086,7 @@ called after each row has been written, which you can use to control a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function - void write_row_callback(png_ptr, png_uint_32 row, + void write_row_callback(png_structp png_ptr, png_uint_32 row, int pass); { /* put your code here */ @@ -3691,8 +3691,8 @@ with You must supply the function - void write_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) + void write_transform_fn(png_structp png_ptr ptr, + row_info_ptr row_info, png_bytep data) See pngtest.c for a working example. Your function will be called before any of the other transformations are processed. If supported