diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 4 | ||||
-rw-r--r-- | procps/pstree.c | 2 | ||||
-rw-r--r-- | procps/watch.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/procps/ps.c b/procps/ps.c index bde5f9485..fbafa68a9 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -622,7 +622,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv) | |||
622 | * and such large widths */ | 622 | * and such large widths */ |
623 | terminal_width = MAX_WIDTH; | 623 | terminal_width = MAX_WIDTH; |
624 | if (isatty(1)) { | 624 | if (isatty(1)) { |
625 | get_terminal_width_height(0, &terminal_width, NULL); | 625 | terminal_width = get_terminal_width(0); |
626 | if (--terminal_width > MAX_WIDTH) | 626 | if (--terminal_width > MAX_WIDTH) |
627 | terminal_width = MAX_WIDTH; | 627 | terminal_width = MAX_WIDTH; |
628 | } | 628 | } |
@@ -672,7 +672,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
672 | if (w_count) { | 672 | if (w_count) { |
673 | terminal_width = (w_count == 1) ? 132 : MAX_WIDTH; | 673 | terminal_width = (w_count == 1) ? 132 : MAX_WIDTH; |
674 | } else { | 674 | } else { |
675 | get_terminal_width_height(0, &terminal_width, NULL); | 675 | terminal_width = get_terminal_width(0); |
676 | /* Go one less... */ | 676 | /* Go one less... */ |
677 | if (--terminal_width > MAX_WIDTH) | 677 | if (--terminal_width > MAX_WIDTH) |
678 | terminal_width = MAX_WIDTH; | 678 | terminal_width = MAX_WIDTH; |
diff --git a/procps/pstree.c b/procps/pstree.c index ed1a41289..c5fb83688 100644 --- a/procps/pstree.c +++ b/procps/pstree.c | |||
@@ -381,7 +381,7 @@ int pstree_main(int argc UNUSED_PARAM, char **argv) | |||
381 | 381 | ||
382 | INIT_G(); | 382 | INIT_G(); |
383 | 383 | ||
384 | get_terminal_width_height(0, &G.output_width, NULL); | 384 | G.output_width = get_terminal_width(0); |
385 | 385 | ||
386 | opt_complementary = "?1"; | 386 | opt_complementary = "?1"; |
387 | getopt32(argv, "p"); | 387 | getopt32(argv, "p"); |
diff --git a/procps/watch.c b/procps/watch.c index 0397f21bf..97aa04767 100644 --- a/procps/watch.c +++ b/procps/watch.c | |||
@@ -72,7 +72,7 @@ int watch_main(int argc UNUSED_PARAM, char **argv) | |||
72 | 72 | ||
73 | // STDERR_FILENO is procps3 compat: | 73 | // STDERR_FILENO is procps3 compat: |
74 | // "watch ls 2>/dev/null" does not detect tty size | 74 | // "watch ls 2>/dev/null" does not detect tty size |
75 | get_terminal_width_height(STDERR_FILENO, &new_width, NULL); | 75 | new_width = get_terminal_width(STDERR_FILENO); |
76 | if (new_width != width) { | 76 | if (new_width != width) { |
77 | width = new_width; | 77 | width = new_width; |
78 | free(header); | 78 | free(header); |