diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 22:31:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 22:31:07 +0000 |
commit | b75fe798bb26fbf16a3251decd72bc20b44a00c5 (patch) | |
tree | cc11b07df97c84c6fb90c8c6913726b8dd25eec6 /miscutils/man.c | |
parent | ce02b157beff1a8031595364c2fb654034e608b5 (diff) | |
download | busybox-w32-b75fe798bb26fbf16a3251decd72bc20b44a00c5.tar.gz busybox-w32-b75fe798bb26fbf16a3251decd72bc20b44a00c5.tar.bz2 busybox-w32-b75fe798bb26fbf16a3251decd72bc20b44a00c5.zip |
stat: pointers are not 0L, they are NULL
man: better error handling
Diffstat (limited to 'miscutils/man.c')
-rw-r--r-- | miscutils/man.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/miscutils/man.c b/miscutils/man.c index 020310677..9ef1ef4a6 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
@@ -35,7 +35,9 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename) | |||
35 | return 1; | 35 | return 1; |
36 | } | 36 | } |
37 | 37 | ||
38 | cmd = xasprintf("%s '%s' | gtbl | nroff -Tlatin1 -mandoc | %s", | 38 | /* "2>&1" added so that nroff errors are shown in pager too. |
39 | * Otherwise it may show just empty screen */ | ||
40 | cmd = xasprintf("%s '%s' | gtbl | nroff -Tlatin1 -mandoc 2>&1 | %s", | ||
39 | unpacker, man_filename, pager); | 41 | unpacker, man_filename, pager); |
40 | system(cmd); | 42 | system(cmd); |
41 | free(cmd); | 43 | free(cmd); |
@@ -123,6 +125,11 @@ int man_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
123 | fclose(cf); | 125 | fclose(cf); |
124 | } | 126 | } |
125 | 127 | ||
128 | // TODO: my man3/getpwuid.3.gz contains just one line: | ||
129 | // .so man3/getpwnam.3 | ||
130 | // (and I _dont_ have man3/getpwnam.3, I have man3/getpwnam.3.gz) | ||
131 | // need to support this... | ||
132 | |||
126 | not_found = 0; | 133 | not_found = 0; |
127 | do { /* for each argv[] */ | 134 | do { /* for each argv[] */ |
128 | int found = 0; | 135 | int found = 0; |