summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorchuck <chuck@NetBSD.org>2006-04-10 14:39:06 +0000
committerchuck <chuck@NetBSD.org>2006-04-10 14:39:06 +0000
commitd09fe2c4673f194caa934b0a7965aeca08858cbc (patch)
treeefc1bde08f608d4e15b723524f3448e8ae5542a1 /libexec
parentf7a378cb65975356d077330eaa2649352ff6fa23 (diff)
modified man(1):
- avoid double slashes when displaying man pages (got tired of '/usr/share/man//cat1/man.0'). - got rid of __P() while working on it. - incorporate some of my old notes explaining how manpath works into the comments of the code itself. - renamed some of the vars so that the code is consistent throughout (and hopefully clearer and easier to understand) - fixed relative man paths for multiple man pages (man did a chdir() on the first man page it had to format --- this broke any remaining relative path man pages left to process). save old directory and fchdir() back to it after formatting. - improved doc on "man -h" which does more than just whatis(1) [e.g. "man -h fopen" prints the required include files and the prototypes rather than just the one-liner you get with whatis(1)] - manconf.c now fills in the "len" length field in the TAG/ENTRY structures (man now uses len). revise man.conf file reading stuff to return error on failure in addentry/gettag (fka getlist) rather than just err()ing out. this allows man(1) to call cleanup and delete its tmp files rather than just leave them floating. revise other apps using this code (makewhatis, apropos, catman, whatis) to expect this. also remove __P on updated files.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/makewhatis/makewhatis.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/makewhatis/makewhatis.c b/libexec/makewhatis/makewhatis.c
index 279e4e41e83..6ef6cbf58c6 100644
--- a/libexec/makewhatis/makewhatis.c
+++ b/libexec/makewhatis/makewhatis.c
@@ -1,4 +1,4 @@
-/* $NetBSD: makewhatis.c,v 1.38 2005/11/18 17:12:09 christos Exp $ */
+/* $NetBSD: makewhatis.c,v 1.39 2006/04/10 14:39:06 chuck Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\n\
All rights reserved.\n");
-__RCSID("$NetBSD: makewhatis.c,v 1.38 2005/11/18 17:12:09 christos Exp $");
+__RCSID("$NetBSD: makewhatis.c,v 1.39 2006/04/10 14:39:06 chuck Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -180,14 +180,14 @@ main(int argc, char *const *argv)
* if man.conf not available.
*/
config(conffile);
- if ((tp = getlist("_whatdb", 0)) == NULL) {
+ if ((tp = gettag("_whatdb", 0)) == NULL) {
manpath = default_manpath;
goto mkwhatis;
}
/* Build individual databases */
paths[1] = NULL;
- TAILQ_FOREACH(ep, &tp->list, q) {
+ TAILQ_FOREACH(ep, &tp->entrylist, q) {
if ((rv = glob(ep->s,
GLOB_BRACE | GLOB_NOSORT | GLOB_ERR | GLOB_NOCHECK,
NULL, &pg)) != 0)