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.
This commit is contained in:
Vincent Renardias 1998-02-25 20:44:32 +00:00
parent 966e17c168
commit adfb743a83

View file

@ -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;
}