summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Renardias <vinc@src.gnome.org>1998-02-25 20:44:32 +0000
committerVincent Renardias <vinc@src.gnome.org>1998-02-25 20:44:32 +0000
commite6a70a076ec1a3b89ab54804de09c22f29be24a5 (patch)
tree65a2c7b8224d209ad4db18e31565bca158492804
parent59dc3774bfbd626f74e50f6a591534b53e409cd3 (diff)
downloadyelp-e6a70a076ec1a3b89ab54804de09c22f29be24a5.tar.gz
Wed, 25 Feb 1998 21:41:18 +0100 [Vincent]
- if man:/usr/man/manX/foo.X doesn't exist, check if man:/usr/man/manX/foo.X.gz does.
-rw-r--r--src/man2html/yelp-man2html.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/man2html/yelp-man2html.c b/src/man2html/yelp-man2html.c
index 7bc4e5a2..48e279f4 100644
--- a/src/man2html/yelp-man2html.c
+++ b/src/man2html/yelp-man2html.c
@@ -3640,7 +3640,15 @@ static char *search_manpath(char *name)
}
strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX);
strmaxcat(smfbuf, name, LARGE_STR_MAX);
- if (stat(smfbuf, &stbuf) !=-1) return smfbuf;
+ if (stat(smfbuf, &stbuf) !=-1) {
+ return smfbuf;
+ } else {
+ strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX);
+ strmaxcat(smfbuf, name, LARGE_STR_MAX);
+ strmaxcat(smfbuf, ".gz", LARGE_STR_MAX);
+ if (stat(smfbuf, &stbuf) !=-1)
+ return smfbuf;
+ }
}
return NULL;
}