History log of /src/libexec/makewhatis/makewhatis.c |
Revision | | Date | Author | Comments |
1.51 |
| 02-Oct-2017 |
christos | make this compile.
|
1.50 |
| 02-Oct-2017 |
joerg | Include time.h for time.
XXX Doesn't build with newer zlib, remove?
|
1.49 |
| 24-Jun-2013 |
christos | branches: 1.49.20; skip text that is in the cvs log (joerg)
|
1.48 |
| 24-Jun-2013 |
christos | PR/47958: Robert Kovacic: makewhatis.c not generating entries in whatisdb for POD generated pages
|
1.47 |
| 02-Apr-2009 |
apb | branches: 1.47.6; 1.47.12; In addwhatis(), two items should not be treated as duplicates unless both the "data" and "prefix" elements are identical. For example, the two lines
amiga/boot (8) - system bootstrapping procedures amd64/boot (8) - system bootstrapping procedures
both appear with data = "boot (8) - system bootstrapping procedures" but with different values for prefix, and we do not want to reject one of them as a duplicate.
|
1.46 |
| 16-Nov-2008 |
dholland | branches: 1.46.2; Minor KNF and whitespace nits. No functional change.
|
1.45 |
| 16-Nov-2008 |
dholland | Close possible race conditions if multiple copies of makewhatis end up running concurrently. Other half of the fix for PR 35619.
|
1.44 |
| 20-Jul-2008 |
lukem | branches: 1.44.4; Remove the \n and tabs from the __COPYRIGHT() strings.
|
1.43 |
| 27-May-2008 |
dholland | Urgh, part of another patch for PR 35619 (which is for after the freeze) snuck in by accident, corrupting an error message. Fix.
|
1.42 |
| 27-May-2008 |
dholland | Update whatis.db atomically, by dumping out into whatis.db.new and renaming. PR 35619 from uwe@.
|
1.41 |
| 28-Apr-2008 |
martin | branches: 1.41.2; Remove clause 3 and 4 from TNF licenses
|
1.40 |
| 26-Aug-2006 |
christos | branches: 1.40.16; use efun(3)
|
1.39 |
| 10-Apr-2006 |
chuck | 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.
|
1.38 |
| 18-Nov-2005 |
christos | Deal with fts errors properly.
|
1.37 |
| 15-Sep-2005 |
tron | Reject unformatted manual pages with "[" characters in the description because "makewhatis" cannot handle nroff macros properly. This fixes the result of "apropos chrtbl". Problem pointed out by wizd(8) in private e-mail.
|
1.36 |
| 01-Jun-2005 |
lukem | appease gcc -Wuninitialized
|
1.35 |
| 04-Apr-2005 |
wiz | Sync usage with man page.
|
1.34 |
| 03-Apr-2005 |
christos | Make it parse old man pages, new mdoc pages, broken pages, and pages where the synopsis line does not give us the section number. Add -w flag to print pages we still don't like. Now we parse 99% of the pages properly.
|
1.33 |
| 03-Apr-2005 |
christos | remove debugging printfs.
|
1.32 |
| 03-Apr-2005 |
christos | Cat pages end up looking like "page -- description", so substitute "--" for the section page. This makes things look right again, and avoids duplicates.
|
1.31 |
| 05-Nov-2004 |
dsl | branches: 1.31.2; Add (unsigned char) cast to ctype functions
|
1.30 |
| 27-Oct-2003 |
lukem | Overhaul how `build.sh tools' are used:
* Rename "config.h" to "nbtool_config.h" and HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H. This makes in more obvious in the source when we're using tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before <sys/cdefs.h> so that the former can provide __RCSID() (et al), and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding: #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif to the top of the source files (for the general case).
|
1.29 |
| 13-Jul-2003 |
itojun | use bounded string op (some remains)
|
1.28 |
| 14-Jun-2003 |
wiz | Do not hardcode "nroff", allow it to be overridden by defining NROFF. Useful for tools/makewhatis.
|
1.27 |
| 14-Jun-2003 |
wiz | Report on which file nroff returned an error.
|
1.26 |
| 13-Sep-2002 |
thorpej | Rename man/config.{c,h} to man/manconf.{c,h}, so we don't have to worry about problems including "config.h" when building as a host tool.
|
1.25 |
| 11-Jun-2002 |
tron | Adapt to lastest changes of configuration handling in man(1).
|
1.24 |
| 10-Mar-2002 |
jdolecek | branches: 1.24.2; fix behaviour if exactly one directory is specified (off-by-one error) this caused makewhatis behave as if called without arguments at all
Problem reported by Xavier HUMBERT on current-users.
|
1.23 |
| 08-Mar-2002 |
jdolecek | If called without arguments, parse /etc/man.conf and regenerate the whatis databases specified there. By default, the individual databases are actually generated by forked children in this case, for performance reasons. This feature can be switched off by new -f flag. If the configuration file can't be parsed or doesn't contain any _whatdb entries, the code falls back to /usr/share/man as before.
Added -C, which allows to specify alternate configuration file. This is compatible with apropos(1) and whatis(1) flag of same name.
Update manpage accordingly and document behaviour a bit better. Also add a HISTORY section, hopefully correct (done using CVS logs).
This solves toolchain/5231 by Tim Rightnour and bin/7696 by Allen Briggs.
|
1.22 |
| 07-Mar-2002 |
jdolecek | Make the whatis enties prefixed with man subdirectory the manpage appears in, as commonly used for architecture-specific manpages. The subdirectory is deliberately printed such that the entry is suitable for cut&paste for man(1).
Fixes bin/9744 by John Hawkinson and misc/14997 by Hiramatsu Yoshifumi.
|
1.21 |
| 31-Jan-2002 |
tv | Roll in fixes to permit cross-compiling from non-NetBSD hosts. This round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions.
|
1.20 |
| 29-Jan-2002 |
tv | Make almost all tools compile and run properly on non-NetBSD hosts. (In particular, most tools now run correctly on Solaris 7.)
|
1.19 |
| 21-Jan-2002 |
tron | Handle ".Xr" commands with text after the section number probably. This fixes PR bin/15253 by Thomas Klausner.
|
1.18 |
| 11-Jan-2002 |
christos | - fix whitespace nits. - change error checking philosophy: instead of returning errors to the upper layer only to fail silently and exit there, or die of unexpected NULL pointers bail out and print an error immediately. Add emalloc/estrdup to simplify. This change removed a bunch of code. - fix size_t/int confusion - cast argument to isspace(3) to unsigned char - ? : statement is not an lvalue, so don't take its address. - unlink the file before we open it, because we chmod it to readonly. - misc KNF
|
1.17 |
| 23-Nov-2001 |
tron | Avoid strange error message in case of corrupted manual page files.
|
1.16 |
| 10-Apr-2001 |
tron | Strip overstrike characters from input lines while searching for a "NAME" section in a formatted manual page. "makewhatis" now recognizes and indexes the OpenSSL manual pages properly. Fixes PR bin/12390 by Hubert Feyrer.
|
1.15 |
| 08-Apr-2001 |
tron | Abort parsing and invoke "nroff" if an unsupported macro is found in the description section of an unformatted manual page. While this makes the "makewhatis" two times slower in avoids creation of several incorrect entries in the "whatis.db" database. This fixes PR bin/12535 by Thomas Klausner.
|
1.14 |
| 08-Apr-2001 |
tron | - Use ".TH" lines in unformatted manual pages to find correct section number. - Always invoke "nroff" if builtin parser for unformatted manual pages fails and try to parse formatted manual page.
|
1.13 |
| 19-Feb-2001 |
cgd | convert to use getprogname()
|
1.12 |
| 13-Jul-2000 |
tron | Invoke "nroff" with "-S" (safer mode) option because "makewhatis" is usually invoked by "root".
|
1.11 |
| 13-Jul-2000 |
tron | Kill "nroff" process and wait for its terminiation if we can't setup the "libz" file handle.
|
1.10 |
| 13-Jul-2000 |
tron | Optimize invokation of "nroff": - Redirect standard error to "/dev/null" because "nroff" error messages for temporary files aren't really useful. - Don't let "nroff" open temporary file. Use its file descriptor as standard input.
|
1.9 |
| 10-Jul-2000 |
tron | Check exit code returned from "nroff" if it is used to convert unformatted manual pages.
|
1.8 |
| 09-Jul-2000 |
tron | Invoke "nroff" and parse its output if an unformatted manual page uses macros. Fixes PR bin/9083 by Geoff C. Wing.
|
1.7 |
| 24-Jan-2000 |
tron | branches: 1.7.4; Don't write leading white spaces and directory names to whatis file.
|
1.6 |
| 31-Dec-1999 |
tron | Accept all kind of whitespaces when searching for the end of a nroff macro.
|
1.5 |
| 31-Dec-1999 |
tron | Correct and improve nroff macro stripping. Partially fixes PR bin/9083 by Geoff C. Wing.
|
1.4 |
| 11-Dec-1999 |
tron | branches: 1.4.2; Recognize manual page sections "l" and "n" used by the package system. This fixes PR bin/8977 by Thilo Manske.
|
1.3 |
| 25-Sep-1999 |
tron | Set file modes of whatis.db database file to 444 like the old script did.
|
1.2 |
| 25-Sep-1999 |
tron | Fix incorrect error check after writing database file.
|
1.1 |
| 25-Sep-1999 |
tron | Replace shell script for creating whatis.db database with a C program which is a little bit faster.
|
1.4.2.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.7.4.4 |
| 23-Jan-2002 |
he | Pull up revisions 1.18-1.19 (via patch, requested by tron): Cleanup and enhance error handling. Handle ``.Xr'' commands with text after the section number properly. Fixes PR#15253. This synchronizes with version 1.19.
|
1.7.4.3 |
| 22-Apr-2001 |
he | Pull up revisions 1.14-1.16 (requested by tron): Major improvments of parsing formatted and unformatted manual pages. Includes fixes for PR#12390 and PR#12535.
|
1.7.4.2 |
| 13-Jul-2000 |
tron | Sync with netbsd-current, approved by releng-1-5: - Optimize invokation of "nroff": - Redirect standard error to "/dev/null" because "nroff" error messages for temporary files aren't really useful. - Don't let "nroff" open temporary file. Use its file descriptor as standard input. - Kill "nroff" process and wait for its terminiation if we can't setup the "libz" file handle. - Invoke "nroff" with "-S" (safer mode) option because "makewhatis" is usually invoked by "root".
|
1.7.4.1 |
| 12-Jul-2000 |
tron | Sync with netbsd-current, approved by releng-1-5: Invoke "nroff" and parse its output if an unformatted manual page uses macros. Fixes PR bin/9083 by Geoff C. Wing.
|
1.24.2.2 |
| 03-Nov-2002 |
he | Pull up revision 1.25 (requested by he in ticket #787): Make these compile again, after the changes in ticket #787.
|
1.24.2.1 |
| 03-Nov-2002 |
he | Pull up revision 1.26 (requested by thorpej in ticket #787): Rename man/config.{c,h} to man/manconf.{c,h}, so we do not have to worry about problems including "config.h" when building as a host tool.
|
1.31.2.6 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.37 Reject unformatted manual pages with "[" characters in the description because "makewhatis" cannot handle nroff macros properly. This fixes the result of "apropos chrtbl". Problem pointed out by wizd(8) in private e-mail.
|
1.31.2.5 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.36 appease gcc -Wuninitialized
|
1.31.2.4 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.35 Sync usage with man page.
|
1.31.2.3 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.34 libexec/makewhatis/makewhatis.8: revision 1.10 Make it parse old man pages, new mdoc pages, broken pages, and pages where the synopsis line does not give us the section number. Add -w flag to print pages we still don't like. Now we parse 99% of the pages properly.
|
1.31.2.2 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.33 remove debugging printfs.
|
1.31.2.1 |
| 15-Sep-2005 |
snj | Pull up following revision(s) (requested by tron in ticket #789): libexec/makewhatis/makewhatis.c: revision 1.32 Cat pages end up looking like "page -- description", so substitute "--" for the section page. This makes things look right again, and avoids duplicates.
|
1.40.16.2 |
| 04-Jun-2008 |
yamt | sync with head
|
1.40.16.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.41.2.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.41.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.44.4.1 |
| 04-Apr-2009 |
snj | Pull up following revision(s) (requested by apb in ticket #667): libexec/makewhatis/makewhatis.c: revision 1.47 In addwhatis(), two items should not be treated as duplicates unless both the "data" and "prefix" elements are identical. For example, the two lines amiga/boot (8) - system bootstrapping procedures amd64/boot (8) - system bootstrapping procedures both appear with data = "boot (8) - system bootstrapping procedures" but with different values for prefix, and we do not want to reject one of them as a duplicate.
|
1.46.2.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.47.12.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.47.6.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.49.20.1 |
| 18-Nov-2018 |
martin | Pull up following revision(s) (requested by sevan in ticket #1096):
libexec/makewhatis/makewhatis.c: revision 1.50 libexec/makewhatis/makewhatis.c: revision 1.51
Include time.h for time. XXX Doesn't build with newer zlib, remove?
-
make this compile.
|