Source-Changes-HG archive

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

[src/trunk]: src/etc style nits - use / re / instead of "re" for constant REs



details:   https://anonhg.NetBSD.org/src/rev/e632909913cf
branches:  trunk
changeset: 554262:e632909913cf
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Oct 26 13:40:46 2003 +0000

description:
style nits - use / re / instead of "re" for constant REs

diffstat:

 etc/MAKEDEV.awk |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r 8942418bff5e -r e632909913cf etc/MAKEDEV.awk
--- a/etc/MAKEDEV.awk   Sun Oct 26 13:39:38 2003 +0000
+++ b/etc/MAKEDEV.awk   Sun Oct 26 13:40:46 2003 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -
 #
-#      $NetBSD: MAKEDEV.awk,v 1.7 2003/10/24 19:57:36 jdolecek Exp $
+#      $NetBSD: MAKEDEV.awk,v 1.8 2003/10/26 13:40:46 jdolecek Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -193,11 +193,11 @@
 
 # special cases aside, handle normal line 
 {
-       sub("^%MD_DEVICES%", MDDEV)
-       sub("%MKDISK%", MKDISK)
-       sub("%DISKMINOROFFSET%", DISKMINOROFFSET)
-       sub("%RAWDISK_OFF%", RAWDISK_OFF)
-       sub("%RAWDISK_NAME%", RAWDISK_NAME)
+       sub(/^%MD_DEVICES%/, MDDEV)
+       sub(/%MKDISK%/, MKDISK)
+       sub(/%DISKMINOROFFSET%/, DISKMINOROFFSET)
+       sub(/%RAWDISK_OFF%/, RAWDISK_OFF)
+       sub(/%RAWDISK_NAME%/, RAWDISK_NAME)
 
        # if device substitutions are not active, do nothing more
        if (!devsubst) {
@@ -218,7 +218,7 @@
                for (b in blk)
                        gsub("%" b "_blk%", blk[b], deventry)
 
-               if (deventry !~ "%[a-z]*_chr%" && deventry !~ "%[a-z]*_blk%")
+               if (deventry !~ /%[a-z]*_chr%/ && deventry !~ /%[a-z]*_blk%/)
                        print deventry
        }
        deventry = $0



Home | Main Index | Thread Index | Old Index