[BACK]Return to iostat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / systat

Diff for /src/usr.bin/systat/iostat.c between version 1.3 and 1.4

version 1.3, 1996/05/22 11:35:34 version 1.4, 1996/06/02 19:40:14
Line 132 
Line 132 
         int i, col, regions, ndrives;          int i, col, regions, ndrives;
   
 #define COLWIDTH        14  #define COLWIDTH        14
 #define DRIVESPERLINE   ((wnd->maxx - INSET) / COLWIDTH)  #define DRIVESPERLINE   ((wnd->_maxx - INSET) / COLWIDTH)
         for (ndrives = 0, i = 0; i < dk_ndrive; i++)          for (ndrives = 0, i = 0; i < dk_ndrive; i++)
                 if (cur.dk_select[i])                  if (cur.dk_select[i])
                         ndrives++;                          ndrives++;
Line 140 
Line 140 
         /*          /*
          * 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           * Minimum region contains space for two
          * label lines and one line of statistics.           * label lines and one line of statistics.
Line 150 
Line 150 
         col = 0;          col = 0;
         for (i = 0; i < dk_ndrive; i++)          for (i = 0; i < dk_ndrive; i++)
                 if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {                  if (cur.dk_select[i] /*&& cur.dk_bytes[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;                                          break;
                         }                          }
                         mvwaddstr(wnd, row, col + 4, cur.dk_name[i]);                          mvwaddstr(wnd, row, col + 4, cur.dk_name[i]);
Line 175 
Line 175 
         linesperregion = 2 + secs;          linesperregion = 2 + secs;
         for (i = 0; i < dk_ndrive; i++)          for (i = 0; i < dk_ndrive; i++)
                 if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {                  if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {
                         if (row > wnd->maxy - linesperregion)                          if (row > wnd->_maxy - linesperregion)
                                 break;                                  break;
                         mvwprintw(wnd, row++, 0, "%3.3s   Kps|", cur.dk_name[i]);                          mvwprintw(wnd, row++, 0, "%3.3s   Kps|", cur.dk_name[i]);
                         mvwaddstr(wnd, row++, 0, "      tps|");                          mvwaddstr(wnd, row++, 0, "      tps|");
Line 214 
Line 214 
                 row += 2;                  row += 2;
                 for (i = 0; i < dk_ndrive; i++)                  for (i = 0; i < dk_ndrive; i++)
                         if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {                          if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {
                                 if (row > wnd->maxy - linesperregion)                                  if (row > wnd->_maxy - linesperregion)
                                         break;                                          break;
                                 row = stats(row, INSET, i);                                  row = stats(row, INSET, i);
                         }                          }
Line 227 
Line 227 
         winsertln(wnd);          winsertln(wnd);
         for (i = 0; i < dk_ndrive; i++)          for (i = 0; i < dk_ndrive; i++)
                 if (cur.dk_select[i] /*&& cur.dk_bytes[i] != 0.0*/) {                  if (cur.dk_select[i] /*&& cur.dk_bytes[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;                                          break;
                                 wmove(wnd, row + linesperregion, 0);                                  wmove(wnd, row + linesperregion, 0);
                                 wdeleteln(wnd);                                  wdeleteln(wnd);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4