From d8c0df9fe5a7bbee05b61a9ac0edc98690fbfaa4 Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 21 Aug 2004 18:21:47 +0000 Subject: Fix error in the use of "next"... it means to skip the line, not skip to the next pattern. --- pkgtools/libnbcompat/files/nbcompat.awk | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'pkgtools/libnbcompat') diff --git a/pkgtools/libnbcompat/files/nbcompat.awk b/pkgtools/libnbcompat/files/nbcompat.awk index 147739009bc..c1946624a60 100644 --- a/pkgtools/libnbcompat/files/nbcompat.awk +++ b/pkgtools/libnbcompat/files/nbcompat.awk @@ -3,22 +3,22 @@ BEGIN { process = 1 } /NBCOMPAT template section follows\./ { process = 0 } /^\#[ ]*define[ ]+PACKAGE_.*/ { - if (process == 0) + if (process == 1) { + print "/* " $0 " */"; next; - print "/* " $0 " */"; - next; + } } /^\#[ ]*define[ ]+/ { - if (process == 0) + if (process == 1) { + guard = $0; + sub("^#[ ]*define[ ]+", "", guard); + sub("[ ]+.*", "", guard); + print "#ifndef " guard; + print $0; + print "#endif"; next; - guard = $0; - sub("^#[ ]*define[ ]+", "", guard); - sub("[ ]+.*", "", guard); - print "#ifndef " guard; - print $0; - print "#endif"; - next; + } } { print } -- cgit v1.2.3