diff options
author | jlam <jlam> | 2004-08-21 18:21:47 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-08-21 18:21:47 +0000 |
commit | 670e1a6858217d222d7525e6cff936ade4210c54 (patch) | |
tree | 08a6f79362ce8520422cba8cbb4bd09dc685eaee /pkgtools/libnbcompat | |
parent | a4b3930a0e36af2c9604ee3be116954355b050e7 (diff) | |
download | pkgsrc-670e1a6858217d222d7525e6cff936ade4210c54.tar.gz |
Fix error in the use of "next"... it means to skip the line, not skip to
the next pattern.
Diffstat (limited to 'pkgtools/libnbcompat')
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat.awk | 22 |
1 files changed, 11 insertions, 11 deletions
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 } |