[devel] Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the

objective of simplifying and improving the cosmetic appearance of png.h.
This commit is contained in:
Glenn Randers-Pehrson 2010-12-06 18:28:02 -06:00
parent 27df3a44eb
commit 23d3970929
8 changed files with 542 additions and 500 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.0beta56 - December 6, 2010
Libpng 1.5.0beta56 - December 7, 2010
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -226,7 +226,7 @@ version 1.5.0beta24 [May 7, 2010]
offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
Added more blank lines for readability.
version 1.5.0beta25 [December 6, 2010]
version 1.5.0beta25 [December 7, 2010]
In pngpread.c: png_push_have_row() add check for new_row > height
Removed the now-redundant check for out-of-bounds new_row from example.c
@ -451,11 +451,11 @@ Version 1.5.0beta55 [November 21, 2010]
with pngwio.c and pngwutil.c because the 'write' callback and zlib
compression both fail to declare their input buffers with 'const'.
Version 1.5.0beta56 [December 6, 2010]
Version 1.5.0beta56 [December 7, 2010]
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added PNG_EXPORTX() and PNG_EXPORTA() macros for testing, with the
objective of improving the cosmetic appearance of png.h.
Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the
objective of simplifying and improving the cosmetic appearance of png.h.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -3089,11 +3089,11 @@ Version 1.5.0beta55 [November 21, 2010]
with pngwio.c and pngwutil.c because the 'write' callback and zlib
compression both fail to declare their input buffers with 'const'.
Version 1.5.0beta56 [December 6, 2010]
Version 1.5.0beta56 [December 7, 2010]
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Added some commentary about PNG_EXPORT in png.h and pngconf.h
Added PNG_EXPORTX() and PNG_EXPORTA() macros for testing, with the
objective of improving the cosmetic appearance of png.h.
Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the
objective of simplifying and improving the cosmetic appearance of png.h.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

982
png.h

File diff suppressed because it is too large Load Diff

View File

@ -310,18 +310,18 @@
* table entries, so we discard it here. See the .dfn files in the
* scripts directory.
*/
# define PNG_EXPORT(type, name, args, attributes, ordinal)\
# define PNG_EXPORT(ordinal, type, name, args)\
extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),)
#endif
#ifndef PNG_EXPORTA
# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\
attributes)
# define PNG_EXPORTX(ordinal, type, name, args)\
PNG_EXPORT(type, name, args,, ordinal )
# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_EXPORT(type, name, args, attributes, ordinal)
#endif
/* Use PNG_REMOVED to comment out a removed interface. */
#ifndef PNG_REMOVED
# define PNG_REMOVED(type, name, args, attributes, ordinal)
# define PNG_REMOVED(ordinal, type, name, args, attributes)
#endif
#ifndef PNG_CALLBACK
@ -436,18 +436,18 @@
#endif
#ifndef PNG_FP_EXPORT /* A floating point API. */
# ifdef PNG_FLOATING_POINT_SUPPORTED
# define PNG_FP_EXPORT(type, name, args, attributes, ordinal)\
PNG_EXPORT(type, name, args, attributes, ordinal)
# define PNG_FP_EXPORT(ordinal, type, name, args)\
PNG_EXPORT(ordinal, type, name, args)
# else /* No floating point APIs */
# define PNG_FP_EXPORT(type, name, args, attributes, ordinal)
# define PNG_FP_EXPORT(ordinal, type, name, args)
# endif
#endif
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
# ifdef PNG_FIXED_POINT_SUPPORTED
# define PNG_FIXED_EXPORT(type, name, args, attributes, ordinal)\
PNG_EXPORT(type, name, args, attributes, ordinal)
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
PNG_EXPORT(ordinal, type, name, args)
# else /* No fixed point APIs */
# define PNG_FIXED_EXPORT(type, name, args, attributes, ordinal)
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
# endif
#endif

View File

@ -9,9 +9,11 @@
* and license in png.h
*/
#define PNG_EXPORT(type, name, args, attributes, ordinal)\
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC- name @ordinal-PNG_DEFN_END
#define PNG_REMOVED(type, name, args, attributes, ordinal)\
#define PNG_EXPORT(ordinal, type, name, args)\
PNG_DEFN_MAGIC- name @ordinal-PNG_DEFN_END
#define PNG_REMOVED(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC-; name @ordinal-PNG_DEFN_END
#define PNG_EXPORT_LAST_ORDINAL(ordinal)\
PNG_DEFN_MAGIC-; @ordinal-PNG_DEFN_END

View File

@ -9,7 +9,9 @@
* and license in png.h
*/
#define PNG_EXPORT(type, name, args, attributes, ordinal)\
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC-SYMBOL_PREFIX @@@ name-PNG_DEFN_END
#define PNG_EXPORT(ordinal, type, name, args)\
PNG_DEFN_MAGIC-SYMBOL_PREFIX @@@ name-PNG_DEFN_END
#include "../png.h"

View File

@ -16,9 +16,11 @@
* .dfa file too.
*/
#define PNG_EXPORT(type, name, args, attributes, ordinal)\
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC-name @ordinal-PNG_DEFN_END
#define PNG_REMOVED(type, name, args, attributes, ordinal)\
#define PNG_EXPORT(ordinal, type, name, args)\
PNG_DEFN_MAGIC-name @ordinal-PNG_DEFN_END
#define PNG_REMOVED(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC-; name @ordinal-PNG_DEFN_END
#define PNG_EXPORT_LAST_ORDINAL(ordinal)\
PNG_DEFN_MAGIC-; @ordinal-PNG_DEFN_END

View File

@ -16,7 +16,9 @@
* substitution within the name, regular C ## joins the pp-tokens,
* not their final values.
*/
#define PNG_EXPORT(type, name, args, attributes, ordinal)\
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name;-PNG_DEFN_END
#define PNG_EXPORT(ordinal, type, name, args)\
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name;-PNG_DEFN_END
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END