Source-Changes-HG archive

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

[src/netbsd-1-6]: src/distrib/common Pull up revision 1.13 (requested by thor...



details:   https://anonhg.NetBSD.org/src/rev/60f02e47625d
branches:  netbsd-1-6
changeset: 529168:60f02e47625d
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Oct 15 22:57:06 2002 +0000

description:
Pull up revision 1.13 (requested by thorpej in ticket #824):
Escape { and } in the regexp that matches e.g. ${FOO}.

diffstat:

 distrib/common/parselist.awk |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r a5cdbdb851b2 -r 60f02e47625d distrib/common/parselist.awk
--- a/distrib/common/parselist.awk      Mon Oct 14 00:18:26 2002 +0000
+++ b/distrib/common/parselist.awk      Tue Oct 15 22:57:06 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: parselist.awk,v 1.10.2.1 2002/05/29 04:52:13 lukem Exp $
+#      $NetBSD: parselist.awk,v 1.10.2.2 2002/10/15 22:57:06 lukem Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -141,14 +141,14 @@
 
 #      replace ${FOO} with ENVIRON["FOO"]
 #
-/\${[A-Za-z0-9_]+}/ \
+/\$\{[A-Za-z0-9_]+\}/ \
 {
-       while (match($0, /\${[A-Za-z0-9_]+}/) > 0) {
+       while (match($0, /\$\{[A-Za-z0-9_]+\}/) > 0) {
                v = substr($0, RSTART + 2, RLENGTH - 3);
                if (! (v in ENVIRON))
                        err("Variable " v " is not in the environment");
                else
-                       sub(/\${[A-Za-z0-9_]+}/, ENVIRON[v]);
+                       sub(/\$\{[A-Za-z0-9_]+\}/, ENVIRON[v]);
        }
 }
 



Home | Main Index | Thread Index | Old Index