version 1.3, 1996/05/22 11:35:34 |
version 1.4, 1996/06/02 19:40:14 |
|
|
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++; |
|
|
/* |
/* |
* 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. |
|
|
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]); |
|
|
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|"); |
|
|
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); |
} |
} |
|
|
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); |