[libpng15] Added versioning to pnglibconf.h comments.

This commit is contained in:
John Bowler 2011-11-07 22:19:30 -06:00 committed by Glenn Randers-Pehrson
parent 7de02e722f
commit 92a1d46c8d
6 changed files with 41 additions and 9 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.7beta02 - November 5, 2011 Libpng 1.5.7beta02 - November 8, 2011
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -43,7 +43,7 @@ Version 1.5.7beta01 [November 4, 2011]
just the changes that definitely improve speed and remain simple. just the changes that definitely improve speed and remain simple.
The changes also slightly increase the clarity of the code. The changes also slightly increase the clarity of the code.
Version 1.5.7beta02 [November 5, 2011] Version 1.5.7beta02 [November 8, 2011]
Check compression_type parameter in png_get_iCCP and remove spurious Check compression_type parameter in png_get_iCCP and remove spurious
casts. The compression_type parameter is always assigned to, so must casts. The compression_type parameter is always assigned to, so must
be non-NULL. The cast of the profile length potentially truncated the be non-NULL. The cast of the profile length potentially truncated the
@ -57,6 +57,7 @@ Version 1.5.7beta02 [November 5, 2011]
tested in the future. tested in the future.
Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the
new PNG_JOIN macro. new PNG_JOIN macro.
Added versioning to pnglibconf.h comments.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net: Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit (subscription required; visit

View File

@ -3688,7 +3688,7 @@ Version 1.5.7beta01 [November 4, 2011]
just the changes that definitely improve speed and remain simple. just the changes that definitely improve speed and remain simple.
The changes also slightly increase the clarity of the code. The changes also slightly increase the clarity of the code.
Version 1.5.7beta02 [November 5, 2011] Version 1.5.7beta02 [November 8, 2011]
Check compression_type parameter in png_get_iCCP and remove spurious Check compression_type parameter in png_get_iCCP and remove spurious
casts. The compression_type parameter is always assigned to, so must casts. The compression_type parameter is always assigned to, so must
be non-NULL. The cast of the profile length potentially truncated the be non-NULL. The cast of the profile length potentially truncated the
@ -3702,6 +3702,7 @@ Version 1.5.7beta02 [November 5, 2011]
tested in the future. tested in the future.
Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the
new PNG_JOIN macro. new PNG_JOIN macro.
Added versioning to pnglibconf.h comments.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -50,9 +50,9 @@ all: libpng.a pngtest
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt, # The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
# copy this if the following doesn't work. # copy this if the following doesn't work.
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk ANNOUNCE
$(RM_F) $@ dfn?.out $(RM_F) $@ dfn?.out
$(AWK) -f scripts/options.awk out=dfn1.out\ $(AWK) -f scripts/options.awk out=dfn1.out ANNOUNCE\
scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2 scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
$(AWK) -f scripts/options.awk out=dfn2.out dfn1.out 1>&2 $(AWK) -f scripts/options.awk out=dfn2.out dfn1.out 1>&2
cp dfn2.out $@ cp dfn2.out $@

View File

@ -1,7 +1,7 @@
#!/bin/awk -f #!/bin/awk -f
# scripts/options.awk - library build configuration control # scripts/options.awk - library build configuration control
# #
# last changed in libpng version 1.5.0 - January 6, 2011 # last changed in libpng version 1.5.7 - November 11, 2011
# #
# Copyright (c) 1998-2011 Glenn Randers-Pehrson # Copyright (c) 1998-2011 Glenn Randers-Pehrson
# #
@ -32,6 +32,7 @@
BEGIN{ BEGIN{
out="/dev/null" # intermediate, preprocessed, file out="/dev/null" # intermediate, preprocessed, file
pre=-1 # preprocess (first line) pre=-1 # preprocess (first line)
version="" # version information
err=0 # in-line exit sets this err=0 # in-line exit sets this
start="PNG_DEFN_MAGIC-" # Arbitrary start start="PNG_DEFN_MAGIC-" # Arbitrary start
end="-PNG_DEFN_END" # Arbitrary end end="-PNG_DEFN_END" # Arbitrary end
@ -86,6 +87,17 @@ pre == -1{
} }
} }
# While pre-processing if the filename is ANNOUNCE then just look for a line
# which gives the version information for this build.
pre && FILENAME ~ /ANNOUNCE$/ && version == "" && $1 == "Libpng"{
version=$0
print "version =", version >out
}
pre && FILENAME ~ /ANNOUNCE$/{
next
}
# variable=value # variable=value
# Sets the given variable to the given value (the syntax is fairly # Sets the given variable to the given value (the syntax is fairly
# free form, except for deb (you are expected to understand how to # free form, except for deb (you are expected to understand how to
@ -95,6 +107,11 @@ pre == -1{
# rest of the actions, so the variable settings happen during # rest of the actions, so the variable settings happen during
# preprocessing but are recorded in the END action too. This # preprocessing but are recorded in the END action too. This
# allows them to be set on the command line too. # allows them to be set on the command line too.
$0 ~ /^[ ]*version[ ]*=/{
sub(/^[ ]*version[ ]*=[ ]*/, "")
version = $0
next
}
$0 ~ /^[ ]*everything[ =]*off[ ]*$/{ $0 ~ /^[ ]*everything[ =]*off[ ]*$/{
everything = "off" everything = "off"
next next
@ -166,6 +183,19 @@ $1 == "com"{
next next
} }
# version
# Inserts a version comment
$1 == "version" && NF == 1{
if (version == "") {
print "ERROR: no version string set"
err = 1 # prevent END{} running
exit 1
}
print comment, version, cend >out
next
}
# file output input protect # file output input protect
# Informational: the official name of the input file (without # Informational: the official name of the input file (without
# make generated local directories), the official name of the # make generated local directories), the official name of the

View File

@ -3,7 +3,7 @@
/* pnglibconf.h - library build configuration */ /* pnglibconf.h - library build configuration */
/* libpng version 1.5.4 - last changed on June 22, 2011 */ /* libpng version 1.5.7beta02 - November 8, 2011 */
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ /* Copyright (c) 1998-2011 Glenn Randers-Pehrson */

View File

@ -41,11 +41,11 @@ pnglibconf.h: pnglibconf.dfn
$(COPY) dfn3.out $@ $(COPY) dfn3.out $@
$(DELETE) dfn.c dfn1.out dfn2.out dfn3.out $(DELETE) dfn.c dfn1.out dfn2.out dfn3.out
pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/ANNOUNCE
$(DELETE) $@ dfn1.out dfn2.out $(DELETE) $@ dfn1.out dfn2.out
$(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2 $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
$(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2 $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out\ $(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out $(srcdir)/ANNOUNCE\
$(srcdir)/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2 $(srcdir)/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2 $(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2
$(COPY) dfn2.out $@ $(COPY) dfn2.out $@