Converted to new curses(3) library.
authorElan Amir <elan@ucbvax.Berkeley.EDU>
Wed, 11 Nov 1992 04:24:34 +0000 (20:24 -0800)
committerElan Amir <elan@ucbvax.Berkeley.EDU>
Wed, 11 Nov 1992 04:24:34 +0000 (20:24 -0800)
SCCS-vsn: usr.bin/systat/iostat.c 5.11
SCCS-vsn: usr.bin/systat/pigs.c 5.13
SCCS-vsn: usr.bin/systat/netstat.c 5.11
SCCS-vsn: usr.bin/systat/mbufs.c 5.8

usr/src/usr.bin/systat/iostat.c
usr/src/usr.bin/systat/mbufs.c
usr/src/usr.bin/systat/netstat.c
usr/src/usr.bin/systat/pigs.c

index 06cbcea..6efb462 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)iostat.c   5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)iostat.c   5.11 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/param.h>
 #endif not lint
 
 #include <sys/param.h>
@@ -156,7 +156,7 @@ numlabels(row)
        int i, col, regions, ndrives;
 
 #define COLWIDTH       14
        int i, col, regions, ndrives;
 
 #define COLWIDTH       14
-#define DRIVESPERLINE  ((wnd->_maxx - INSET) / COLWIDTH)
+#define DRIVESPERLINE  ((wnd->maxx - INSET) / COLWIDTH)
        for (ndrives = 0, i = 0; i < dk_ndrive; i++)
                if (dk_select[i])
                        ndrives++;
        for (ndrives = 0, i = 0; i < dk_ndrive; i++)
                if (dk_select[i])
                        ndrives++;
@@ -164,7 +164,7 @@ numlabels(row)
        /*
         * Deduct -regions for blank line after each scrolling region.
         */
        /*
         * Deduct -regions for blank line after each scrolling region.
         */
-       linesperregion = (wnd->_maxy - row - regions) / regions;
+       linesperregion = (wnd->maxy - row - regions) / regions;
        /*
         * Minimum region contains space for two
         * label lines and one line of statistics.
        /*
         * Minimum region contains space for two
         * label lines and one line of statistics.
@@ -174,9 +174,9 @@ numlabels(row)
        col = 0;
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
        col = 0;
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
-                       if (col + COLWIDTH >= wnd->_maxx - INSET) {
+                       if (col + COLWIDTH >= wnd->maxx - INSET) {
                                col = 0, row += linesperregion + 1;
                                col = 0, row += linesperregion + 1;
-                               if (row > wnd->_maxy - (linesperregion + 1))
+                               if (row > wnd->maxy - (linesperregion + 1))
                                        break;
                        }
                        mvwaddstr(wnd, row, col + 4, dr_name[i]);
                                        break;
                        }
                        mvwaddstr(wnd, row, col + 4, dr_name[i]);
@@ -199,7 +199,7 @@ barlabels(row)
        linesperregion = 2 + msps;
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
        linesperregion = 2 + msps;
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
-                       if (row > wnd->_maxy - linesperregion)
+                       if (row > wnd->maxy - linesperregion)
                                break;
                        mvwprintw(wnd, row++, 0, "%3.3s   bps|", dr_name[i]);
                        mvwaddstr(wnd, row++, 0, "      tps|");
                                break;
                        mvwprintw(wnd, row++, 0, "%3.3s   bps|", dr_name[i]);
                        mvwaddstr(wnd, row++, 0, "      tps|");
@@ -241,7 +241,7 @@ showiostat()
                row += 2;
                for (i = 0; i < dk_ndrive; i++)
                        if (dk_select[i] && dk_mspw[i] != 0.0) {
                row += 2;
                for (i = 0; i < dk_ndrive; i++)
                        if (dk_select[i] && dk_mspw[i] != 0.0) {
-                               if (row > wnd->_maxy - linesperregion)
+                               if (row > wnd->maxy - linesperregion)
                                        break;
                                row = stats(row, INSET, i);
                        }
                                        break;
                                row = stats(row, INSET, i);
                        }
@@ -254,9 +254,9 @@ showiostat()
        winsertln(wnd);
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
        winsertln(wnd);
        for (i = 0; i < dk_ndrive; i++)
                if (dk_select[i] && dk_mspw[i] != 0.0) {
-                       if (col + COLWIDTH >= wnd->_maxx) {
+                       if (col + COLWIDTH >= wnd->maxx) {
                                col = 0, row += linesperregion + 1;
                                col = 0, row += linesperregion + 1;
-                               if (row > wnd->_maxy - (linesperregion + 1))
+                               if (row > wnd->maxy - (linesperregion + 1))
                                        break;
                                wmove(wnd, row + linesperregion, 0);
                                wdeleteln(wnd);
                                        break;
                                wmove(wnd, row + linesperregion, 0);
                                wdeleteln(wnd);
index 9f72709..6185b80 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mbufs.c    5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)mbufs.c    5.8 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -74,9 +74,9 @@ showmbufs()
 
        if (mb == 0)
                return;
 
        if (mb == 0)
                return;
-       for (j = 0; j < wnd->_maxy; j++) {
+       for (j = 0; j < wnd->maxy; j++) {
                max = 0, index = -1; 
                max = 0, index = -1; 
-               for (i = 0; i < wnd->_maxy; i++)
+               for (i = 0; i < wnd->maxy; i++)
                        if (mb->m_mtypes[i] > max) {
                                max = mb->m_mtypes[i];
                                index = i;
                        if (mb->m_mtypes[i] > max) {
                                max = mb->m_mtypes[i];
                                index = i;
index d94a6fb..309b47b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)netstat.c  5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)netstat.c  5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -50,7 +50,7 @@ static char *inetname __P((struct in_addr));
 static void inetprint __P((struct in_addr *, int, char *));
 
 #define        streq(a,b)      (strcmp(a,b)==0)
 static void inetprint __P((struct in_addr *, int, char *));
 
 #define        streq(a,b)      (strcmp(a,b)==0)
-#define        YMAX(w)         ((w)->_maxy-1)
+#define        YMAX(w)         ((w)->maxy-1)
 
 WINDOW *
 opennetstat()
 
 WINDOW *
 opennetstat()
index cbf2245..4e36e8f 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)pigs.c     5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)pigs.c     5.13 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -83,8 +83,8 @@ showpigs()
         qsort(pt, nproc + 1, sizeof (struct p_times), compar);
        y = 1;
        i = nproc + 1;
         qsort(pt, nproc + 1, sizeof (struct p_times), compar);
        y = 1;
        i = nproc + 1;
-       if (i > wnd->_maxy-1)
-               i = wnd->_maxy-1;
+       if (i > wnd->maxy-1)
+               i = wnd->maxy-1;
        for (k = 0; i > 0 && pt[k].pt_pctcpu > 0.01; i--, y++, k++) {
                if (pt[k].pt_kp == NULL) {
                        uname = "";
        for (k = 0; i > 0 && pt[k].pt_pctcpu > 0.01; i--, y++, k++) {
                if (pt[k].pt_kp == NULL) {
                        uname = "";