pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/help Replaced the use of gensub() with sub(), since...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/794af3e2191f
branches:  trunk
changeset: 535324:794af3e2191f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Nov 13 16:52:39 2007 +0000

description:
Replaced the use of gensub() with sub(), since the former is not
mentioned in The Open Group's specification of awk. Specifically,
FreeBSD's awk doesn't have it.

diffstat:

 mk/help/help.awk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 3906b0c8a822 -r 794af3e2191f mk/help/help.awk
--- a/mk/help/help.awk  Tue Nov 13 16:44:49 2007 +0000
+++ b/mk/help/help.awk  Tue Nov 13 16:52:39 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.16 2007/08/14 18:04:16 rillig Exp $
+# $NetBSD: help.awk,v 1.17 2007/11/13 16:52:39 rillig Exp $
 #
 
 # This program extracts the inline documentation from *.mk files.
@@ -100,8 +100,8 @@
 #
 NF >= 1 {
        # Reduce FOO.<param> and FOO.${param} to FOO.
-       w1 = gensub(/\.[<$].*[>}]$/, "", "g", $1);
-       w2 = gensub(/\.[<$].*[>}]$/, "", "g", $2);
+       w1 = $1; sub(/\.[<$].*[>}]$/, "", w1);
+       w2 = $2; sub(/\.[<$].*[>}]$/, "", w2);
 
        # Convert all-lowercase words to all-uppercase.
        w1 = (w1 == tolower(w1)) ? toupper(w1) : w1;



Home | Main Index | Thread Index | Old Index