From fc447311aa230c94c15e9fd880402606bf690403 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 27 Feb 2013 13:30:52 -0600 Subject: [PATCH] [libpng17] Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble with CRLF line endings. --- ANNOUNCE | 6 ++++-- CHANGES | 4 +++- scripts/dfn.awk | 7 +++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 7297187ba..213eac3bb 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta04 - February 23, 2013 +Libpng 1.7.0beta04 - February 27, 2013 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. @@ -187,9 +187,11 @@ Version 1.7.0beta03 [February 22, 2013] for it on then the build will fail if it can't be done.) Updated the INSTALL document. -Version 1.7.0beta04 [February 23, 2013] +Version 1.7.0beta04 [February 27, 2013] Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES. Revised scripts/makefile.freebsd to respect ZLIBDIR and ZLIBINC. + Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble + with CRLF line endings. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index c450d8e6c..9c23b8142 100644 --- a/CHANGES +++ b/CHANGES @@ -4474,9 +4474,11 @@ Version 1.7.0beta03 [February 22, 2013] for it on then the build will fail if it can't be done.) Updated the INSTALL document. -Version 1.7.0beta04 [February 23, 2013] +Version 1.7.0beta04 [February 27, 2013] Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES. Revised scripts/makefile.freebsd to respect ZLIBDIR and ZLIBINC. + Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble + with CRLF line endings. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/scripts/dfn.awk b/scripts/dfn.awk index 8a5dab6f9..6a8f2cb08 100644 --- a/scripts/dfn.awk +++ b/scripts/dfn.awk @@ -31,11 +31,11 @@ NR==1 && out == "/dev/null" { # Output can be sorted; two lines are recognized $1 == "PNG_DFN_START_SORT"{ - sort=$2 + sort=0+$2 next } -$1 == "PNG_DFN_END_SORT"{ +$1 ~ /^PNG_DFN_END_SORT/{ # Do a very simple, slow, sort; notice that blank lines won't be # output by this for (entry in array) { @@ -112,6 +112,9 @@ $1 == "PNG_DFN_END_SORT"{ # editorial consistency sub(/ *$/, "") + # Remove trailing CR + sub (/ $/, "") + if (sort) array[$(sort)] = $0