Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/net whitespace



details:   https://anonhg.NetBSD.org/src/rev/17728cd8fa00
branches:  trunk
changeset: 372510:17728cd8fa00
user:      jschauma <jschauma%NetBSD.org@localhost>
date:      Sun Dec 04 02:42:39 2022 +0000

description:
whitespace

diffstat:

 tests/lib/libc/net/t_servent.sh |  64 ++++++++++++++++++++--------------------
 1 files changed, 32 insertions(+), 32 deletions(-)

diffs (86 lines):

diff -r fe44bf9174d6 -r 17728cd8fa00 tests/lib/libc/net/t_servent.sh
--- a/tests/lib/libc/net/t_servent.sh   Sun Dec 04 01:29:31 2022 +0000
+++ b/tests/lib/libc/net/t_servent.sh   Sun Dec 04 02:42:39 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_servent.sh,v 1.2 2016/03/08 08:34:17 joerg Exp $
+# $NetBSD: t_servent.sh,v 1.3 2022/12/04 02:42:39 jschauma Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,45 +41,45 @@
        #  (3) prune duplicates
        #
        tr '\t' ' ' </etc/services | awk '
-               function add(key, name,      i, n, ar) {
-               n = split(names[key], ar);
-               for (i=1; i<=n; i++) {
-                       if (name == ar[i]) {
-                       return;
+               function add(key, name, i, n, ar) {
+                       n = split(names[key], ar);
+                       for (i=1; i<=n; i++) {
+                               if (name == ar[i]) {
+                                       return;
+                               }
                        }
-               }
-               delete ar;
-               names[key] = names[key] " " name;
+                       delete ar;
+                       names[key] = names[key] " " name;
                }
 
                {
-               sub("#.*", "", $0);
-               gsub("  *", " ", $0);
-               if (NF==0) {
-                       next;
-               }
-               add($2, $1, 0);
-               for (i=3; i<=NF; i++) {
-                       add($2, $i, 1);
-               }
+                       sub("#.*", "", $0);
+                       gsub("  *", " ", $0);
+                       if (NF==0) {
+                               next;
+                       }
+                       add($2, $1, 0);
+                       for (i=3; i<=NF; i++) {
+                               add($2, $i, 1);
+                       }
                }
                END {
-               for (key in names) {
-                       portproto = key;
-                       sub("/", ", proto=", portproto);
-                       portproto = "port=" portproto;
+                       for (key in names) {
+                               portproto = key;
+                               sub("/", ", proto=", portproto);
+                               portproto = "port=" portproto;
 
-                       n = split(names[key], ar);
-                       printf "name=%s, %s, aliases=", ar[1], portproto;
-                       for (i=2; i<=n; i++) {
-                       if (i>2) {
-                               printf " ";
+                               n = split(names[key], ar);
+                               printf "name=%s, %s, aliases=", ar[1], portproto;
+                               for (i=2; i<=n; i++) {
+                                       if (i>2) {
+                                               printf " ";
+                                       }
+                                       printf "%s", ar[i];
+                               }
+                               printf "\n";
+                               delete ar;
                        }
-                       printf "%s", ar[i];
-                       }
-                       printf "\n";
-                       delete ar;
-               }
                }
        ' | sort >exp
 



Home | Main Index | Thread Index | Old Index