version 1.15, 2004/07/09 16:33:15 |
version 1.16, 2006/03/31 04:10:59 |
|
|
void |
void |
labelmbufs(void) |
labelmbufs(void) |
{ |
{ |
wmove(wnd, 0, 0); wclrtoeol(wnd); |
wmove(wnd, 0, 0); |
|
wclrtoeol(wnd); |
mvwaddstr(wnd, 0, 10, |
mvwaddstr(wnd, 0, 10, |
"/0 /5 /10 /15 /20 /25 /30 /35 /40 /45 /50 /55 /60"); |
"/0 /5 /10 /15 /20 /25 /30 /35 /40 /45 /50 /55 /60"); |
} |
} |
|
|
void |
void |
showmbufs(void) |
showmbufs(void) |
{ |
{ |
int i, j, max, index; |
int i, j, max, ind; |
char buf[13]; |
char buf[13]; |
|
|
for (j = 0; j < wnd->_maxy; j++) { |
for (j = 0; j < wnd->_maxy; j++) { |
max = 0, index = -1; |
max = 0, ind = -1; |
for (i = 0; i < wnd->_maxy; i++) |
for (i = 0; i < wnd->_maxy; i++) |
if (mb.m_mtypes[i] > max) { |
if (mb.m_mtypes[i] > max) { |
max = mb.m_mtypes[i]; |
max = mb.m_mtypes[i]; |
index = i; |
ind = i; |
} |
} |
if (max == 0) |
if (max == 0) |
break; |
break; |
if (j > NNAMES) |
if (j > NNAMES) |
mvwprintw(wnd, 1+j, 0, "%10d", index); |
mvwprintw(wnd, 1+j, 0, "%10d", ind); |
else |
else |
mvwprintw(wnd, 1+j, 0, "%-10.10s", mtnames[index]); |
mvwprintw(wnd, 1+j, 0, "%-10.10s", mtnames[ind]); |
wmove(wnd, 1 + j, 10); |
wmove(wnd, 1 + j, 10); |
if (max > 60) { |
if (max > 60) { |
snprintf(buf, sizeof buf, " %d", max); |
snprintf(buf, sizeof buf, " %d", max); |
|
|
waddch(wnd, 'X'); |
waddch(wnd, 'X'); |
wclrtoeol(wnd); |
wclrtoeol(wnd); |
} |
} |
mb.m_mtypes[index] = 0; |
mb.m_mtypes[ind] = 0; |
} |
} |
wmove(wnd, 1+j, 0); wclrtobot(wnd); |
wmove(wnd, 1+j, 0); |
|
wclrtobot(wnd); |
} |
} |
|
|
|
|