aboutsummaryrefslogtreecommitdiff
path: root/miscutils/man.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-01-04 19:40:30 +0700
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-01-04 19:40:30 +0700
commit3b5c308768d76298bb964814ecc34de47bcac0b4 (patch)
tree795340e9d8f5e5bf9e8d895641099af343eec2a0 /miscutils/man.c
parent2b9a0e715ec459198f486653023d963b79291da7 (diff)
parent5fe2f863b9cee5ab0e7ac873538bce48846dbad8 (diff)
downloadbusybox-w32-3b5c308768d76298bb964814ecc34de47bcac0b4.tar.gz
busybox-w32-3b5c308768d76298bb964814ecc34de47bcac0b4.tar.bz2
busybox-w32-3b5c308768d76298bb964814ecc34de47bcac0b4.zip
Merge commit '06f719fd79fe15ce6fd5431bc58fcb22851de24d^'
Diffstat (limited to 'miscutils/man.c')
-rw-r--r--miscutils/man.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index 2d3776cf3..b356e726f 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -182,16 +182,21 @@ int man_main(int argc UNUSED_PARAM, char **argv)
182 pager = "more"; 182 pager = "more";
183 } 183 }
184 184
185 /* Parse man.conf[ig] */ 185 /* Parse man.conf[ig] or man_db.conf */
186 /* man version 1.6f uses man.config */ 186 /* man version 1.6f uses man.config */
187 /* man-db implementation of man uses man_db.conf */
187 parser = config_open2("/etc/man.config", fopen_for_read); 188 parser = config_open2("/etc/man.config", fopen_for_read);
188 if (!parser) 189 if (!parser)
189 parser = config_open2("/etc/man.conf", fopen_for_read); 190 parser = config_open2("/etc/man.conf", fopen_for_read);
191 if (!parser)
192 parser = config_open2("/etc/man_db.conf", fopen_for_read);
190 193
191 while (config_read(parser, token, 2, 0, "# \t", PARSE_NORMAL)) { 194 while (config_read(parser, token, 2, 0, "# \t", PARSE_NORMAL)) {
192 if (!token[1]) 195 if (!token[1])
193 continue; 196 continue;
194 if (strcmp("MANPATH", token[0]) == 0) { 197 if (strcmp("MANDATORY_MANPATH"+10, token[0]) == 0 /* "MANPATH"? */
198 || strcmp("MANDATORY_MANPATH", token[0]) == 0
199 ) {
195 char *path = token[1]; 200 char *path = token[1];
196 while (*path) { 201 while (*path) {
197 char *next_path; 202 char *next_path;