mirror of
https://git.busybox.net/busybox.git
synced 2024-11-24 06:03:27 +08:00
man: yet another fixlet to "manpage link" code
This commit is contained in:
parent
22b0bd85fd
commit
e2a09de415
@ -49,9 +49,10 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
|
||||
}
|
||||
|
||||
if (man) { /* man page, not cat page */
|
||||
/* Test whether the man page is not a link to another one. */
|
||||
/* Is this a link to another manpage? */
|
||||
/* The link has the following on the first line: */
|
||||
/* ".so another_man_page" */
|
||||
|
||||
struct stat sb;
|
||||
char *line;
|
||||
char *linkname, *p;
|
||||
@ -73,7 +74,7 @@ static int run_pipe(const char *unpacker, const char *pager, char *man_filename,
|
||||
* ".so man7/path_resolution.7\n<junk>"
|
||||
*/
|
||||
*strchrnul(line, '\n') = '\0';
|
||||
linkname = p = skip_whitespace(&line[4]);
|
||||
linkname = skip_whitespace(&line[4]);
|
||||
|
||||
/* If link has no slashes, we just replace man page name.
|
||||
* If link has slashes (however many), we go back *once*.
|
||||
|
Loading…
Reference in New Issue
Block a user