summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2012-06-08 10:22:05 +0200
committerDenys Vlasenko2012-06-08 10:22:05 +0200
commitba1d561d767a6f05da62adadc798f98118b2a3ee (patch)
tree70be595abd2f8ac2cf515896c3299b5fcb453382
parent84406e459be31b89de5a3d822f205d61c4c5855b (diff)
downloadbusybox-ba1d561d767a6f05da62adadc798f98118b2a3ee.zip
busybox-ba1d561d767a6f05da62adadc798f98118b2a3ee.tar.gz
man: fix handling of gzipped manpages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/man.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index 6114663..e380fda 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -129,27 +129,21 @@ static int show_manpage(const char *pager, char *man_filename, int man, int leve
#endif
#if ENABLE_FEATURE_SEAMLESS_XZ
strcpy(ext, "xz");
- if (run_pipe(pager, man_filename, man, level))
+ if (run_pipe(pager, filename_with_zext, man, level))
return 1;
#endif
#if ENABLE_FEATURE_SEAMLESS_BZ2
strcpy(ext, "bz2");
- if (run_pipe(pager, man_filename, man, level))
+ if (run_pipe(pager, filename_with_zext, man, level))
return 1;
#endif
#if ENABLE_FEATURE_SEAMLESS_GZ
strcpy(ext, "gz");
- if (run_pipe(pager, man_filename, man, level))
+ if (run_pipe(pager, filename_with_zext, man, level))
return 1;
#endif
-#if SEAMLESS_COMPRESSION
- ext[-1] = '\0';
-#endif
- if (run_pipe(pager, man_filename, man, level))
- return 1;
-
- return 0;
+ return run_pipe(pager, man_filename, man, level);
}
int man_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;