aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-08-05 14:15:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-08-05 14:15:19 +0000
commite2a09de415bbb6b007c21f86ab0722af05742dc2 (patch)
tree0f6f6f4068ef7cdc9c16aceef507239b84ab2e98
parent22b0bd85fddf07eb53a1edf53472eb8b8aa51cbd (diff)
downloadbusybox-w32-e2a09de415bbb6b007c21f86ab0722af05742dc2.tar.gz
busybox-w32-e2a09de415bbb6b007c21f86ab0722af05742dc2.tar.bz2
busybox-w32-e2a09de415bbb6b007c21f86ab0722af05742dc2.zip
man: yet another fixlet to "manpage link" code
-rw-r--r--miscutils/man.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index a2f6e3ba5..ebed207d2 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -49,9 +49,10 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
49 } 49 }
50 50
51 if (man) { /* man page, not cat page */ 51 if (man) { /* man page, not cat page */
52 /* Test whether the man page is not a link to another one. */ 52 /* Is this a link to another manpage? */
53 /* The link has the following on the first line: */ 53 /* The link has the following on the first line: */
54 /* ".so another_man_page" */ 54 /* ".so another_man_page" */
55
55 struct stat sb; 56 struct stat sb;
56 char *line; 57 char *line;
57 char *linkname, *p; 58 char *linkname, *p;
@@ -73,7 +74,7 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
73 * ".so man7/path_resolution.7\n<junk>" 74 * ".so man7/path_resolution.7\n<junk>"
74 */ 75 */
75 *strchrnul(line, '\n') = '\0'; 76 *strchrnul(line, '\n') = '\0';
76 linkname = p = skip_whitespace(&line[4]); 77 linkname = skip_whitespace(&line[4]);
77 78
78 /* If link has no slashes, we just replace man page name. 79 /* If link has no slashes, we just replace man page name.
79 * If link has slashes (however many), we go back *once*. 80 * If link has slashes (however many), we go back *once*.