aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-10-21 13:05:22 -0500
committerRob Landley <rob@landley.net>2018-10-21 13:05:22 -0500
commit3e0b077ec236aa26bfeb290f3cd7973ec3fbcb7d (patch)
tree0fd8275af029861fa62a9316bef316c12f71ae0c /toys/posix
parent74f22a7d5cb6ed03f00c261fb4e28b411f1c4c0a (diff)
downloadtoybox-3e0b077ec236aa26bfeb290f3cd7973ec3fbcb7d.tar.gz
Move start_redraw() to lib/ and have ps.c (top) use it.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ps.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 27dc63c5..d8f54862 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1709,12 +1709,7 @@ static void top_setup(char *defo, char *defk)
// Grab starting time, make terminal raw, switch off cursor,
// set signal handler to put terminal/cursor back to normal at exit.
TT.time = millitime();
- set_terminal(0, 1, 0, 0);
- sigatexit(tty_sigreset);
- xsignal(SIGWINCH, generic_signal);
- printf("\033[?25l\033[0m");
- TT.width = 80;
- TT.height = 25;
+ start_redraw(&TT.width, &TT.height);
}
comma_args(TT.top.u, &TT.uu, "bad -u", parse_rest);