[libpng17] Revised scripts/dfn.awk to work with the buggy MSYS awk that

has trouble with CRLF line endings.
This commit is contained in:
John Bowler
2013-02-27 13:30:52 -06:00
committed by Glenn Randers-Pehrson
parent 8e30e43587
commit fc447311aa
3 changed files with 12 additions and 5 deletions

View File

@@ -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