systat is way too comfortable with curses internals...
This commit is contained in:
parent
c7096a251d
commit
3879bee426
@ -214,7 +214,7 @@ numlabels(row)
|
||||
char tmpstr[10];
|
||||
|
||||
#define COLWIDTH 17
|
||||
#define DRIVESPERLINE ((wnd->maxx - INSET) / COLWIDTH)
|
||||
#define DRIVESPERLINE ((wnd->_maxx - INSET) / COLWIDTH)
|
||||
for (ndrives = 0, i = 0; i < num_devices; i++)
|
||||
if (dev_select[i].selected)
|
||||
ndrives++;
|
||||
@ -222,7 +222,7 @@ numlabels(row)
|
||||
/*
|
||||
* 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.
|
||||
@ -232,9 +232,9 @@ numlabels(row)
|
||||
col = INSET;
|
||||
for (i = 0; i < num_devices; i++)
|
||||
if (dev_select[i].selected) {
|
||||
if (col + COLWIDTH >= wnd->maxx - INSET) {
|
||||
if (col + COLWIDTH >= wnd->_maxx - INSET) {
|
||||
col = INSET, row += linesperregion + 1;
|
||||
if (row > wnd->maxy - (linesperregion + 1))
|
||||
if (row > wnd->_maxy - (linesperregion + 1))
|
||||
break;
|
||||
}
|
||||
sprintf(tmpstr, "%s%d", dev_select[i].device_name,
|
||||
@ -260,7 +260,7 @@ barlabels(row)
|
||||
linesperregion = 2 + kbpt;
|
||||
for (i = 0; i < num_devices; i++)
|
||||
if (dev_select[i].selected) {
|
||||
if (row > wnd->maxy - linesperregion)
|
||||
if (row > wnd->_maxy - linesperregion)
|
||||
break;
|
||||
sprintf(tmpstr, "%s%d", dev_select[i].device_name,
|
||||
dev_select[i].unit_number);
|
||||
@ -296,7 +296,7 @@ showiostat()
|
||||
row += 2;
|
||||
for (i = 0; i < num_devices; i++)
|
||||
if (dev_select[i].selected) {
|
||||
if (row > wnd->maxy - linesperregion)
|
||||
if (row > wnd->_maxy - linesperregion)
|
||||
break;
|
||||
row = devstats(row, INSET, i);
|
||||
}
|
||||
@ -309,9 +309,9 @@ showiostat()
|
||||
winsertln(wnd);
|
||||
for (i = 0; i < num_devices; i++)
|
||||
if (dev_select[i].selected) {
|
||||
if (col + COLWIDTH >= wnd->maxx - INSET) {
|
||||
if (col + COLWIDTH >= wnd->_maxx - INSET) {
|
||||
col = INSET, row += linesperregion + 1;
|
||||
if (row > wnd->maxy - (linesperregion + 1))
|
||||
if (row > wnd->_maxy - (linesperregion + 1))
|
||||
break;
|
||||
wmove(wnd, row + linesperregion, 0);
|
||||
wdeleteln(wnd);
|
||||
|
@ -103,9 +103,9 @@ showmbufs()
|
||||
|
||||
if (mb == 0)
|
||||
return;
|
||||
for (j = 0; j < wnd->maxy; j++) {
|
||||
for (j = 0; j < wnd->_maxy; j++) {
|
||||
max = 0, index = -1;
|
||||
for (i = 0; i < wnd->maxy; i++) {
|
||||
for (i = 0; i < wnd->_maxy; i++) {
|
||||
if (i == MT_FREE)
|
||||
continue;
|
||||
if (mb->m_mtypes[i] > max) {
|
||||
|
@ -81,7 +81,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)
|
||||
#define YMAX(w) ((w)->maxy-1)
|
||||
#define YMAX(w) ((w)->_maxy-1)
|
||||
|
||||
WINDOW *
|
||||
opennetstat()
|
||||
|
@ -110,8 +110,8 @@ showpigs()
|
||||
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 = "";
|
||||
|
Loading…
Reference in New Issue
Block a user