pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Fix error in the use of "ne...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e427cfd192e9
branches:  trunk
changeset: 479756:e427cfd192e9
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Aug 21 18:21:47 2004 +0000

description:
Fix error in the use of "next"... it means to skip the line, not skip to
the next pattern.

diffstat:

 pkgtools/libnbcompat/files/nbcompat.awk |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (37 lines):

diff -r 1964fc169048 -r e427cfd192e9 pkgtools/libnbcompat/files/nbcompat.awk
--- a/pkgtools/libnbcompat/files/nbcompat.awk   Sat Aug 21 17:27:04 2004 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat.awk   Sat Aug 21 18:21:47 2004 +0000
@@ -3,22 +3,22 @@
 /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 }



Home | Main Index | Thread Index | Old Index