72 |
extern int errno; |
extern int errno; |
73 |
#endif |
#endif |
74 |
|
|
75 |
|
#ifdef HAVE_LIBGEN_H |
76 |
|
# include <libgen.h> |
77 |
|
#endif /* HAVE_LIBGEN_H */ |
78 |
|
|
79 |
#include <libintl.h> |
#include <libintl.h> |
80 |
#define _(String) gettext (String) |
#define _(String) gettext (String) |
81 |
|
|
265 |
|
|
266 |
if (!lg.whatis) { /* cache miss */ |
if (!lg.whatis) { /* cache miss */ |
267 |
/* go get the whatis info in its raw state */ |
/* go get the whatis info in its raw state */ |
268 |
|
char *file_copy = xstrdup (file); |
269 |
#ifdef COMP_SRC |
#ifdef COMP_SRC |
270 |
/* if the nroff was compressed, an uncompressed version is |
/* if the nroff was compressed, an uncompressed version is |
271 |
shown by a call to get_ztemp(), grog this for a whatis |
shown by a call to get_ztemp(), grog this for a whatis |
280 |
#ifdef COMP_SRC |
#ifdef COMP_SRC |
281 |
ztemp = get_ztemp (); |
ztemp = get_ztemp (); |
282 |
if (ztemp) { |
if (ztemp) { |
283 |
find_name (ztemp, basename (file), &lg); |
find_name (ztemp, basename (file_copy), &lg); |
284 |
remove_ztemp (); /* get rid of temp file identifier */ |
remove_ztemp (); /* get rid of temp file identifier */ |
285 |
} else |
} else |
286 |
#endif /* COMP_SRC */ |
#endif /* COMP_SRC */ |
287 |
find_name (ult, basename (file), &lg); |
find_name (ult, basename (file_copy), &lg); |
288 |
|
free (file_copy); |
289 |
regain_effective_privs (); |
regain_effective_privs (); |
290 |
|
|
291 |
hash_install (whatis_hash, ult, strlen (ult), |
hash_install (whatis_hash, ult, strlen (ult), |