[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.10 and 1.11

version 1.10, 1997/12/19 09:03:32 version 1.11, 2000/07/07 20:47:25
Line 133 
Line 133 
                 mvwaddstr(wnd, row++, INSET, "No drives attached.");                  mvwaddstr(wnd, row++, INSET, "No drives attached.");
                 return (row);                  return (row);
         }          }
 #define COLWIDTH        14  #define COLWIDTH        17
 #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])
Line 149 
Line 149 
          */           */
         if (linesperregion < 3)          if (linesperregion < 3)
                 linesperregion = 3;                  linesperregion = 3;
         col = 0;          col = INSET;
         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) {
                                 col = 0, row += linesperregion + 1;                                  col = INSET, 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]);
                         mvwaddstr(wnd, row + 1, col, "Kps tps  sec");                          mvwaddstr(wnd, row + 1, col, " KBps tps  sec");
                         col += COLWIDTH;                          col += COLWIDTH;
                 }                  }
         if (col)          if (col)
Line 227 
Line 227 
                         }                          }
                 return;                  return;
         }          }
         col = 0;          col = INSET;
         wmove(wnd, row + linesperregion, 0);          wmove(wnd, row + linesperregion, 0);
         wdeleteln(wnd);          wdeleteln(wnd);
         wmove(wnd, row + 3, 0);          wmove(wnd, row + 3, 0);
Line 235 
Line 235 
         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 = INSET, 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);
Line 260 
Line 260 
   
         words = cur.dk_bytes[dn] / 1024.0;      /* # of K transferred */          words = cur.dk_bytes[dn] / 1024.0;      /* # of K transferred */
         if (numbers) {          if (numbers) {
                 mvwprintw(wnd, row, col, "%3.0f%4.0f%5.1f",                  mvwprintw(wnd, row, col, "%5.0f%4.0f%5.1f",
                     words / etime, cur.dk_xfer[dn] / etime, atime / etime);                      words / etime, cur.dk_xfer[dn] / etime, atime / etime);
                 return (row);                  return (row);
         }          }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11