Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.bin/netstat Pull up revision 1.20 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/8292ffdd70df
branches:  netbsd-1-4
changeset: 471080:8292ffdd70df
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 19 16:32:09 2000 +0000

description:
Pull up revision 1.20 (requested by he):
  Format string cleanup.

diffstat:

 usr.bin/netstat/iso.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r 359253f9d726 -r 8292ffdd70df usr.bin/netstat/iso.c
--- a/usr.bin/netstat/iso.c     Thu Oct 19 16:32:04 2000 +0000
+++ b/usr.bin/netstat/iso.c     Thu Oct 19 16:32:09 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iso.c,v 1.16 1998/07/12 03:20:14 mrg Exp $     */
+/*     $NetBSD: iso.c,v 1.16.2.1 2000/10/19 16:32:09 he Exp $  */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "from: @(#)iso.c        8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: iso.c,v 1.16 1998/07/12 03:20:14 mrg Exp $");
+__RCSID("$NetBSD: iso.c,v 1.16.2.1 2000/10/19 16:32:09 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -261,19 +261,20 @@
        u_long kern_addr;
        int istp;
 {
-
+       int width = 22;
        if (first) {
                printf("Active ISO net connections");
                if (aflag)
                        printf(" (including servers)");
                putchar('\n');
-               if (Aflag)
+               if (Aflag) {
+                       width = 18;
                        printf("%-8.8s ", "PCB");
-               printf(Aflag ?
-                       "%-5.5s %-6.6s %-6.6s  %-18.18s %-18.18s %s\n" :
-                       "%-5.5s %-6.6s %-6.6s  %-22.22s %-22.22s %s\n",
+               }
+               printf( "%-5.5s %-6.6s %-6.6s  %-*.*s %-*.*s %s\n",
                        "Proto", "Recv-Q", "Send-Q",
-                       "Local Address", "Foreign Address", "(state)");
+                       width, width, "Local Address", 
+                       width, width, "Foreign Address", "(state)");
                first = 0;
        }
        if (Aflag)



Home | Main Index | Thread Index | Old Index