summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-12-23 16:39:09 +0000
committeryar <yar@FreeBSD.org>2006-12-23 16:39:09 +0000
commitd6cce3632f84fa74dc037a33887861150b8363af (patch)
treef5f7616d6266c7f17606b49e034b61db418bb645 /usr.bin/systat
parentca20d95084888dab71644a9eec09438c3d4936ea (diff)
downloadFreeBSD-src-d6cce3632f84fa74dc037a33887861150b8363af.zip
FreeBSD-src-d6cce3632f84fa74dc037a33887861150b8363af.tar.gz
Eliminate a couple of screen coordinate variables
that were useless and just obfuscated the code.
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/swap.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c
index c305724..fa336a8 100644
--- a/usr.bin/systat/swap.c
+++ b/usr.bin/systat/swap.c
@@ -135,15 +135,13 @@ void
labelswap()
{
char *name;
- int row, i;
+ int i;
fetchswap();
- row = 0;
- wmove(wnd, row, 0);
- wclrtobot(wnd);
+ werase(wnd);
- mvwprintw(wnd, row++, 0, "%-5s%*s%*s %s",
+ mvwprintw(wnd, 0, 0, "%-5s%*s%*s %s",
"Disk", hlen, header, ulen, "Used",
"/0% /10 /20 /30 /40 /50 /60 /70 /80 /90 /100");
@@ -167,7 +165,6 @@ showswap()
labelswap();
for (i = 0; i <= kvnsw; ++i) {
- int lcol = 5;
int count;
if (i == kvnsw) {
@@ -179,26 +176,23 @@ showswap()
mvwprintw(
wnd,
i + 1,
- lcol + 5,
+ 5 + 5,
"(swap not configured)"
);
continue;
}
- mvwprintw(
+ wmove(wnd, i + 1, 5);
+
+ wprintw(
wnd,
- i + 1,
- lcol,
"%*d",
hlen,
CONVERT(kvmsw[i].ksw_total)
);
- lcol += hlen;
- mvwprintw(
+ wprintw(
wnd,
- i + 1,
- lcol,
"%*d ",
ulen,
CONVERT(kvmsw[i].ksw_used)
OpenPOWER on IntegriCloud