Commit Graph

31 Commits

Author SHA1 Message Date
joerg 78eefffb5d static + __dead 2011-09-06 18:46:03 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
daniel ce560c1e4f PR/9742: whatis doesn't deal with '.' in manpage names (John Hawkinson)
Use name matching code from OpenBSD (ack christos@).
2006-09-26 04:16:24 +00:00
chuck d09fe2c467 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.
2006-04-10 14:39:06 +00:00
rpaulo e606ac2d9a PR bin/31068: whatis doesn't find /bin/[ by Zafer Aydogan.
Patch provided by Jukka Salmi. I just added a comment.
2005-08-25 16:29:15 +00:00
dsl 48cdfe10a9 Use isalnum((unsigned char)x) instead of testing both isdigit() and isalpha() 2004-11-05 19:54:47 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
lukem 3bcb486fa2 - revert change to accessing ../man/ includes as <man/xxx.h>; it's
ugly to add -I.../usr.bin to do this.  instead, add appropriate
  comments in the source to where the files are actually coming from.
- use NETBSDSRCDIR as appropriate
- some minor makefile delint
2002-09-19 11:29:54 +00:00
mycroft 64513b2399 config.[ch] -> manconf.[ch] 2002-09-13 20:27:52 +00:00
lukem 60ca6c1a6a cleanup TAILQ use 2002-06-11 07:17:15 +00:00
itojun a6561c0e63 sync with usr.bin/man change 2002-06-11 05:55:24 +00:00
jdolecek 215ac5cf9b document -C option, add /etc/man.conf to FILES and xref man.conf(5) 2002-03-08 20:27:41 +00:00
jdolecek 0f794d6d71 use -I${CURDIR}/.. and #include <man/config.h>, <man/pathnames.h> so
that it's easier to tell from where do they come, and more easily
  usable in host tool code when cut&pasted
use TAILQ_* macros as apropriate
use EXIT_FAILURE for the glob error case, too
2002-03-08 20:23:10 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
kleink d39ba37ccb Since GLOB_NOCHECK is not set, explicitly check for a return value of
GLOB_NOMATCH from glob().  Noticed by Juergen Hannken-Illjes.
1998-07-06 14:23:31 +00:00
kleink fc5d36f8e4 GLOB_QUOTE is dead; per POSIX, backslash quoting of special characters being
enabled is the default behaviour.
1998-06-19 22:58:04 +00:00
fair 2249fd4c1a add .Xr makewhatis 8 1998-04-09 09:12:44 +00:00
perry cb9fa15a74 change includes to fix compiler warning 1998-02-03 04:24:17 +00:00
mrg 81a056bc2e handle strings longer than 256 bytes. should do this with fgetln()...but
fgetln() doesn't nul terminate, and thus requires malloc/copy for each
interation (actually, *two* for whatis(1)).
1997-11-12 00:04:49 +00:00
lukem 3e8e744696 getopt returns -1 not EOF 1997-11-01 06:49:14 +00:00
mikel dfd29394f1 fix problem from PR4292 here as well 1997-10-20 23:03:02 +00:00
lukem 451d258e55 deprecate register, fix .Nm usage 1997-10-20 03:16:30 +00:00
mrg 1adb2ae9af clean up .Nm usage 1997-10-20 02:25:19 +00:00
mikel d7350315cf now needs -I to find headers from ../man 1997-10-17 07:08:51 +00:00
mikel 4d52d27c85 cleanup for WARNS=1; also avoid feeding relative pathnames to
#include, and avoid using array contents out of scope.
1997-10-17 07:08:06 +00:00
mikel 462a1eae17 add support for globbing _whatdb entries in man.conf; from Mike
Grupenhoff in PR bin/1904 with some improvements by myself.
1997-10-17 06:58:52 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
tls c6f1b0a138 RCS ID Police, also Sync to 4.4BSD-Lite2 1997-01-09 12:03:21 +00:00
jtc 5720e226ae misc cleanup by jimj and myself. 1994-12-21 07:11:00 +00:00
cgd 4b370535ab add whatis(1); part of new man(1) package from Bostic 1993-12-21 02:56:54 +00:00