diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-06-02 03:21:42 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-06-02 03:21:42 +0000 |
commit | 86ab8a32bd63b2f2a73bdcead8e2bb037589e175 (patch) | |
tree | 10aa90962757d07724c78e4fc9baaa27ca7b4858 /procps/ps.c | |
parent | 4062268bc7ac748e2ea2e569aa862b2b3f8a2db2 (diff) | |
download | busybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.gz busybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.bz2 busybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.zip |
A number of additional fixed from Pavel Roskin, note some more bugs in the
TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox,
which is now included.
-Erik
Diffstat (limited to 'procps/ps.c')
-rw-r--r-- | procps/ps.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/procps/ps.c b/procps/ps.c index 0842a22c2..41b8465bd 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -40,6 +40,9 @@ | |||
40 | #define bb_need_help | 40 | #define bb_need_help |
41 | #include "messages.c" | 41 | #include "messages.c" |
42 | 42 | ||
43 | #define TERMINAL_WIDTH 79 /* not 80 in case terminal has linefold bug */ | ||
44 | |||
45 | |||
43 | 46 | ||
44 | #if ! defined BB_FEATURE_USE_DEVPS_PATCH | 47 | #if ! defined BB_FEATURE_USE_DEVPS_PATCH |
45 | 48 | ||
@@ -124,9 +127,9 @@ extern int ps_main(int argc, char **argv) | |||
124 | int len, i, c; | 127 | int len, i, c; |
125 | #ifdef BB_FEATURE_AUTOWIDTH | 128 | #ifdef BB_FEATURE_AUTOWIDTH |
126 | struct winsize win = { 0, 0 }; | 129 | struct winsize win = { 0, 0 }; |
127 | int terminal_width = 0; | 130 | int terminal_width = TERMINAL_WIDTH; |
128 | #else | 131 | #else |
129 | #define terminal_width 79 | 132 | #define terminal_width TERMINAL_WIDTH |
130 | #endif | 133 | #endif |
131 | 134 | ||
132 | 135 | ||
@@ -142,7 +145,7 @@ extern int ps_main(int argc, char **argv) | |||
142 | 145 | ||
143 | dir = opendir("/proc"); | 146 | dir = opendir("/proc"); |
144 | if (!dir) | 147 | if (!dir) |
145 | fatalError("Can't open /proc"); | 148 | fatalError("Can't open /proc\n"); |
146 | 149 | ||
147 | #ifdef BB_FEATURE_AUTOWIDTH | 150 | #ifdef BB_FEATURE_AUTOWIDTH |
148 | ioctl(fileno(stdout), TIOCGWINSZ, &win); | 151 | ioctl(fileno(stdout), TIOCGWINSZ, &win); |
@@ -214,9 +217,9 @@ extern int ps_main(int argc, char **argv) | |||
214 | char groupName[10] = ""; | 217 | char groupName[10] = ""; |
215 | #ifdef BB_FEATURE_AUTOWIDTH | 218 | #ifdef BB_FEATURE_AUTOWIDTH |
216 | struct winsize win = { 0, 0 }; | 219 | struct winsize win = { 0, 0 }; |
217 | int terminal_width = 0; | 220 | int terminal_width = TERMINAL_WIDTH; |
218 | #else | 221 | #else |
219 | #define terminal_width 79 | 222 | #define terminal_width TERMINAL_WIDTH |
220 | #endif | 223 | #endif |
221 | 224 | ||
222 | if (argc > 1 && **(argv + 1) == '-') | 225 | if (argc > 1 && **(argv + 1) == '-') |