Sun Jul 3 22:14:02 BST 2005 Colin Watson * Version: 2.4.3. * configure.in, docs/NEWS, man-db.lsm: Update. * man-db.lsm: Correct primary download location. Sun Jul 3 20:55:13 BST 2005 Colin Watson * configure.in: Define HAVE_GZIP, HAVE_COMPRESS, and HAVE_BZIP2 as appropriate. * include/comp_src.h.in: Conditionalise compressor list on HAVE_GZIP, HAVE_COMPRESS, and HAVE_BZIP2 rather than on GUNZIP, UNCOMPRESS, and BUNZIP2; if a compressor isn't detected, the latter will end up as empty strings, not undefined. Thanks to Paul Slootman (Debian bug #196097). * docs/NEWS: Document this. Sun Jul 3 18:58:14 BST 2005 Colin Watson * GNUmakefile.in (__distclean): Remove po/Makevars.template. Sun Jul 3 18:11:56 BST 2005 Colin Watson * docs/NEWS: List more language support since 2.4.2. Sun Jul 3 17:45:18 BST 2005 Colin Watson * docs/NEWS: Minor clarification. Sun Jul 3 17:41:20 BST 2005 Robert Luberda * po/pl.po: Update. Sun Jul 3 17:39:14 BST 2005 Yuri Kozlov * po/ru.po: Update. Tue Jun 21 13:58:37 BST 2005 Jordi Mallach * po/ca.po: Update from Translation Project. * man/THANKS: Update e-mail address. Mon Jun 20 14:46:22 BST 2005 Colin Watson * tools/config.guess, tools/config.sub: Update to 2005-04-22. Fri Jun 10 15:05:53 BST 2005 Colin Watson * Version: 2.4.3-pre1 (for translators). Fri Jun 10 14:53:52 BST 2005 Colin Watson * man/THANKS: Add translator credits for it.po, ja.po, pt_BR.po, and sv.po. Fri Jun 10 14:36:36 BST 2005 Colin Watson * po/LINGUAS: Add ro. * man/THANKS: Add translator credit. * po/fi.po, po/ro.po: Update with msgmerge. Fri Jun 10 14:31:42 BST 2005 Eugen Hoanca * po/ro.po: New from Translation Project. Fri Jun 10 14:29:17 BST 2005 Jordi Mallach * po/ca.po: Update from Translation Project. Fri Jun 10 14:22:04 BST 2005 Colin Watson * po/fi.po: New, from Lauri Nurmi via the Translation Project. * po/LINGUAS: Add fi. * man/THANKS: Add translator credit. Mon Jun 6 02:15:07 BST 2005 Colin Watson * docs/NEWS: Document various changes since this file was last updated. Sun Jun 5 15:47:10 BST 2005 Jeremy C. Reed * configure.in: Add support for db4. Check for db3/db_185.h before db_185.h. Sat Jun 4 12:42:26 BST 2005 Colin Watson * docs/manpage.example.mdoc: New file. Sat Jun 4 12:23:15 BST 2005 Colin Watson * po/ru.po: Update with msgmerge. Sat Jun 4 12:21:17 BST 2005 Colin Watson * po/ru.po: New, from Yuri Kozlov (Debian bug #268584). * po/LINGUAS: Add ru. * man/THANKS: Add translator credit. Sat Jun 4 12:17:52 BST 2005 Colin Watson * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/pl.po, po/pt_BR.po, po/sv.po: Update with msgmerge. Sat Jun 4 11:48:58 BST 2005 Colin Watson * po/pl.po: Fix typo in Last-Translator e-mail address. Sat Jun 4 11:46:13 BST 2005 Colin Watson * po/pl.po: New, from Robert Luberda (Debian bug #245057). * po/LINGUAS: Add pl. * man/THANKS: Add translator credit. Sat Jun 4 10:59:29 BST 2005 Colin Watson * lib/getcwdalloc.c, lib/getcwdalloc.h: Fix header comments. Sat Jun 4 10:55:47 BST 2005 Colin Watson * src/lexgrog.l (MAN_NAME): Terminate NAME section parsing on encountering a macro definition (Debian bug #275562). Wed Jan 5 15:08:06 GMT 2005 Colin Watson * src/encodings.c (directory_table): Add Turkish -> ISO-8859-9. Sun Dec 12 21:48:04 CET 2004 Colin Watson * lib/pipeline.c (pipeline_sigchld): Don't bother saving and restoring errno if SIGCHLD is being queued. Mon Nov 8 09:57:27 GMT 2004 Colin Watson * lib/pathsearch.c: New file, containing functions for searching $PATH. * lib/pathsearch.h: Prototype pathsearch_executable(). * lib/Makefile.in: Always compile pathsearch.c. * src/man.c (find_in_path): Remove; replaced by pathsearch_executable(). (gripe_no_man): Use pathsearch_executable() instead of find_in_path(). Mon Nov 8 09:52:02 GMT 2004 Colin Watson Get rid of plain getcwd(); this allows getting rid of most uses of PATH_MAX. * lib/getcwdalloc.c: New file, providing an allocating version of getcwd(). * lib/getcwdalloc.h: Prototype it. * lib/Makefile.in: Always compile getcwdalloc.c. * src/man.c (main, format_display): Use getcwd_allocated() instead of getcwd(). * src/mandb.c (main): Likewise. * src/manp.c (add_dir_to_path_list): Likewise. Mon Nov 8 09:40:07 GMT 2004 Colin Watson * lib/hashtable.c (null_hash_free): No-op hash_free_ptr provider, for convenience. * lib/hashtable.h (null_hash_free): Prototype it. Mon Nov 8 09:36:55 GMT 2004 Colin Watson * acinclude.m4: Improve quoting to stop aclocal complaining. Improve indentation. Get rid of unnecessary changequote(). Sun Nov 7 16:07:26 GMT 2004 Colin Watson * lib/pipeline.c (pipeline_wait): Close pipeline output before reaping processes, so that writing processes get SIGPIPE. Sun Nov 7 16:05:08 GMT 2004 Colin Watson * lib/pipeline.c (pipeline_wait): Fix active process debugging output to include processes without statuses. Sun Nov 7 16:01:26 GMT 2004 Colin Watson * src/compression.c (decompress): Invalidate file_fd after closing it. Sun Nov 7 15:31:18 GMT 2004 Colin Watson * src/man.c (compare_candidates): Compare extensions' positions in section_list at the same time as sections, but do the lexical comparison fallback after comparing ids; this restores the intended ability to use SECTIONS to move extensions out of order with respect to their parent sections without breaking the earlier workaround for Debian bug #204249. Thu Jul 22 14:46:30 BST 2004 Colin Watson * src/check_mandirs.c (testmandirs): Always scan directory if last is 0 (i.e. creating) to avoid problems on systems with badly broken clocks set before the epoch. Mon Jun 28 03:56:56 BST 2004 Colin Watson * src/man.c (man): Free candidate list after displaying it. Mon Jun 28 01:19:45 BST 2004 David Weinehall * tools/mkcatdirs: Replace XSIish uses of 'test' with more portable code. Thu Apr 1 05:10:50 BST 2004 Colin Watson * src/encodings.c (charset_table): Use the latin1 device for ISO-8859-15, even though that isn't exactly right. Thu Apr 1 04:56:02 BST 2004 Colin Watson * src/encodings.c (get_page_encoding, get_standard_output_encoding): Remove trailing , and @ from locale names. * src/encodings.h (get_page_encoding, get_standard_output_encoding): Update prototypes: these no longer return const. * src/man.c (make_roff_command): Free page_encoding and cat_charset. Thu Apr 1 00:18:55 BST 2004 Colin Watson * src/man.c (do_extern): Pass only options understood by apropos/whatis, using the pipeline library (Debian bug #207436). (main): Make optind global. Install SIGINT and SIGCHLD handlers earlier. Update do_extern call. * docs/NEWS: Document this. Wed Mar 31 23:40:15 BST 2004 Colin Watson * src/man.c (make_roff_command): If stdout isn't a terminal, get rid of formatting characters using GROFF_NO_SGR=1 and 'col -b' (thanks, Adam Heath). * docs/NEWS: Document this. Thu Mar 25 19:31:02 GMT 2004 Colin Watson * src/whatis.c (apropos): Move warning-silencing code to the bottom of the function, so that it doesn't interfere with declarations. Sun Mar 14 03:52:12 UTC 2004 Giuseppe Sacco * Updated italian translation (corrected three fuzzy strings) Tue Mar 9 10:25:40 GMT 2004 Colin Watson * zsoelim/zsoelim.l: Define debug for the benefit of pipeline.c. (open_file): Use pipeline library. Tue Mar 9 01:54:20 GMT 2004 Colin Watson * zsoelim/zsoelim.l: Long-overdue style cleanup per docs/HACKING. No functional changes. Tue Mar 9 00:37:23 GMT 2004 Colin Watson Roll out the new pipeline library in most programs. * src/compression.c (decompress): Use pipeline library. * src/fake_security.c (do_system_drop_privs): Likewise. * src/lexgrog.l (main): Initialize pipeline library. * src/man.c (checked_popen, gripe_system, checked_system, run_mandb, format_display_and_save, format_display, display_catman, display): Use pipeline library. (add_roff_line_length): Append to a command structure rather than using strappend. (main): Initialize pipeline library. (make_roff_command): Return a constructed pipeline instead of a malloced string. This plugs various hitherto difficult leaks. Drop support for changing the line length with groff < 1.18, as the pipeline library can't handle compound commands in pipelines yet. (make_browser): Return a constructed pipeline instead of a statically allocated string. The pipeline construction is very crude for now. (make_display_command): Return a constructed pipeline instead of a malloced string. The htmlout case is strange for now (return NULL and let format_display sort it out). (tmp_cat_filename): Handle debug > /dev/null here rather than in open_cat_stream. Construct the temporary cat filename more sensibly. Open the temporary file and record its file descriptor. (open_cat_stream): Return a constructed (and started, if COMP_CAT is defined) pipeline instead of a stream. This gets rid of a fixed-size buffer associated with security problems in the past, although it wasn't a vulnerability in itself. (close_cat_stream): Clean up pipeline rather than stream. (format_display): The htmlout case ignores disp_cmd and puts the display pipeline together itself. (display): When calling format_display_and_save, assert (disp_cmd) to make sure we aren't in the htmlout case. * src/man.h (make_roff_command): Drop unnecessary prototype. * src/mandb.c (main): Initialize pipeline library. * src/security.c (do_system_drop_privs): Take a pipeline rather than a string. * src/security.h (do_system_drop_privs): Update prototype. * src/straycats.c (check_for_stray): Use pipeline library. * src/util.c (do_system): Take a pipeline rather than a string. This becomes a simple synchronous wrapper around pipeline_start and pipeline_wait. * src/whatis.c (use_grep): Use pipeline library. (main): Initialize pipeline library. * include/manconfig.h.in (struct pipeline): Declare opaquely. (do_system): Update prototype. * configure.in: Drop 'exec' from default pager; no longer needed since the pipeline library obviates the use of /bin/sh -c. * docs/NEWS: Document all this. Mon Mar 8 16:45:27 GMT 2004 Colin Watson * src/compression.c (comp_info): If the new want_stem argument is set, put a copy of the filename without extension in comp->stem rather than a strange thing in comp->file. This is closer to what most callers actually want, and removes a lot of memory management confusion. (comp_file): Use comp->stem instead of comp->file (previous usage matched this semantically). * include/manconfig.h.in (struct compression): Replace 'file' with 'stem'. (comp_info): Update prototype. * src/convert_name.c (convert_name): Update comp_info call. * src/filenames.c (filename_info): Fix misuse of basename. Update comp_info call. * src/lexgrog.l (find_name): Update comp_info call. * src/man.c (local_man_loop): Likewise. * src/straycats.c (check_for_stray): Likewise. * src/ult_src.c (ult_src): Likewise. * zsoelim/zsoelim.l (open_file): Don't set comp->file. Add a clone-and-hack warning. Mon Mar 8 16:07:11 GMT 2004 Colin Watson * src/compression.c (decompress): Error out if decompression program not found, as a temporary workaround for poor detection in configure. Mon Mar 8 15:59:29 GMT 2004 Colin Watson * src/manp.c (get_catpath): Use xstrdup and strappend rather than doing memory management by hand. Mon Mar 8 11:28:51 GMT 2004 Colin Watson * include/manconfig.h.in: Protect against multiple inclusion. Mon Mar 8 11:21:05 GMT 2004 Colin Watson * lib/pipeline.c (pipeline_dump): Show caller-supplied input and output file descriptors. * lib/pipeline.c (command_free, pipeline_free): Return safely if argument is NULL. * lib/pipeline.h (command_free, pipeline_free): Document NULL arguments as a safe no-op, like free(). Mon Mar 8 09:33:08 GMT 2004 Colin Watson * docs/manpage.example (DESCRIPTION): ".SS macros" -> ".SS macro". Mon Mar 8 00:16:53 GMT 2004 Colin Watson * src/man.c (compare_candidates): Instead of comparing extensions followed by ids, compare pure sections first, then ids, then extensions. This works around the worst effects of Debian bug #204249, in which we have an incorrect whatis ref xterm(1) in /usr/share/man and a correct real xterm(1x) in /usr/X11R6/man. Sun Mar 7 23:55:48 GMT 2004 Colin Watson * src/man.c (compare_candidates): Keep searching for more specific extension matches in section_list even after finding one. Wed Jan 28 00:15:00 GMT 2004 Colin Watson * src/lexgrog.l: Add a terrifying hack to make '.B "..."' work in NAME sections. lex is really the wrong tool for this job, I feel. Tue Jan 27 23:37:58 GMT 2004 Colin Watson * src/lexgrog.l: Attempt to fix problems with groff requests immediately following .SH NAME. All patterns in the MAN_FILE and MAN_NAME states need to avoid matching trailing newlines, since they're needed by other patterns to detect beginning-of-line. In order to ignore any excess whitespace following .SH NAME, which is how this problem got created, introduce a MAN_PRENAME start condition, which just skips over spacing. Some evil use of yyless is needed to transition properly to the MAN_NAME start condition from this without eating trailing newlines. Tue Jan 27 21:19:41 GMT 2004 Colin Watson * src/Makefile.in (LFLAGS): Add -d if LEXGROG_DEBUG=yes. Wed Dec 24 10:29:16 UTC 2003 Giuseppe Sacco * src/whatis.c (usage): Fix usage message for --section * updated italian translation. Wed Dec 24 10:10:16 GMT 2003 Colin Watson * src/whatis.c (usage): Fix usage message for --section, thanks to Giuseppe Sacco. Wed Dec 24 09:14:19 UTC 2003 Giuseppe Sacco * Updated italian translation Mon Nov 17 22:50:39 GMT 2003 Colin Watson * src/globbing.c (match_in_directory): Oops; stop decrementing bsearched when it reaches the beginning of the cache->names array, otherwise patterns beginning with a metacharacter cause a segfault. (The decrement loop is necessary because bsearch() doesn't specify which element it returns if there are multiple matches.) Mon Nov 17 05:04:54 GMT 2003 Colin Watson Speed up mandb's purging functions further, from about 20 seconds to about 2 seconds on my i386 laptop, by being more intelligent about calling fnmatch(). * src/globbing.c (cache_compare): New function. (update_directory_cache): Sort the cache. (pattern_compare): New function. (match_in_directory): Rather than scanning the whole cache, start from a point matching the start of the pattern up to the first metacharacter, and stop once this no longer matches. * src/globbing.c (TEST): Include and define _() so that the test code compiles. (main): Set program_name before any calls to usage(). Sun Nov 16 21:45:24 GMT 2003 Colin Watson * docs/HACKING: Mention the new CTYPE() macro. Sun Nov 16 21:29:35 GMT 2003 Colin Watson * src/convert_name.c (convert_name): Reorganize and clarify. The alternate argument was confusing and is now gone. Add a new fsstnd argument which controls whether the "man1" to "cat1" etc. conversion is performed. That conversion now makes sure that the directory name starts with "man" before blithely overwriting it. Treat comp->file as const, since it will be soon. * src/convert_name.h (convert_name): Update prototype. * src/man.c (find_cat_file): New logic. First, check for existing FSSTND cat files; then check for a cat dir based on the ultimate source, if different from the original (Debian bug #129575); then check for a cat dir based on the original man page path. (display): Drop the !local_man_file case which tries to work out whether to save a cat, as it's not a problem to try regardless of whether there's already one in a FSSTND location. (display_filesystem, display_database): Add extra argument to find_cat_file() so that it knows the original man page path as distinct from the ultimate source. (display_filesystem): Remove debugging output, now in find_cat_file(). * docs/ToDo: Remove entry about cleaning up cat file code, now done. Sun Nov 16 19:28:38 GMT 2003 Colin Watson Add an option to apropos and whatis to allow specification of a section to search. * src/whatis.c (args, long_options, main): New -s/--section option. (usage): Document it. (whatis): Tell dblookup_all() to look in the section named by --section, if present. (apropos): If --section was given, check that it matches either info.sec or info.ext for each page. Use info.whatis rather than parsing the whatis out manually. * man/man1/apropos.man1 (SYNOPSIS, OPTIONS): Document --section. * man/man1/whatis.man1 (SYNOPSIS, OPTIONS): Likewise. * docs/NEWS: Start 2.4.3. Document the above. Sun Nov 16 18:47:46 GMT 2003 Colin Watson * include/manconfig.h.in (CTYPE): New macro to help get calls right. * libdb/db_lookup.c (name_to_key): Use it. * src/globbing.c (parse_layout, look_for_file): Likewise. * src/man.c (manopt_to_env, main): Likewise. * src/manp.c (add_to_dirlist): Likewise. * src/ult_src.c (ult_softlink, test_for_include): Likewise. * src/whatis.c (lower, match, word_fnmatch): Likewise. Sun Nov 16 17:06:29 GMT 2003 Colin Watson Style cleanups; no functional changes. * src/whatis.c (usage, match, apropos, search, main): Add a space before the open parenthesis in several function calls. (apropos): The nesting level has got out of control here. Use a goto and a 'nextpage' label near the end of the loop instead. Sun Nov 16 15:49:12 GMT 2003 Erik Andersen * src/straycats.c (check_for_stray): Add missing open brace to non-HAVE_CANONICALIZE_FILE_NAME case. Tue Oct 28 16:24:41 GMT 2003 Colin Watson * man/Makefile.in: Create new th* variables with capitalized variants of program names for .TH lines. * man/de_DE.88591/man1/*.man1, man/de_DE.88591/man5/*.man5, man/de_DE.88591/man8/*.man8, man/es_ES.88591/man1/*.man1, man/es_ES.88591/man5/*.man5, man/es_ES.88591/man8/*.man8, man/it_IT.88591/man1/*.man1, man/it_IT.88591/man5/*.man5, man/it_IT.88591/man8/*.man8, man/ja_JP.eucJP/man1/*.man1, man/ja_JP.eucJP/man5/*.man5, man/ja_JP.eucJP/man8/*.man8, man/man1/*.man1, man/man5/*.man5, man/man8/*.man8: Capitalize all page titles in .TH lines. * man/de_DE.88591/man5/manpath.man5: Fix typo: 'man' => 'manpath'. Sun Sep 28 20:11:55 BST 2003 Colin Watson * man-db.gnu: Remove. This is licensed under the GFDL, whose freeness is under serious question. I'm not sure if the FSF actually have standing to claim copyright over this file in the first place, but it doesn't need to be in CVS here so I don't feel like arguing about it. Sun Sep 21 02:17:43 BST 2003 Colin Watson * lib/pipeline.c (pipeline_start): Dump pipeline in debugging mode. Sun Sep 21 02:15:17 BST 2003 Colin Watson * docs/NEWS: Add a forgotten entry for 2.4.2. Sat Sep 20 18:35:54 BST 2003 Colin Watson * src/encodings.c (directory_table): Add Galician -> ISO-8859-1, Indonesian -> ISO-8859-1, Croatian -> ISO-8859-2, and Slovak -> ISO-8859-2. Sat Sep 20 11:57:58 BST 2003 Colin Watson * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge (po/Makevars changed). Sat Sep 20 01:07:24 BST 2003 Colin Watson * Version: 2.4.2. * configure.in, docs/NEWS, man-db.gnu, man-db.lsm: Update. * man-db.gnu: Suggest libgdbm-dev rather than libdb3-dev. * man-db.lsm: Suggest GDBM. Sat Sep 20 00:11:14 BST 2003 Colin Watson * src/man.c (make_roff_command): Don't recode output if an explicit encoding was specified with -E. Sat Sep 20 00:09:03 BST 2003 Colin Watson * po/.cvsignore: Add stamp-po. Fri Sep 19 22:49:14 BST 2003 Colin Watson * acinclude.m4 (MAN_CHECK_BDB): Temporarily add $lib to LIBS for AC_TRY_LINK, not to DBLIBS; but add it to DBLIBS if the test succeeds. * configure.in: Simply set DBLIBS rather than appending to it. Fri Sep 19 22:20:07 BST 2003 Colin Watson * autogen.sh: Run aclocal after autopoint, in accordance with the autopoint info documentation. Fri Sep 19 22:17:18 BST 2003 Colin Watson * configure.in (AM_GNU_GETTEXT_VERSION): Upgrade to gettext 0.12.1. * po/Makevars (MSGID_BUGS_ADDRESS): Set to me. * po/.cvsignore: Add Makevars.template. Fri Sep 19 00:48:07 BST 2003 Colin Watson * src/lexgrog.l (MAN_FILE): Accept blank lines immediately following ".SH NAME". Fri Sep 19 00:06:02 BST 2003 Colin Watson * man/man8/mandb.man8 (OPTIONS): Improve --filename wording a bit. Wed Sep 17 07:17:22 BST 2003 Colin Watson Fix case where a page explicitly encoded in UTF-8 has to be recoded down to a non-ISO-8859-1 legacy encoding for processing by groff and then back up to UTF-8 for display. * src/encodings.c (get_page_encoding): New function, renamed from get_source_encoding. (get_source_encoding): Return only the canonical source encoding, not any explicit encoding in the directory name. This allows us to take account of differing explicit encoding and canonical encoding of pages for the purposes of working out which device to use. (get_roff_encoding): New source_encoding argument, now returned instead of NULL. (get_default_device): Pass source_encoding to get_roff_encoding(). (compatible_encodings): The roff encoding can no longer be NULL. * src/encodings.h (get_page_encoding): Add prototype. (get_roff_encoding): Update prototype. * src/man.c (make_roff_command): Call get_page_encoding(), and recode from that to roff_encoding, not from source_encoding to roff_encoding. Pass source_encoding to get_roff_encoding(). roff_encoding can no longer be NULL. Tue Sep 16 22:53:36 BST 2003 Colin Watson Purge database entries corresponding to removed stray cat pages. * src/check_mandirs.c (purge_normal, purge_whatis): Add TODO notes for systems where the cat extension differs from the man extension. (purge_whatis): Rename manpath to path. New cat argument, passed through to look_for_file(). (purge_missing): New catpath argument, passed to look_for_file() and purge_whatis() in the STRAY_CAT and WHATIS_CAT cases, which are now handled. * src/check_mandirs.h (purge_missing): Update prototype. * src/mandb.c (main): Pass catpath to purge_missing(). * docs/NEWS: Document this. Tue Sep 16 22:37:33 BST 2003 Colin Watson Work around the fact that GDBM's firstkey/nextkey interface doesn't return ordered results. * libdb/db_gdbm.c (man_gdbm_open_wrapper): New function. Wraps the return value from gdbm_open() in a structure that remembers the file name. (parent_sortkey_hash_free, sortkey_hash_free): New functions to free hashtables used here. (sortkey_compare): New comparison function for qsort(). (man_gdbm_firstkey): New function. Retrieve all keys using gdbm_firstkey() and gdbm_nextkey() in advance, sort them into an ordered hashtable, remember that hashtable for later, and return the first key. (man_gdbm_nextkey): New function. Find the previously remembered ordered hashtable and return the next element from it. (man_gdbm_close): New function. Clean up remembered data. * libdb/db_lookup.c (copy_datum): Define even if using GDBM. (gripe_lock): Explain why this isn't used for GDBM. * libdb/mydbm.h (man_gdbm_wrapper): New type. (man_gdbm_open_wrapper, man_gdbm_firstkey, man_gdbm_nextkey, man_gdbm_close): Add prototypes. (MYDBM_FILE): Change to man_gdbm_wrapper for GDBM. Adjust all other MYDBM_* macros to cope with this and use man_gdbm_* functions where necessary. (copy_datum): Declare for all database types. Remove __inline__. * docs/NEWS: Document this. Tue Sep 16 01:44:59 BST 2003 Colin Watson * src/accessdb.c (main): Free each key after listing it rather than just leaking it. Mon Sep 15 23:45:33 BST 2003 Byrial Ole Jensen * po/da.po: Update from Translation Project. Mon Sep 15 23:29:33 BST 2003 Colin Watson * configure.in: Add --enable-mb-groff option, which defines MULTIBYTE_GROFF for src/encodings.c. * docs/NEWS: Document this. Mon Sep 15 01:23:00 BST 2003 Colin Watson * po/it.po: msgfmt doesn't like "charset=iso8859-1". Use "charset=iso-8859-1" instead. Sun Sep 14 17:48:38 BST 2003 Colin Watson * src/encodings.c (get_source_encoding): If the language directory is unknown (e.g. 'man -l'), guess based on the locale before falling back to a default. (get_standard_output_encoding): Likewise. Sun Sep 14 16:58:34 BST 2003 Colin Watson * src/encodings.c (get_source_encoding): Assume ISO-8859-1 source encoding if it's unknown (e.g. 'man -l'). (get_default_device): source_encoding can no longer be NULL. * src/man.c (make_roff_command): Likewise. Sun Sep 14 16:45:43 BST 2003 Colin Watson * man/man1/man.man1 (EXAMPLES, ENVIRONMENT, HISTORY): Change a few stray hyphens to dashes. Sun Sep 14 16:37:56 BST 2003 Colin Watson * src/encodings.c (get_source_encoding, get_standard_output_encoding, get_default_device, get_roff_encoding, get_output_encoding, get_less_charset): Simplify using new table element struct types. Sun Sep 14 16:24:00 BST 2003 Colin Watson Make locales like ru_RU.UTF-8 that need the ascii8 device but UTF-8 output work. This involves a good deal of restructuring. * src/encodings.c (directory_table): Remove a completed TODO comment. (directory_table, charset_table, device_table): Name array element struct types in order to abbreviate code later. (device_table): Split less_charset members out into a new table, less_charset_table. They really depend on the locale charset, but aren't quite appropriate for charset_table. Use "iso8859" rather than "latin1", and add KOI8-R. (device_table): Add output_encoding member, which is almost the inverse of charset_table but slightly different for ascii8. (compatible_encodings): New function to figure out if a source encoding and a roff encoding are compatible. (get_default_device): Take new source_encoding argument so that we can make ru_RU.UTF-8 use the ascii8 device and an iconv pipe rather than utf8 directly. Drop through to the fallback default device if none of the predefined entries in charset_table are compatible when considering the source encoding. (get_roff_encoding): Split LESSCHARSET handling out into a new function ... (get_less_charset): ... here. The caller is expected to set environment variables rather than having it done by the library. (get_output_encoding): New function, returning the output encoding produced by a device. * src/encodings.h (get_default_device): Update prototype. (get_output_encoding, get_less_charset): Add prototypes. * src/man.c (make_roff_command): Update calls to encoding library for these changes. Sun Sep 7 23:10:01 BST 2003 Colin Watson Fix decision about whether a given encoding is safe to save as a cat page. * src/encodings.c (directory_table): Add standard_output_encoding member, used to set the default encoding for cat pages. (fallback_locale_charset): Remove. (get_standard_output_encoding): New function. (get_locale_charset): New function, split out in modified form from get_default_device(). (get_default_device): Take a character set as input rather than a locale. * src/encodings.h (get_standard_output_encoding, get_locale_charset): Add prototypes. (get_default_device): Update prototype. * src/man.c (make_roff_command): Instead of comparing devices, test that the default character set for this manual hierarchy is being used, and don't save cat pages if it isn't. Sun Sep 7 11:33:09 +0200 2003 Giuseppe Sacco * po/it.po: changed the header of the po file correcting the charset and the transfer encoding. Sat Sep 6 11:53:06 BST 2003 Colin Watson * src/encodings.c (get_source_encoding): Implement encodings in manual hierarchy directory names. Include a mini-rant about the bizarre specification for these in FHS 2.1, which I've declined to implement for now. Sat Sep 6 11:28:46 BST 2003 Colin Watson * src/check_mandirs.c (purge_missing): Call MYDBM_REORG() after deleting entries. Currently only useful for gdbm. Sat Sep 6 00:23:03 BST 2003 Colin Watson * acinclude.m4 (MAN_CHECK_BDB): Append to DBLIBS rather than LIBS. * configure.in: Likewise for gdbm and ndbm tests. Make DBLIBS an output variable. * src/Makefile.in: Link only the necessary programs with the database library. Sat Sep 6 00:15:37 BST 2003 Colin Watson * libdb/db_lookup.c (make_content): Cast cont.dsize to size_t when comparing it with the return value of strlen(). Avoids warning when building with gdbm. Thu Sep 4 20:22:21 BST 2003 Christian Rose * po/sv.po: Update from Translation Project. Fri Aug 29 17:46:40 BST 2003 Michael Piefel * po/de.po: Update from Translation Project. Fri Aug 29 17:42:15 BST 2003 Giuseppe Sacco * po/it.po: Updated after the revision in tp@linux.it. Thu Aug 28 11:19:21 BST 2003 Christian Rose * po/sv.po: Update from Translation Project. Thu Aug 28 00:45:50 BST 2003 Jordi Mallach * po/ca.po: Update from Translation Project. Thu Aug 28 00:43:33 BST 2003 Christian Rose * po/sv.po: Update from Translation Project. Thu Aug 28 00:40:09 BST 2003 Colin Watson * lib/pipeline.c (pipeline_start): Change "couldn't exec %s" to "can't execute %s" in line with src/man.c, to make translators' lives easier. (pipeline_wait): Separate "%s: %s%s" into two translatable strings: the "(core dumped)" portion should definitely be translated. * src/accessdb.c (usage): Clarify "man_database" to "(The) man database". Thu Aug 28 00:18:46 BST 2003 Colin Watson * src/globbing.c (usage): Expand "sec" to "section". Wed Aug 27 00:50:07 BST 2003 Giuseppe Sacco * po/it.po: Remove all fuzzy translations and insert missed ones. Now this translation will be reviewed by the Italian translation project for proofreading. Tue Aug 26 20:16:23 BST 2003 Colin Watson * Version: 2.4.2-pre1 (for translators). * docs/NEWS: Mention pipeline library. Sat Aug 16 14:07:46 BST 2003 Colin Watson * src/lexgrog.l (find_name): Report a sensible error if file is a directory. Fri Aug 15 18:11:06 BST 2003 Colin Watson * src/check_mandirs.c (test_manfile): file is const. * src/check_mandirs.h (test_manfile): Update prototype. * src/mandb.c (update_one_file): filename is const. Fri Aug 15 18:05:37 BST 2003 Colin Watson * include/manconfig.h.in: Remove incorrect prototype of basename() which was hiding several bugs. * configure.in: Check for . * lib/pipeline.c, src/accessdb.c, src/catman.c, src/check_mandirs.c, src/filenames.c, src/lexgrog.l, src/man.c, src/mandb.c, src/manpath.c, src/straycats.c, src/whatis.c, zsoelim/zsoelim.l: Include instead of relying on basename() prototype in manconfig.h. * src/check_mandirs.c (test_manfile), src/man.c (local_man_loop), src/straycats.c (check_for_stray): Copy strings before calling basename() on them. Fri Aug 15 00:16:13 BST 2003 Colin Watson * src/ult_src.c (ult_hardlink): Return a newly allocated string rather than messily copying over an existing one (and possibly corrupting the malloc arena). link and dir are now allocated rather than being declared as arrays. (ult_src): Update call to ult_hardlink(). Return 'const char *' to make sure callers aren't messing about with our memory. * src/ult_src.h (ult_src): Update prototype. * src/check_mandirs.c (test_mandirs): ult is const. * src/lexgrog.l (main): file is const. * src/man.c (try_section): ult is const. (display_filesystem, display_database): man_file is const. Sat Aug 9 21:30:16 BST 2003 Colin Watson * po/POTFILES.in: Add lib/pipeline.c, src/descriptions.c, src/filenames.c, and src/globbing.c. * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge. Sat Aug 9 18:28:01 BST 2003 Colin Watson Replace the old "wait() for one child at a time" approach with a SIGCHLD-handling edifice that collects children's exit statuses as they die. * lib/pipeline.c (pipeline_new): Initialize statuses. (pipeline_join): Set statuses to NULL in joined pipeline. (pipeline_join, pipeline_get_infile, pipeline_get_outfile, pipeline_start, pipeline_wait): Assert that statuses field is NULL or non-NULL as appropriate. (pipeline_free): Free statuses if necessary. (pipeline_start): Add p to a new active_pipelines array, to be used while reaping children. Initialize statuses elements to -1. Block SIGCHLD while forking children. (reap_children): New function. Delivers collected exit statuses into statuses fields of entries in active_pipelines. (pipeline_wait): Rather than wait()ing manually here, check whether any statuses have been picked up by the SIGCHLD handler, and if not call reap_children(). Remove now-obsolete TODO comment. (pipeline_sigchld): New function, the SIGCHLD handler. (pipeline_install_sigchld): New function, to be called once per program. (pipeline_start, pipeline_wait): Add minimal debugging information. * lib/pipeline.h: Prototype new functions. (struct pipeline): New statuses member. Sat Aug 9 17:00:12 BST 2003 Colin Watson * lib/pipeline.c (command_dup): Copy cmd->nice. (pipeline_command): Correct condition for growing commands array. Mon Aug 4 20:44:16 BST 2003 Colin Watson * man/man1/man.man1 (HISTORY): Rearrange text to avoid having "Wilf." at the end of a line, since groff thinks that's the end of a sentence and adjusts spacing accordingly. (Alternatively, I could have used \&.) Mon Aug 4 19:35:26 BST 2003 Colin Watson * lib/pipeline.c (command_dup): Terminate argv with a NULL. (command_dup, command_arg): Assert that argc < argv_max after changing either. Mon Aug 4 19:30:22 BST 2003 Colin Watson * lib/pipeline.c (pipeline_dump): New function to dump a printable representation of a pipeline to a stream. (pipeline_tostring): Likewise, but to a newly allocated string. * lib/pipeline.h: Prototype these. Mon Aug 4 12:03:38 BST 2003 Colin Watson * lib/pipeline.c (argstr_get_word): Plug some memory leaks. Mon Aug 4 01:05:12 BST 2003 Colin Watson * lib/pipeline.c (pipeline_wait): The return value was a bit groff-specific. Now just return the status of the last command in the pipeline, as reported by wait(). Mon Aug 4 00:31:44 BST 2003 Colin Watson Add support for getting stdio streams for input and output. Needs library support because pipeline_wait() needs to know to close the stream rather than the underlying file descriptor. * lib/pipeline.h (struct pipeline): New infile and outfile members. (pipeline_get_infile, pipeline_get_outfile): Add prototypes. * lib/pipeline.c (pipeline_new): Initialize infile and outfile. (pipeline_join): Likewise. (pipeline_get_infile, pipeline_get_outfile): New functions. (pipeline_wait): Check for infile and outfile and fclose() them in preference to close()ing infd and outfd. Check for errors on close(). Sun Aug 3 23:59:18 BST 2003 Colin Watson * lib/pipeline.c (pipeline_start): Use dup2() instead of close() then dup(). Sun Aug 3 23:52:14 BST 2003 Colin Watson infd and outfd should now only be set by pipeline_start(). Positive values in want_in and want_out now indicate caller-supplied file descriptors, while negative values indicate a request for pipeline_start() to create a pipe. * lib/pipeline.h (struct pipeline): Document this. * lib/pipeline.c (pipeline_start): Implement it. Caller-supplied input and output file descriptors previously didn't work properly. (pipeline_wait): Update TODO comment. Sun Aug 3 21:07:46 BST 2003 Colin Watson * lib/pipeline.h (struct command): New 'nice' member. * lib/pipeline.c (command_new): Initialize nice. (pipeline_start): Change child process priority if nice is set. Sun Aug 3 20:50:35 BST 2003 Colin Watson * lib/pipeline.c (pipeline_start): Pop all cleanups in child. Sun Aug 3 20:47:24 BST 2003 Colin Watson * lib/pipeline.c (argstr_get_word, command_new_argstr, command_argstr, pipeline_command_argstr): New functions to handle constructing commands from shell-quoted strings, such as those found in man-db configuration files. They deliberately handle only a safe subset of shell syntax. * lib/pipeline.h: Prototype command_new_argstr(), command_argstr(), and pipeline_command_argstr(). Sun Aug 3 19:09:59 BST 2003 Colin Watson * lib/pipeline.c (command_dup): New function to duplicate a command. (pipeline_join): New function to join two pipelines together. * lib/pipeline.h: Prototype these. Sun Aug 3 18:00:59 BST 2003 Colin Watson * lib/pipeline.h (struct pipeline): The writeto, readfrom, writefd, and readfd names turn out to be confusing in calling code. Rename to want_in, want_out, infd, and outfd respectively. * lib/pipeline.c (pipeline_new, pipeline_start, pipeline_wait): Use new names. Sun Aug 3 16:35:24 BST 2003 Colin Watson Add support in pipeline library for writing input to or reading output from the whole pipeline. * lib/pipeline.c (pipeline_new): Initialize writeto, readfrom, writefd, and readfd. (pipeline_start): Create extra pipes as necessary. (pipeline_wait): Expand TODO comment. Close file descriptors from extra pipes if necessary. * lib/pipeline.h (struct pipeline): Add writeto, readfrom, writefd, and readfd. Sun Aug 3 11:15:17 BST 2003 Colin Watson * lib/pipeline.c: New pipeline library, adapted from that in groff. The interface isn't complete yet; in particular, it can't be a replacement for popen() at the moment. * lib/pipeline.h: New file with pipeline library interface. * lib/Makefile.in (ALLSRCS, ALL): Build pipeline. Sun Aug 3 11:09:07 BST 2003 Colin Watson * acinclude.m4 (MAN_FUNC_STRSIGNAL): New macro to check for the GNU extension strsignal(). * configure.in: Use it. * lib/xstrsignal.c: New file, wrapping strsignal() or sys_siglist depending on what's available (and with a saner return type than strsignal()). * lib/Makefile.in (ALLSRCS, XOBJS): Build xstrsignal. * include/manconfig.h.in (xstrsignal): Add prototype. Sun Aug 3 10:57:55 BST 2003 Colin Watson * include/comp_src.h.in: Protect against multiple inclusions. Sat Aug 2 19:32:04 BST 2003 Colin Watson * docs/NEWS: Document the recent security fixes. Sat Aug 2 12:31:24 BST 2003 Colin Watson * lib/error.c (error_print_progname): Use a proper prototype. Sat Aug 2 01:23:08 BST 2003 Colin Watson * tools/checkman: Tolerate spaces in NAME sections, since they occur in practice and confused checkman before this. Prompted by a question from James B. Hiller. Fri Aug 1 22:06:33 BST 2003 Colin Watson Fix vulnerability due to over-permissiveness of DEFINE directive. * src/manp.c (DEFINE_USER): New list flag. (get_def): Note that this must not return DEFINEs set in ~/.manpath. (get_def_user): New function, which may return DEFINEs set in ~/.manpath. (add_def): Use DEFINE or DEFINE_USER depending on context. (add_to_dirlist): Update call to add_def(). * src/manp.h (get_def_user): Add prototype. * src/man.c (main): pager and cat are safe for the user to define. (make_display_command): cat, tr, and decompressor are safe. * src/straycats.c (check_for_stray): col and decompressor are safe. * src/whatis.c (use_grep): whatis_grep_flags, apropos_regex_grep_flags, apropos_grep_flags, and grep are safe. Fri Aug 1 01:32:37 BST 2003 Colin Watson * src/man.c (main): Minor whitespace cleanups. Fri Aug 1 01:05:42 BST 2003 Colin Watson * src/manp.c (mkcatdirs): Allocate manname and catname dynamically. Wed Jul 30 22:28:13 BST 2003 Colin Watson Fix vulnerability 4 posted by Vade 79 on BugTraq, Message-ID: <20030729210308.15518.qmail@www.securityfocus.com>. This fix is just a stopgap measure for now; proper list handling will be added later. * src/manp.c (gripe_overlong_list): New function. (add_dir_to_list): Die gracefully if too many list entries are added. (add_dir_to_path_list): Likewise. Take an extra argument for the head of the list so that we can spot this efficiently. (create_pathlist): Update calls to add_dir_to_path_list(). Wed Jul 30 22:15:16 BST 2003 Colin Watson * src/manp.c (gripe_reading_mp_config): This is a fatal error, so shouldn't be conditional on quiet. Wed Jul 30 20:48:57 BST 2003 Colin Watson Fix vulnerability 1 posted by Vade 79 on BugTraq, Message-ID: <20030729210308.15518.qmail@www.securityfocus.com>. * src/manp.c (add_to_dirlist): Limit all sscanf() calls to the appropriate buffer size. Leave a TODO to say that a replacement that allocates its own memory would be welcome. Wed Jul 30 20:38:40 BST 2003 Colin Watson Fix vulnerabilities 2 and 3 posted by Vade 79 on BugTraq, Message-ID: <20030729210308.15518.qmail@www.securityfocus.com>. * src/ult_src.c (ult_softlink): Return a newly allocated string rather than copying into fullpath. (test_for_include): Return a newly allocated string rather than copying into rel (which was a pointer into part of basename in ult_src(), and wasn't reallocated in the event that the .so text was too large). (ult_src): Allocate basename dynamically rather than using a static buffer. relative is no longer needed. Update for changes in ult_softlink() and test_for_include(). Wed Jul 30 12:33:25 BST 2003 Colin Watson * src/man.c (close_cat_stream): The unlink(tmp_cat_file) cleanup is only pushed if (!debug), so apply the same condition to popping it. Wed Jul 30 12:21:20 BST 2003 Colin Watson * src/descriptions.c (parse_descriptions): Revert this part of xstrdup(NULL) change from 28 April 2003; head->whatis is undefined if the else branch was taken. Wed Jul 30 10:40:06 BST 2003 Colin Watson * src/man.c (find_in_path): Avoid leaking filename for each PATH element. Wed Jul 30 10:36:22 BST 2003 Colin Watson * src/compression.c (decompress): Don't free command until after printing the error message that includes it. Wed Jul 30 10:23:50 BST 2003 Colin Watson * src/mandb.c (main): Return non-zero with an error message if no databases were updated. Required so that man knows not to call mandb over and over again. Sat Jun 28 01:26:55 BST 2003 Colin Watson * man/it_IT.88591/man1/apropos.man1: Use %date% rather than %date_it% (which the build system no longer supports). Sat Jun 28 00:23:02 BST 2003 Colin Watson * man/man1/man.man1: Clarify section 3 as "program libraries" rather than "system libraries". Tue May 6 00:50:25 CEST 2003 Giuseppe Sacco * Updated the apropos italian man page. Mon May 5 19:47:07 BST 2003 Colin Watson * src/man.c (set_term, get_term, store_line_length): Use the fileno() of stdin and stdout respectively instead of literal 0 and 1. * src/ult_src.c (ult_src): Use STRNEQ() instead of strncmp(). Mon May 5 18:35:02 BST 2003 Colin Watson * src/encodings.c (directory_table): Add Czech -> ISO-8859-2. Thu May 1 19:12:54 BST 2003 Colin Watson * configure.in (CFLAGS): Add -Wpointer-arith and -Wstrict-prototypes for gcc. * src/man.h: Move prototype from convert_name.c to ... * src/convert_name.h: ... here (new file). * src/convert_name.c: Include "convert_name.h". Add some TODO comments. * src/man.c: Include "convert_name.h". * lib/error.c: Include "error.h". Prototype strerror() fully. * lib/tempfile.c: Include "manconfig.h" instead of prototyping strappend() and xstrdup(). Prototype path_search() fully. * lib/xmalloc.c: Remove most K&R compatibility, since it's not really supported elsewhere in man-db. * src/globbing.c: Include "globbing.h". (match_in_directory): Add static. * src/man.c (set_term, get_term): Add static. (int_handler): Move above main(), and add static. (main): Remove int_handler() prototype. (make_roff_command, format_display_and_save): Prototype old_handler fully. (open_cat_stream, display_catman): Cast to cleanup_fun rather than to an incomplete prototype. * src/manp.c (guess_manpath): Add static. * src/security.c (gripe_set_euid): Prototype fully. * src/ult_src.c (realpath): Move prototype to the non-STDC_HEADERS case. * src/lexgrog.l: Add '%option warn'. Thu May 1 17:39:55 BST 2003 Colin Watson * configure.in (CFLAGS): Add -W for gcc. * lib/hashtable.c (hash): Change array index type to size_t. * src/globbing.c (dirent_hash_free, match_in_directory): Likewise. * src/check_mandirs.c (purge_pointers): Remove unused manpath argument. * src/check_mandirs.h (purge_pointers): Update prototype. * src/mandb.c (update_one_file): Update call to purge_pointers(). * src/catman.c (catman): Remove unused arg_no argument. (do_catman): Update call to catman(). * src/man.c (make_roff_command): dir is unused except #ifdef ALT_EXT_FORMAT. * src/mandb.c (cleanup): dummy is unused. * src/ult_src.c (ult_hardlink): Change type of inode to ino_t. (ult_softlink): mantree is unused. (ult_src): Update call to ult_softlink(). * src/whatis.c (apropos): lowpage is unused except #ifdef APROPOS. * src/wrapper.c (main): argc is unused. Thu May 1 16:52:44 BST 2003 Colin Watson Remove all assumptions that string literals have type 'char *' rather than 'const char *'. * configure.in (CFLAGS): Add -Wwrite-strings for gcc. * lib/tempfile.c (xstrdup): First argument is const. (path_search): Return 'const char *'. (create_tempfile, create_tempdir): Copy return value of path_search() right away rather than after checking for NULL. * libdb/db_ver.c (dbver): Take a private copy of VER_KEY. (dbver_wr): Take private copies of VER_KEY and VER_ID. * src/accessdb.c (cat_root): Add const. * src/catman.c (parse_for_sec): Remove __inline__; add const to both arguments. Take private copies of "man" and the basic options. (main): Copy "C" for locale. Make sections etc. 'const char **', since STD_SECTIONS is an array of 'const char *'. * src/check_mandirs.c (update_db_time, reset_db_time, update_db): Take a private copy of KEY. * src/filenames.c (make_filename): Make type const. * src/filenames.h (make_filename): Update prototype. * src/globbing.c (extension, mandir_layout): Add const. * src/lexgrog.l (fname): Add const. (find_name): Make filename const. (main): Set program_name here from argv[0] rather than from a string literal. * include/manconfig.h.in (find_name): Update prototype. * src/man.c (lang_dir): Add static. Copy string literals into ld. Use xstrndup() rather than copying and then inserting '\0'. (extension, alt_system_name, section_list, preprocessors, pager, locale, std_sections, external, gxditview, html_pager): Add const. (add_roff_line_length): First argument is const. Return a copy of it if necessary. (gripe_no_man): Copy external before passing it to basename(). (main): Copy "C" for internal_locale. Reorganize locale reinitialization slightly so that locale can be const. (man_getopt): Set 'const char *' and 'char *' variables to NULL separately. (is_section, compare_candidates, man): Use a 'const char **' to iterate through section_list. (make_roff_command): Remove __inline__. Take a copy of "" for dev so that dev is always allocated memory. Handle filter in a more const-safe way (although there's still a memory leak). (get_section_list): Remove __inline__. Return 'const char **'. * src/man.h (get_section_list): Update prototype. * src/manp.c (get_from_list): Make return value and first argument const. (get_def): Make return value and both arguments const. (get_sections): Return const. (cat_manpath): Make path and catdir const. * src/manp.h (get_def, get_sections): Update prototypes. * src/manpath.c (main): Make alt_system const. * src/whatis.c (use_grep): Make flags and anchor const. (main): Make manp and alt_systems const. Copy "C" for locale. * zsoelim/zsoelim.l (main): Copy argv[0] basename for program_name, as basename()'s return value may not be long-lived. Copy "-" for so_name[0]. * src/mandb.c (main): Don't bother remembering the return value of setlocale(). * src/manpath.c (main): Likewise. Mon Apr 28 15:11:28 BST 2003 Colin Watson * src/catman.c (main): Don't guard xstrdup() from NULL input, as it checks itself. * src/check_mandirs.c (test_manfile): Likewise. * src/descriptions.c (parse_descriptions): Likewise. * src/mandb.c (main): Likewise. * src/whatis.c (main): Likewise. Mon Apr 28 09:06:28 BST 2003 Colin Watson Introduce a readdir() cache, which substantially speeds up mandb's purging functions (from 2 minutes to under 45 seconds on my laptop, and from about 280000 to about 13500 system calls). * src/globbing.c (dirent_hash_free, update_directory_cache): New functions. (match_in_directory): Use update_directory_cache() rather than reading the directory on every call. * docs/NEWS: Document this. Mon Apr 28 00:51:11 BST 2003 Colin Watson * lib/hashtable.c (hash_lookup): Return the definition rather than the hash entry structure. This turns out to be a lot more useful. * lib/hashtable.h (hash_lookup): Update prototype. * src/man.c (try_db): Simplify; in_cache is no longer needed. Just assign to the target variable directly. * src/check_mandirs.c (test_manfile): Likewise. xstrdup() already checks for NULL input, so don't bother checking here. Tue Apr 22 19:56:13 BST 2003 Colin Watson * docs/HACKING: New prototypical document for developers. Tue Apr 22 19:48:46 BST 2003 Colin Watson * src/globbing.c (parse_layout, look_for_file): Add a BSD layout in which cat pages have the extension .0 (Jeremy C. Reed). More work is needed elsewhere so that man can write such cat pages, though. * configure.in (--enable-mandirs): Add BSD layout. * manual/intro.me (Arguments to configure): Document --enable-mandirs=BSD. * README: Sync with manual/intro.me. Tue Apr 22 19:38:03 BST 2003 Colin Watson * libdb/COPYING.LIB: Remove (obsoleted in favour of docs/COPYING.LIB). * GNUmakefile.in (_docs, _libdb): Include COPYING.LIB from docs/ rather than libdb/. Tue Apr 22 19:34:30 BST 2003 Colin Watson * tools/mandb_[nt]fmt-script: Correct "# !" to "#! " on the shebang line. Tue Apr 15 18:16:30 BST 2003 Colin Watson * src/Makefile.in (LFLAGS): Provide -8 and -B as separate arguments. flex 2.5.31 is stricter about this. * zsoelim/Makefile.in (LFLAGS): Likewise. Sun Apr 13 14:36:29 BST 2003 Colin Watson * src/encodings.c (directory_table): Add Hungarian -> ISO-8859-2. Sun Apr 13 13:39:38 BST 2003 Colin Watson * src/mandb.c (xcopy): Return 0 if the source file doesn't exist, so that the caller can go on and silently create a non-existent database rather than bailing out. Sun Apr 13 12:49:33 BST 2003 Colin Watson * src/mandb.c: Remove DO_CHOWN define and simply use SECURE_MAN_UID. Thu Apr 10 23:51:43 BST 2003 Byrial Ole Jensen * po/da.po: Update from Translation Project. Mon Apr 7 09:12:27 BST 2003 Colin Watson * src/man.c (man): Call local_man_loop() straight away if name contains a slash. Make the number of pages found an output argument rather than the return value, so that we can include local_man_loop()'s return behaviour. (main): Update throughout for new man() signature. Don't call local_man_loop() if man() returns an error, as man() now sorts that out for itself. * src/man.h (man): Update prototype. Mon Apr 7 08:09:08 BST 2003 Colin Watson * include/Defines.in: Generate dependencies in .depend rather than the current directory. Suppress echoing of dependency generation commands. * libdb/Makefile.in: Remove .depend directory on distclean. Always use dependencies (except on clean), not just when --enable-debug was passed to configure. * src/Makefile.in: Likewise. Set up $(DEFS_*) variables so that the correct flags are used when generating dependencies. * libdb/.cvsignore, src/.cvsignore: Ignore .depend. * configure.in: Remove now-redundant --enable-debug option. Remove search for libefence if --enable-debug is used; using it with LD_PRELOAD is generally more convenient anyway. * README, manual/intro.me (Arguments to configure): Remove documentation for --enable-debug. * docs/NEWS: Document the removal. Mon Apr 7 01:02:27 BST 2003 Colin Watson * man/ja_JP.eucJP/man1/man.man1: Replace "%date%" with the Japanese "ima", meaning "now" or "the present time" (thanks, Liyang Hu). Mon Apr 7 00:04:30 BST 2003 Colin Watson * configure.in: Don't generate language-specific date variants for man pages, as that requires all the relevant locales to be installed on the build machine. Use the ISO 8601 date format instead. * include/Defines.in: Remove obsolete substitutions of date_it, date_es, date_de, and date_fr. * man/Makefile.in: Likewise. * man/de_DE.88591/man1/*.man1, man/de_DE.88591/man5/*.man5, man/de_DE.88591/man8/*.man8, man/es_ES.88591/man1/*.man1, man/es_ES.88591/man5/*.man5, man/es_ES.88591/man8/*.man8, man/it_IT.88591/man1/*.man1, man/it_IT.88591/man5/*.man5, man/it_IT.88591/man8/*.man8 (.TH): Replace "%date_de%", "%date_es%", and "%date_it%" substitutions by plain "%date%". * man/man1/man.man1 (HISTORY): "%date%" -> "present day". * man/it_IT.88591/man1/man.man1 (STORIA): Similarly, "%date_it%" -> "presente" (present day). Sun Apr 6 21:39:36 BST 2003 Colin Watson * src/man.c (main): Ignore LANGUAGE if a locale is explicitly specified using the -L/--locale option. Sun Apr 6 20:28:57 BST 2003 Colin Watson Revamp locale encoding support. The old code made the incorrect assumption that the source encoding of manual pages is dependent on the locale. If MULTIBYTE_GROFF is defined then man will assume that it is using a version of groff with the multibyte patch applied, which supports some additional locales. * src/man.c (lang_table, determine_lang_table): Remove. (lang_dir): Return "C" if there is no language directory element. (make_roff_command): Find out the source encoding for the requested man page and the default device for the current locale, and use these to select a device more intelligently. Insert an iconv pipe if the source encoding differs from the input *roff encoding for the current device. * src/encodings.c: New file. There are three tables replacing the old lang_table: directory_table, charset_table, and device_table. (get_source_encoding): New function, returning the assumed source encoding for the current page from directory_table. (get_default_device): New function, returning the default *roff output device based on the current locale from charset_table. (get_roff_encoding): New function, returning the input encoding expected by *roff from device_table. This is always ISO-8859-1 unless MULTIBYTE_GROFF is defined (this is still a subject of some debate, and will be UTF-8 for all devices in groff 2). * src/encodings.h: Prototype new functions. * src/Makefile.in (man): Add encodings.o. * docs/NEWS: Document the above. Sun Mar 30 23:14:47 BST 2003 Colin Watson * man/man1/man.man1 (SYNOPSIS): Both -H and -T take optional arguments. The fact that they're optional means that no space is allowed between the option and its argument (thanks to Peter Muir for that observation). (OPTIONS): Likewise. Document the 'browser' argument to -H. Correct a couple of hyphens to dashes. Fri Mar 28 09:23:19 GMT 2003 Colin Watson * src/man.c (main): Protect ruid/euid debugging statement with #ifdef SECURE_MAN_UID. (commit_tmp_cat): Likewise for temporary cat ownership code. * src/security.c (drop_effective_privs, regain_effective_privs): priv_drop_count is only declared #ifdef SECURE_MAN_UID. Move the corresponding directives so that these functions are no-ops if that symbol isn't defined. * docs/NEWS: Document this. Wed Mar 26 15:04:00 GMT 2003 Colin Watson * manual/format.me: Correct location of example external formatter script. Tue Mar 25 04:15:41 GMT 2003 Colin Watson * configure.in: Use AC_MSG_NOTICE throughout rather than MAN_ECHO. Move the definition of MAN_ECHO_VAR to just above its only uses. Tue Mar 25 03:44:06 GMT 2003 Giuseppe Sacco * po/it.po: Update. Tue Mar 25 03:41:13 GMT 2003 Colin Watson * src/whatis.c (parse_name): Free lowdbname before returning. Tue Mar 25 03:38:39 GMT 2003 Colin Watson * lib/strappend.c, lib/xstrdup.c, lib/xstrndup.c: Remove unused definitions of VOID. Sun Mar 16 00:51:12 GMT 2003 Jeremy C. Reed * configure.in (--enable-mandirs): Use 'mandirs' rather than 'mandir', as the latter clashes with an autoconf variable. Wed Mar 12 13:17:45 GMT 2003 Colin Watson * libdb/db_lookup.c (gripe_bad_multi_key): This function has been unused since 24 June 2002 (noticed by Giuseppe Sacco). Remove. * libdb/db_storage.h (gripe_bad_multi_key): Remove prototype. Tue Mar 11 21:17:56 GMT 2003 Giuseppe Sacco * po/it.po: Update. Mon Mar 10 17:20:46 GMT 2003 Colin Watson * libdb/db_btree.c, libdb/db_delete.c, libdb/db_gdbm.c, libdb/db_lookup.c, libdb/db_ndbm.c, libdb/db_storage.h, libdb/db_store.c, libdb/db_ver.c: Style cleanup (as with src/* on 28 May 2001). No functional changes. Mon Mar 10 15:55:34 GMT 2003 Colin Watson * GNUmakefile.in (EVERYTHING, ALL): Move intl ahead of libdb. (Not 'make -j'-clean, though ...) * libdb/Makefile.in: Use '$(top_srcdir)' rather than '..' throughout. Add $(top_srcdir)/intl to the include path if USE_NLS is set. Mon Mar 10 15:24:04 GMT 2003 Colin Watson * configure.in (AC_CONFIG_HEADER): Generate config.h rather than include/config.h. intl/Makefile.in is insistent on config.h being in the top-level directory. * GNUmakefile.in, manual/comp.me: Replace 'include/config.h' with 'config.h' throughout. * .cvsignore, include/.cvsignore: Update for new config.h and config.h.in locations. Mon Mar 10 15:00:32 GMT 2003 Colin Watson * lib/mkdtemp.c: Define __GT_DIR if necessary. * lib/tempfile.c: Prototype mkstemp() and mkdtemp(). Mon Mar 10 14:46:39 GMT 2003 Colin Watson * lib/tempname.c: Include "config.h" rather than . Mon Mar 3 22:00:03 GMT 2003 Colin Watson * src/mandb.c (xcopy): Remove silly calls to fclose() on null pointers. Sun Mar 2 20:37:08 GMT 2003 Colin Watson * src/mandb.c (xcopy): Save errno before performing operations that might change it. Close ifp as well if an error occurs while opening ofp. Fri Feb 28 01:50:21 GMT 2003 Colin Watson * src/man.c (find_in_path): path needs to be preserved in order to be freed safely, or else we segfault. Use a temporary variable for strsep() instead. Mon Feb 24 17:05:25 GMT 2003 Colin Watson * man/man1/man.man1 (OPTIONS): Only use the \[shc] character if it's available, which is the case on groff's latin1 and utf8 devices but not on others. Otherwise, use \(hy. Mon Feb 24 00:17:39 GMT 2003 Colin Watson * docs/manpage.example (OPTIONS): Move the note about '\-' versus '-' from a comment into displayed text. Sun Feb 23 00:34:12 GMT 2003 Alexandre Folle de Menezes * po/pt_BR.po: Update from Translation Project. Sat Feb 22 18:32:58 GMT 2003 Colin Watson * acinclude.m4 (MAN_CHECK_BDB): Remove some extra calls to AC_MSG_RESULT, since AC_CACHE_CHECK already calls that. Sat Feb 22 18:10:14 GMT 2003 Morten Brix Pedersen * po/da.po: Translate a few more strings. Sat Feb 22 18:06:09 GMT 2003 Alexandre Folle de Menezes * po/pt_BR.po: Update from Translation Project. Sat Feb 22 17:50:55 GMT 2003 Colin Watson * src/Makefile.in: Fix typo ("developement" -> "development"). * src/manp.c (add_to_dirlist): Fix typo ("mach" -> "match"). Sat Feb 22 17:41:07 GMT 2003 Colin Watson * src/manp.c (read_config_file): If user_config_file is non-NULL, use it instead of ~/.manpath. Programs can now set the user configuration file to be used. * src/catman.c, src/mandb.c, src/manpath.c, src/whatis.c (long_options): Add -C/--config-file option. (usage): Document it. (main): Handle it. * src/man.c (long_options): Add -C/--config-file option. (usage): Document it, along with adding -i and -I to the synopsis. (man_getopt): Handle it. * man/man1/apropos.man1, man/man1/man.man1, man/man1/manpath.man1, man/man1/whatis.man1, man/man8/catman.man8, man/man8/mandb.man8 (SYNOPSIS): Add -C. (OPTIONS): Describe -C/--config-file. * docs/NEWS: Document this addition. Fri Feb 21 18:32:21 GMT 2003 Colin Watson * src/Makefile.in (man): lexgrog.o is no longer needed. Removing it takes 24K off the size of a stripped man binary on Linux/i386. Fri Feb 21 18:12:45 GMT 2003 Colin Watson * src/mandb.c (xcopy): Improve error handling. (mandb): Since xcopy() now returns int, handle its return value. Fri Feb 21 16:40:26 GMT 2003 Colin Watson * src/man.c (find_in_path): New function to look for executables on the $PATH. (gripe_no_man): Only emit the "undocumented" message if a corresponding executable is found on the $PATH. * docs/NEWS: Document this. Fri Feb 21 16:26:00 GMT 2003 Colin Watson * docs/NEWS: Preliminary entries for 2.4.2. Fri Feb 21 15:49:08 GMT 2003 Colin Watson * zsoelim/zsoelim.l: Internationalize usage and error messages. Fri Feb 21 15:46:04 GMT 2003 Colin Watson * src/check_mandirs.c (gripe_bogus_manpage, make_filename, filename_info): Move to ... * src/filenames.c: ... here. * src/check_mandirs.h: Move corresponding prototypes to ... * src/filenames.h: ... here. * src/check_mandirs.c (purge_pointers): New function to purge any entries whose pointers refer to a given name. * src/check_mandirs.h (purge_pointers): Add prototype. * src/mandb.c (long_options): Add -f/--filename option. (usage): Document it, along with -t/--test. (update_one_file): New function to update a single file in an existing database. (update_db_wrapper): Call update_one_file() if using --filename. (main): Handle --filename option. If using --filename, only call mandb() if the manpath prefix matches. * man/man8/mandb.man8 (SYNOPSIS): Improve *roff style and document -p. Add separate call summary for when -f is used. (OPTIONS): Document -f. * lib/hashtable.c (hash_remove): New function to remove an entry from a hash table. * lib/hashtable.h (hash_remove): Add prototype. * libdb/db_store.c (replace_if_necessary): Replace entries with ids other than ULT_MAN too, so that their timestamps can be updated. Add more debugging output. * src/man.c (need_to_rerun): Remove. (display_database): Remove code to check whether pages found in databases are up to date. This is done elsewhere now. (run_mandb): New function, used instead of updating databases directly. (main): Call run_mandb() instead of need_to_rerun(). (maybe_update_file): New function to check whether a page found in a database is up to date. If not, use run_mandb() to recache it. (try_db): Use run_mandb() rather than create_db(). Use #defines for special return values rather than magic numbers. Check whether pages are up to date as they're found. (locate_page): If try_db() returns TRY_DATABASE_UPDATED (i.e. mandb was called to update some pages), call it again. (display_pages): Use a switch with named candidate types instead of an if. * src/Makefile.in (DEFS_man.o): Add definition for MANDB. (man): Database code is no longer needed. Add filenames.o. (mandb): Add filenames.o. Mon Feb 17 23:28:55 GMT 2003 Colin Watson * src/manpath.c: Remove unused prototypes. Tue Jan 21 01:42:16 GMT 2003 Colin Watson * src/mandb.c (xcopy, main): Minor whitespace cleanups. * src/ult_src.c: Fix typo (loosing -> losing). Mon Jan 6 03:25:16 GMT 2003 Colin Watson * src/man.c (display_pages): Drop privileges if candp->path is a user manpath. Inner code generally dropped privileges anyway, certainly when running external commands, but the absence of this drop meant that pages in non-world-readable user manpaths could not be read. Mon Jan 6 03:19:57 GMT 2003 Colin Watson * lib/error.c (error): Print a backtrace if the BACKTRACE_ON_ERROR symbol is defined. This undoubtedly isn't portable and is not intended for production use; it's just a last-resort way to get a backtrace when the usual methods fail, chiefly when running setuid. Tue Dec 31 04:39:03 GMT 2002 Colin Watson * src/man.c (man): If update is set, need_to_rerun() will always have been called already by now. Remove this redundant code. Tue Dec 31 04:26:50 GMT 2002 Colin Watson * man/man1/apropos.man1, man/man1/lexgrog.man1, man/man1/manpath.man1, man/man1/whatis.man1, man/man1/zsoelim.man1: --version no longer displays author information. Sun Dec 29 19:57:55 GMT 2002 Colin Watson * src/check_mandirs.c, src/check_mandirs.h: Move page_description interface functions to ... * src/descriptions.c, src/descriptions.h: ... here (new files). * src/Makefile.in (man, mandb): Link descriptions.o. * libdb/db_storage.h: Include libdb/mydbm.h for the datum type. Sun Dec 29 19:51:11 GMT 2002 Colin Watson * src/lexgrog.l: Add commas between short and long options in usage output. * src/accessdb.c (main): Support -h/--help and -v/--version options. (usage): Document them. Move MAN_DB outside translatable string. * man/man8/accessdb.man8 (SYNOPSIS, OPTIONS): Document new options. (AUTHOR): Add myself. * src/globbing.c (long_options, args, main): Support -h/--help and -v/--version options. (usage): New function. * zsoelim/zsoelim.l: Support long option forms of -C (--compatible), -h (--help), and -V (--verbose). * man/man1/zsoelim.man1: Document long options. * src/Makefile.in: Link $(TOOLS) as well as $(PROGS) with version.o. Sun Dec 29 19:40:46 GMT 2002 Colin Watson Patch partly by Werner Fink . * src/whatis.c (args, long_options): Add -v/--verbose option. (usage): Document it. (get_whatis): Print pointer loop warnings only if --verbose. (main): Handle --verbose option. * man/man1/apropos.man1 (OPTIONS): Document --verbose. * man/man1/whatis.man1 (OPTIONS): Likewise. Sun Dec 22 23:30:12 GMT 2002 Colin Watson * src/check_mandirs.c (test_manfile): Initialize the mandata struct on the stack to zero. (count_glob_matches): Likewise. * src/straycats.c (check_for_stray): Likewise. * src/man.c (try_section): Use infoalloc() (which initializes the mandata struct to zero) rather than malloc(). This had caused several uses of uninitialized memory (Debian bug #168584). * src/check_mandirs (purge_whatis): Compare info->pointer against "-", not just its first character. Sun Dec 22 19:29:38 GMT 2002 Colin Watson * Version: 2.4.1. * docs/NEWS, man-db.gnu, man-db.lsm: Update. Sun Dec 22 18:19:09 GMT 2002 Colin Watson * libdb/db_btree.c (btree_findkey): Cast key.dsize to int when using it as an fprintf() field width. Sun Dec 22 18:15:51 GMT 2002 Colin Watson Patch inspired by part of SuSE's diff, although not identical. * GNUmakefile.in: Export DESTDIR. * man/Makefile.in, src/Makefile.in, zsoelim/Makefile.in: Honour DESTDIR when installing and uninstalling files. Sun Dec 22 14:14:37 GMT 2002 Colin Watson * GNUmakefile.in (dist): Don't update .po files automatically, since they're kept under revision control. Sun Dec 22 13:59:23 GMT 2002 Colin Watson * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge. Sun Dec 22 13:44:20 GMT 2002 Alexandre Folle de Menezes * po/pt_BR.po: Update from Translation Project. Sat Dec 21 13:30:43 GMT 2002 Colin Watson * src/check_mandirs.c (count_glob_matches): Exclude file names which fail stat(), such as dangling symlinks. Sat Dec 21 03:01:34 GMT 2002 Colin Watson * src/check_mandirs.c (count_glob_matches): New function, sanity-checking results from look_for_file(). This should probably be done in look_for_file() itself eventually, but that requires more widespread changes. (purge_normal, purge_whatis): Use it. * src/check_mandirs.c (gripe_bogus_manpage, gripe_rwopen_failed, filename_info, purge_normal, purge_whatis): Constify arguments. * src/check_mandirs.h (filename_info): Update prototype. * docs/NEWS: Document --enable-mandirs guesswork. * src/.cvsignore: Add the globbing test executable. Fri Dec 20 15:38:48 GMT 2002 Colin Watson * src/globbing.c (main): Make the test program compile again, and add full argument parsing. * src/Makefile.in (globbing): Link with util.o. Fri Dec 20 15:34:51 GMT 2002 Colin Watson * configure.in: Guess the --enable-mandirs setting where possible if it isn't specified explicitly. Fri Dec 20 02:28:15 GMT 2002 Colin Watson * src/check_mandirs.c (purge_missing): Match database entries against real filenames using the name field where available, not the lowercased field. Fri Dec 20 02:15:21 GMT 2002 Colin Watson * src/mandb.c (mandb): If force_rescan is set, delete the database and recreate it from scratch. * src/check_mandirs.c (testmandirs): force_rescan is handled elsewhere now. (purge_normal, purge_whatis): Remove inline qualifier. (check_multi_key): New function to check for broken multi keys such as those generated by 2.4.0. (purge_missing): Call check_multi_key() where necessary. * src/lexgrog.l (find_name): Revert change of 27 November 2002, as calling ult_src() inside find_name() breaks mandb (which already calls ult_src() itself). Instead: (main): Do the ult_src() resolution here for each element of argv. * src/ult_src.c (ult_src): 'name' argument is const. * src/lexgrog.l (find_name): 'file' argument is const. * include/manconfig.h.in, src/ult_src.h: Update prototypes. Mon Dec 16 05:28:34 GMT 2002 Colin Watson From SuSE's diff: * lib/error.c: Add 'extern' to prototypes. * lib/strappend.c, lib/xstrdup.c, lib/xstrndup.c: #include "manconfig.h" rather than using an explicit prototype. * lib/xstrdup.c (xstrdup): 'string' should be const. * po/cs.po: Fix a format string. * src/lexgrog.l: Add Japanese translation of NAME. * src/man.c: 'wd', 'cwd', and local_man_loop() are static. Mon Dec 16 04:30:39 GMT 2002 Colin Watson * configure.in: 'test "$foo"' => 'test -n "$foo"' throughout. Taken from SuSE's diff. Wed Dec 4 21:02:48 GMT 2002 Colin Watson * man/man1/lexgrog.man1: Replace `, ', and - (for literal dash rather than hyphen) with \(oq, \(cq, and \- respectively. (NOTES): lexgrog attempts to handle .so requests now. Tue Dec 3 01:39:54 GMT 2002 Colin Watson * src/man.c (main): Only set multiple_locale if it's going to be used. Look at multiple_locale rather than internal_locale when performing special $LANGUAGE handling. Mon Dec 2 14:08:08 GMT 2002 Michael Piefel * po/de.po: Fix a missing newline. Mon Dec 2 13:58:55 GMT 2002 Michael Piefel * po/de.po: Update from Translation Project. Fri Nov 29 15:40:21 GMT 2002 Jordi Mallach * po/ca.po: Update from Translation Project. Wed Nov 27 20:27:59 GMT 2002 Christian Rose * po/sv.po: Update from Translation Project. Wed Nov 27 02:43:03 GMT 2002 Colin Watson * Version: 2.4.1-pre1 (for translators). * docs/NEWS: Update. Wed Nov 27 02:29:42 GMT 2002 Colin Watson * src/lexgrog.l (find_name): Call ult_src() to resolve .so links. * src/Makefile.in: Link ult_src.o into lexgrog. Wed Nov 27 01:49:18 GMT 2002 Colin Watson * release.sh: Don't pass --copy to autogen.sh, as it's a no-op now. * po/.cvsignore, tools/.cvsignore: More ignored files. Wed Nov 27 01:46:27 GMT 2002 Colin Watson * tools/mkinstalldirs: Remove. It's more trouble than it's worth to store something in CVS that autopoint thinks it controls. Wed Nov 27 01:25:52 GMT 2002 Colin Watson * po/da.po: Correct some minor typographical mistakes (mostly missing spaces or newlines at the end of one piece of a string concatenation). * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/pt_BR.po, po/sv.po: Update with msgmerge. Wed Nov 27 00:51:47 GMT 2002 Colin Watson * man/man1/apropos.man1, man/man1/lexgrog.man1, man/man1/man.man1, man/man1/manpath.man1, man/man1/whatis.man1, man/man1/zsoelim.man1, man/man5/manpath.man5, man/man8/accessdb.man8, man/man8/catman.man8, man/man8/mandb.man8: Add a .pc request so that the % characters we use for substitutions don't get translated into page numbers when formatting the unsubstituted pages. Wed Nov 27 00:37:29 GMT 2002 Colin Watson * man/man1/lexgrog.man1 (WHATIS PARSING): Add an example of how NAME sections should be written in mdoc. Tue Nov 26 22:57:27 GMT 2002 Colin Watson * .cvsignore: Ignore the m4 directory, created by autopoint. * GNUmakefile.in (_subdirs, _m4): Add m4/*.m4 to the distribution. (_root): There are no *.h files left in the top-level directory. (nls_man): de_DE.ascii is gone. (dist): Use 'cp -p' rather than 'ln', since ln notes that making a hard link to a symbolic link is not portable. Tue Nov 26 03:43:15 GMT 2002 Colin Watson * po/pt_BR.po: New from Translation Project. * po/LINGUAS: Add pt_BR. Fri Nov 22 22:06:01 GMT 2002 Morten Brix Pedersen * po/da.po: Further updates. Sat Nov 16 12:54:29 GMT 2002 Colin Watson * docs/manpage.example: Clarify that dashes in options should be written using '\-', not '-'. Thu Nov 14 23:29:14 GMT 2002 Morten Brix Pedersen * po/da.po: Update. Thu Nov 14 23:26:58 GMT 2002 Colin Watson * configure.in: Implement --enable-undoc=COMMAND. * src/man.c (gripe_no_man): If --enable-undoc=COMMAND was set, print an additional message referring users to COMMAND. This is mostly here to support Debian's undocumented(7) page in a nicer way, but perhaps others will find it useful too. Thu Nov 14 04:21:09 GMT 2002 Colin Watson * src/Makefile.in: Use @LIBINTL@ rather than @INTLLIBS@. The latter is deprecated. Thu Nov 14 04:17:49 GMT 2002 Colin Watson * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po, po/sv.po: Update with msgmerge. Thu Nov 14 04:10:44 GMT 2002 Colin Watson * acinclude.m4, configure.in: Include documentation in all calls to AC_DEFINE and AC_DEFINE_UNQUOTED. Look for acinclude.m4 in AC_CONFIG_SRCDIR rather than acconfig.h. * acconfig.h: Remove; the above makes it unnecessary. * GNUmakefile.in: Remove acconfig.h from stamp-h.in's dependencies. * autogen.sh: Run autopoint, not gettextize. autogen.sh no longer takes an optional --copy argument. Thu Nov 14 04:06:41 GMT 2002 Colin Watson * po/.cvsignore: Add messages.mo and remove-potcdate.sed. * po/it.po: Add missing '=' in charset. Thu Nov 14 03:53:22 GMT 2002 Colin Watson * po/cs.po: Fix an incorrect C format string. * po/da.po: Fix some out-of-sync C format strings and default PO file headers. I've contacted the translator about these. Thu Nov 14 01:57:42 GMT 2002 Colin Watson * man-db.gnu, man-db.lsm: Document the switch from SourceForge to Savannah. Mon Nov 11 01:50:28 GMT 2002 Colin Watson * src/man.c (man): Update the count of found pages with the return value of display_pages(). This should fix the situation where man finds a matching entry in the database, discovers that it's actually a dangling symlink, but fails to print an error message to say that no page was found. Mon Nov 11 00:47:38 GMT 2002 Colin Watson * man/man1/man.man1 (OPTIONS): Change \[char173] to \[shc]. The former doesn't appear to display as anything useful these days. * man/es_ES.88591/man1/man.man1, man/it_IT.88591/man1/man.man1, man/ja_JP.eucJP/man1/man.man1: Likewise. Thu Nov 7 02:18:44 GMT 2002 Colin Watson * src/man.c (display): Don't do access() checks on an empty man_file in the display_to_stdout branch, to avoid problems when running 'man -X -l -'. Similar code is already in the other branch. Patch from Peter Muir . Thu Nov 7 01:42:52 GMT 2002 Colin Watson * docs/NEWS: Further updates for 2.4.1. * docs/ToDo: I think the new-style database is OK now. Thu Nov 7 01:32:29 GMT 2002 Colin Watson * src/globbing.c (match_in_directory): Don't use FNM_NOESCAPE flag to fnmatch(). (look_for_file): Escape paths and names before passing them to match_in_directory(). * src/globbing.h: Update variable names in prototype. Wed Oct 23 02:12:43 BST 2002 Colin Watson * tools/README: Remove reference to install-manpage. Wed Oct 23 02:10:15 BST 2002 Colin Watson * tools/install-manpage: Remove. It doesn't work at all as far as I can see, and at least as far as Debian is concerned dh_installman does a better job. * GNUmakefile.in: Remove reference to install-manpage. Wed Oct 23 02:03:18 BST 2002 Colin Watson Apply proper copyright and licence notices to all source files. There are no functional changes here, either to the code or to the applicable licences, merely clarifications. * docs/COPYING.LIB: New file, containing version 2.1 of the GNU LGPL. Wed Oct 23 01:56:38 BST 2002 Colin Watson * tools/install-sh: Update to the version in automake 1.4-p4, which includes a full (MIT) licence notice. Sat Oct 12 20:16:48 BST 2002 Colin Watson A much-needed complete rewrite of splitline(). The previous version was extremely difficult to debug (see http://bugs.debian.org/123130) and got info->pointer and info->whatis wrong quite frequently. This version is much simpler and I hope more correct. * src/util.c (trim_spaces): New function. * include/manconfig.h.in: Prototype trim_spaces(). * src/check_mandirs.c (gripe_bad_store): New function. (splitline): Remove. (parse_descriptions, store_descriptions, free_descriptions): New functions, implementing the whatis parsing that used to be in splitline() and test_manfile(). (test_manfile): Reduce the complicated loop over splitline() to calls to the above three functions. Adjust the parsing failure case to require less deeply nested indentation. * src/check_mandirs.h: New page_description struct, used to implement the above. Prototype new functions. * src/straycats.c: Use the new page_description-based interface. Wed Sep 25 00:39:16 BST 2002 Colin Watson * man/man1/man.man1 (DESCRIPTION): Clarify the purpose of section 7 as "Miscellaneous". Tue Sep 24 00:22:36 BST 2002 Colin Watson * lib/strnlen.c: Don't try to define a weak alias. We aren't libc. Mon Sep 16 21:14:26 BST 2002 Colin Watson * libdb/mydbm.h: datum.dsize must be size_t, not int. Mon Sep 16 01:07:16 BST 2002 Colin Watson * src/compression.c (decompress): If the decompressor fails, print an error message and return NULL rather than exit()ing immediately. This allows callers to behave more intelligently. * src/lexgrog.l (find_name): Cope with decompress() returning NULL. * src/man.c (local_man_loop): Likewise. * src/ult_src.c (ult_src): Likewise. Mon Sep 16 00:25:17 BST 2002 Clint Adams * configure.in: Detect bzip2. * include/comp_src.h.in (comp_list): Include bunzip2 support if available. * include/manconfig.h.in: Add BUNZIP2 definition. Sun Sep 15 23:53:28 BST 2002 Colin Watson Upgrade to gettext 0.11.5. * configure.in: Remove ALL_LINGUAS. Add AM_GNU_GETTEXT_VERSION. * po/LINGUAS: New file. Adds sv to the value of the old ALL_LINGUAS. * po/Makevars: New file. * po/POTFILES.in: Add src/fakesecurity.c. Change src/lexgrog.c to src/lexgrog.l. * tools/mkinstalldirs: Upgrade to current version. Fri Sep 6 23:58:10 BST 2002 Colin Watson * src/mandb.c (xcopy): Don't print the error from fopen() if it's just ENOENT. Tue Sep 3 21:53:56 BST 2002 Colin Watson * libdb/db_lookup.c (list_extensions): Prevent a theoretical buffer overflow by allocating names and ext as necessary rather than using a fixed-length array. (dblookup): Update callers. * libdb/db_delete.c (dbdelete): Likewise. * libdb/db_storage.h: Update prototypes. ENTRIES definition is now redundant. Tue Sep 3 20:26:22 BST 2002 Colin Watson * libdb/db_delete.c (dbdelete): Construct new multi_content correctly (names as well as extensions) when deleting some of its elements. Fri Aug 30 03:11:42 BST 2002 Colin Watson * src/man.c (make_roff_command): Restore the fix from 13 July 2001 that got lost while implementing -E. We need to look up the correct character set each time a page is displayed, but still honour any device explicitly set by -E, so test different_encoding rather than roff_device. Thu Aug 29 01:14:19 BST 2002 Colin Watson * src/man.c (setenv_less): Export the value of $MAN_PN for the benefit of other pagers (suggestion from Jeff Sheinberg). Thu Aug 29 00:50:54 BST 2002 Colin Watson * src/man.c: dbfilters is no longer a global variable. (get_preprocessors, make_roff_command, display): Take an extra dbfilters argument. (local_man_loop, make_roff_command, display, display_filesystem): Adjust callers. (display_database): Likewise. Pass in->filter as the dbfilters argument to display() rather than setting it globally (and forgetting to set it back to NULL later). * src/man.h: Update prototypes. Sat Aug 17 21:53:38 BST 2002 Colin Watson * src/straycats.c (check_for_stray): Initialize info.name and info.filter. Remove unhelpful __inline__. Tue Aug 13 18:25:13 BST 2002 Colin Watson * src/man.c (usage): Document new option -W, --where-cat, --location-cat. (man_getopt): Accept -W. (display): -w now just prints man_file, while -W prints cat_file. If both are given, the two filenames are printed separated by a space, as -w used to do. * man/man1/man.man1, docs/NEWS: Document this. Sat Aug 10 13:19:34 BST 2002 Colin Watson * docs/NEWS: Preliminary entries for 2.4.1. Sat Aug 10 13:15:49 BST 2002 Colin Watson * lib/hashtable.c (plain_hash_free, hash_install, hash_free): Remove the type argument and nlist element. All current users can just use separate hashtables instead. * lib/hashtable.h: Update prototypes and nlist declaration. * libdb/db_btree.c: Don't pass dummy type argument to hash_install(). * src/check_mandirs.c, src/man.c: Include "lib/hashtable.h" rather than "hashtable.h". * src/check_mandirs.c (test_manfile): Use hashtable functions on the new static whatis_hash directly rather than the old functions which implicitly operated on the global man_hash. (testmandirs): Since we use full paths as hash keys, there's no need to clear whatis_hash between hierarchies. * src/man.c (db_hash_free): New function. (main, try_db): Use hashtable functions on the new static db_hash directly rather than the old functions which implicitly operated on the global man_hash. (try_db, man): Don't clear hashtables before creating a new database. This used to segfault in some circumstances. * src/hashtable.c, src/hashtable.h: Remove. * src/Makefile.in: Remove mentions of hashtable.o. Thu Aug 8 02:05:34 BST 2002 Colin Watson * po/sv.po: New from Translation Project. Mon Jul 22 01:20:28 BST 2002 Colin Watson * src/check_mandirs.c (splitline): Check for pointer underflow when trimming leading spaces. Mon Jul 22 01:18:18 BST 2002 Colin Watson * libdb/db_ver.c: Include for strcmp(). Wed Jul 17 20:30:30 BST 2002 Colin Watson * src/wrapper.c: Include even under --disable-nls. Mon Jul 15 14:18:56 BST 2002 Colin Watson * src/lexgrog.l: Allow EOF to terminate MAN_NAME cleanly. Thu Jul 11 20:45:36 BST 2002 Colin Watson * manual/man_db.me: Version 0.7. Remove version number from \*M string. Set a default page width of 78 ens for nroff output. Add myself as an author. * manual/intro.me (man-db): Mention lexgrog. (The format of manual pages): Ted and Werner now maintain groff. * manual/sec.me (Specifying a section): Extensions don't have to be listed unless a special ordering is desired. * manual/files.me (Other OS's manual pages): --systems, not --system. (NLS manual pages): Likewise. Update Daniel Quinlan's e-mail address. Correct "/usr/man/man" to "/usr/man" in example manpath output. (Displaying latin1 characters on a Linux virtual terminal): Set sample script in a constant-width font. (Local cat page directory caches): Modification times are now compared for equality rather than for the cat file being more recent. * manual/format.me (GROFF): tools/nroff-script is no longer provided. (Pre-format processors (pre-processors)): Mention the lexgrog scan for preprocessor hints. * manual/db.me (Contents of an index database): Clarify where the true case of a name is stored. (Accessdb): accessdb is compiled by default now. * manual/misc.me (NLS message catalogues): Point to the Translation Project. * manual/*.me: Minor wording improvements. Apply better *roff style (newline at each sentence break). * man/THANKS: Update Jordi Mallach's e-mail address. Sun Jul 7 22:19:41 BST 2002 Colin Watson * tools/config.guess: Update to 2002-05-29. * tools/config.sub: Update to 2002-06-21. * tools/README: Describe config.guess and config.sub. * tools/nroff-script: Remove. groff has had this since 1992, and its version is considerably more up-to-date. * GNUmakefile.in, tools/README: Remove references to nroff-script. * zsoelim/zsoelim.l: -Wall cleanup. Set the nounput option, since we don't need yyunput(). (open_file): Make sure the compiler knows that compfile and comp are always initialized. Sat Jul 6 21:30:07 BST 2002 Colin Watson * src/man.c (get_roff_line_length): Widen to match groff 1.18's defaults. (add_roff_line_length, make_roff_command): Simplify by using en units rather than inches. * src/man.c (main): Slight improvement in the error message for a missing page. If the name doesn't begin with a digit, never use gripe_no_name(): having the 'n' section shouldn't mean that 'man nonexistent' says "What manual page do you want from section nonexistent?". * src/man.c (try_section): Check for ult_src() returning NULL. Wed Jul 3 23:46:31 BST 2002 Colin Watson * src/manp.c (add_system_manpath): Make sure the loop that scans for per-system manpaths always makes progress. Wed Jul 3 23:14:42 BST 2002 David Martinez Moreno * man/THANKS: Update e-mail address. * po/es.po: Update. Sat Jun 29 14:58:08 BST 2002 Colin Watson * src/man.c (main): If a section is given but the lookup fails, check to see if the section is actually a page name. This allows man page names that begin with a digit to work much more sanely. (is_section): If a single-character entry in section_list is a prefix of the requested section name, return successfully. This means that e.g. '3tcl' is treated as a valid section even if only '3' is in section_list. * src/man.c (is_section), src/man.h (is_section): Constify argument and return type. * src/globbing.c (match_in_directory, look_for_file): Reduce debugging chatter. Wed Jun 26 20:07:56 BST 2002 Colin Watson * src/whatis.c (get_whatis): "(unknown)" => "(unknown subject)", mainly so that translators know the number and gender. Wed Jun 26 19:49:49 BST 2002 Colin Watson * src/catman.c (usage), src/man.c (usage), src/mandb.c (usage), src/manpath.c (usage): Make --help output more consistent. * src/whatis.c (usage): Likewise. "alternate systems" => "alternate systems'". Wed Jun 26 14:47:01 UTC 2002 Colin Watson * Version: 2.4.0. * README: Update or remove references to "man-db-2.3" and similar. * man-db.gnu: Update and sync with GNU. * man-db.lsm: Update. * manual/man_db.me: Replace "2.3.x" with "2.4.x". * po/ca.po, po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update with msgmerge. Wed Jun 26 14:09:25 BST 2002 Colin Watson * src/lexgrog.l (name_sec): Allow whitespace before any closing double quote. (rman(1) uses '.SH "NAME "'.) Tue Jun 25 00:29:22 BST 2002 Colin Watson * docs/NEWS: Translation credits are in man/THANKS. * man/THANKS: Update. * manual/.cvsignore: New file. Mon Jun 24 02:53:00 BST 2002 Colin Watson * libdb/db_store.c (dbstore): Use \t instead of . to separate case-variant-names and extensions in multi keys. * libdb/db_lookup.c (list_extensions): Take an extra 'names' array argument, and split alternately into that and 'ext'. (dblookup): Update and simplify accordingly; we don't need the awkward '.' handling any more. * libdb/db_delete.c (dbdelete): Likewise. * libdb/db_storage.h (list_extensions): Update prototype. * include/manconfig.h.in: Database format version 2.4.1. * manual/db.me (Contents of an index database): Document case-insensitive name storage format. Bring the documentation of the database entry format up to date. * manual/sec.me (Specifying a section): Mention the SECTION configuration directive. Fri Jun 21 10:50:40 UTC 2002 Colin Watson * src/check_mandirs.c (make_filename): in->comp may be NULL. * po/fr.po: Update from Translation Project. Mon Jun 17 09:56:15 UTC 2002 Colin Watson * configure.in (ALL_LINGUAS): Add ca. * src/man.c: Update some comments. * src/lexgrog.l: Treat \~ as a space. Treat \# as a comment. Treat .ig as ending the whatis. Thu Jun 13 18:16:46 BST 2002 Colin Watson * po/ca.po: Some updates after review. Wed Jun 12 18:29:18 BST 2002 Colin Watson * docs/ToDo: Updates. * po/ca.po: New from Translation Project. Wed Jun 5 14:23:13 BST 2002 Colin Watson * po/de.po: Update from Translation Project. Tue Jun 4 13:15:09 BST 2002 Colin Watson * src/man.c (compare_candidates): Return 0 when asked to compare two candidates we can't distinguish, not -1. The latter broke multilingual support. Tue Jun 4 01:33:31 BST 2002 Colin Watson * Version: 2.3.90 (for translators). * docs/NEWS: More updates. * po/cs.po, po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update with msgmerge. Tue May 28 00:36:55 BST 2002 Colin Watson * libdb/db_lookup.c (dblookup): Check the MATCH_CASE flag in the case of a single entry as well as multiple entries. Mon May 27 23:57:26 BST 2002 Colin Watson * lib/hashtable.c, lib/hashtable.h: New files, containing the generic parts of src/hashtable.{c,h}. * lib/Makefile.in: Add hashtable.c. * src/hashtable.c (hash, lookup, install): Remove. These functions have been renamed and moved to lib/hashtable.c. (free_defn): Rename to man_hash_free and update for new hashtable API. (free_hashtab): Update for new hashtable API. * src/hashtable.h: Update prototypes. * libdb/db_btree.c (btree_findkey): Check for entries we've seen before in the current run. These indicate a corrupt database containing a loop. Thu May 23 01:50:53 BST 2002 Colin Watson * lib/cleanup.h: #endif must not be followed by a token on the same line. Thu May 23 00:29:24 BST 2002 Colin Watson * src/fake_security.c (get_man_owner): New fake function to match the real one in src/security.c. * src/manp.c (mkcatdirs): Chown newly created cat directories to the MAN_OWNER when running as root. * .cvsignore, intl/.cvsignore, po/.cvsignore: Ignore a few more files. * src/man_db.conf.in: Correct the heading. Wed May 22 00:06:18 BST 2002 Colin Watson * libdb/db_store.c (compare_ids): New function, replacing the FAVOUR() macro. Without this, the last-but-one commit won't compile ... (replace_if_necessary): Use it. * libdb/db_storage.h: Prototype it. Mon May 20 03:07:24 BST 2002 Colin Watson * src/man.c (setenv_less): New function to set up $LESS. This honours the new environment variable $MANLESS, which overrides the usual processing and is copied directly into $LESS. (make_display_command): Use it. * man/man1/man.man1 (OPTIONS): Mention $MANLESS alongside the --prompt option. (ENVIRONMENT): Document $MANLESS. Mon May 20 02:16:43 BST 2002 Colin Watson * src/man.c (compare_candidates): Compare id fields as a last resort, so that, for example, real pages sort ahead of whatis-only names. (try_section): Set the id field based on the output of ult_src(). * src/man.c (man): When locating pages, don't stop when one is found in a particular directory and -a wasn't given. That's now the job of the display code. Mon May 20 01:16:02 BST 2002 Colin Watson * libdb/db_lookup.c (free_mandata_elements): New function, to be used rather than freeing the addr field directly. This frees name as well. (free_mandata_struct): Use it. * libdb/db_btree.c (dbstore, dblookup): Likewise. * libdb/db_store.c (dbstore): Likewise. * src/whatis.c (whatis): Likewise. * libdb/db_storage.h: Prototype it. * libdb/db_store.c (replace_if_necessary): Rename in and info to newdata and olddata, which are more comprehensible. Don't check that the name fields match here - the caller should do that. (dbstore): Make sure in->name isn't set on entry, and instead set it to the basename where necessary. Don't set the name field in multi keys, which use the proper case. * src/check_mandirs.c (filename_info): We don't need to examine the case of base_name here. Thu May 16 00:47:05 BST 2002 Colin Watson * libdb/db_btree.c (btree_flopen): If O_CREAT isn't set, check whether we're trying to open a zero-length database and, if so, return immediately. This works around some pathological behaviour in Berkeley DB. Mon May 6 03:48:17 BST 2002 Colin Watson * libdb/db_store.c (FAVOUR): Parenthesize macro arguments. (dbstore): In situation (3), use the old lookup key for the name of the corresponding multi key, not the basename (which may be in the wrong case). Sun May 5 17:49:21 BST 2002 Colin Watson * src/lexgrog.l: Accept DOS line-ending conventions. Sun May 5 15:38:34 BST 2002 Colin Watson * libdb/db_delete.c (dbdelete): Don't scribble over the list returned by list_extensions(). We need it shortly afterwards to construct the new multi key. Fri May 3 19:43:52 BST 2002 Colin Watson * include/manconfig.h.in (LESS_OPTS): Add the -R flag, which helps with displaying the ANSI colour escapes generated by groff 1.18. Fri May 3 19:27:40 BST 2002 Colin Watson * src/man.c (add_roff_line_length): New function, adding -rLL and -rLT to the groff command line (supported in groff >= 1.18). (make_roff_command): Call add_roff_line_length(). The old code to set .ll and .lt remains for compatibility purposes. Wed May 1 02:16:11 BST 2002 Colin Watson * src/check_mandirs.c (testmandirs): Include the subdirectory name in the "Updating index cache" message. Wed May 1 02:05:02 BST 2002 Colin Watson * libdb/db_store.c: Make sure the check for whether a replace is necessary in situation (3) behaves as it did before the multi key format changes. * libdb/db_lookup.c (copy_if_set, dash_if_unset): Constify arguments. * libdb/db_storage.h: Likewise for prototypes. * src/convert_name.c (gripe_converting_name): name should be const. * src/manp.c (get_catpath): suffix should be const. Wed May 1 00:14:20 BST 2002 Colin Watson * src/globbing.c (match_in_directory): Close the directory after reading through it. Wed May 1 00:02:53 BST 2002 Colin Watson Case-(in)sensitivity in database lookups should work properly now. * libdb/db_lookup.c (gripe_bad_multi_key): New function. (make_multi_key): Don't lowercase page any more - that happens elsewhere. (list_extensions): We now return names/extensions, not just extensions. (dblookup): Multi keys are now formed as "RealCase.1" rather than just "1". Add a new MATCH_CASE flag which, if set, makes sure the RealCase part matches. Otherwise the database lookup is case-insensitive. (dblookup_exact, dblookup_all): Pass through a match_case flag for the above. * libdb/db_delete.c (dbdelete): Cope with new multi key format. * libdb/db_store.c (dbstore): Construct the multi key from the original case of the name rather than the lowercased version. Add the basename to the multi keys created here, as above. * src/man.c (display_database): Pass match_case flag through to the database lookup. (try_db): Likewise. * src/check_mandirs.c (test_manfile): Make sure lookups are case-sensitive. * src/straycats.c (check_for_stray): Likewise. * src/whatis.c (get_whatis): Likewise. (whatis): Use a case-insensitive lookup. * libdb/db_storage.h (struct mandata): name is no longer const; it should always be freeable if non-NULL. We no longer use "-" to indicate it being the same as the requested name, except in the database itself. * libdb/db_lookup.c (copy_if_set, dash_if_unset): New functions. (infoalloc): Zero the newly allocated structure. (free_mandata_struct): Free name if it's set. (dbprintf, split_content, make_content, dblookup): Cope with the new convention for info->name. * libdb/db_store.c (replace_if_necessary): Likewise. * src/check_mandirs.c (filename_info): Likewise. * src/man.c (compare_candidates, add_candidate, display_database): Likewise. * src/whatis.c (display): Likewise. * libdb/db_storage.h: Update prototypes. Mon Apr 29 00:13:58 BST 2002 Colin Watson * src/whatis.c (display): Display page names in the correct case using the new info->name field. Mon Apr 29 00:00:38 BST 2002 Colin Watson * src/whatis.c (use_grep): Put a space in the grep command before the flags! Sun Apr 28 23:50:22 BST 2002 Colin Watson Pass through much of the code adding 'const' where appropriate. This should help me avoid various memory management bugs. Noteworthy changes from this: * include/manconfig.h.in (struct compression): prog and ext generally shouldn't be modified directly. * libdb/db_lookup.c (make_content): dash really has to stay constant, or the various things that point to it statically will break other things badly. * libdb/db_storage.h (struct mandata): The only pointers here that should generally be modified directly are next and addr. * libdb/db_store.c (dbstore): Remove debugging code left from previous checkin. * src/check_mandirs.c (splitline): Note that we're deliberately modifying info->whatis here. (filename_info): Modify to be more const-friendly. * src/compression.c (comp_file): Add TODO for comp->file. * src/man.c (find_cat_file): Drop unused sec argument, and update callers. * include/manconfig.h.in, libdb/db_storage.h, src/hashtable.h, src/man.h, src/manp.h: Update prototypes for all of the above. Fri Apr 26 01:59:46 BST 2002 Colin Watson Add case-insensitivity support to the database. * libdb/db_storage.h (struct mandata): Add 'name' element. * libdb/db_lookup.c (dbprintf): Print name. (split_content): Read name from start of data. (make_content): Prepend name to each data element. (name_to_key): New function, converting a name to lowercase for use in database keys. (make_multi_key): Use name_to_key(). (dblookup): Use name_to_key(). If info->name is "-", set it to the requested key instead. * libdb/db_delete.c (dbdelete): Use name_to_key(). * libdb/db_store.c (dbstore): Likewise. * src/check_mandirs.c (make_filename): Use in->name if name is NULL. (filename_info): Fill in info->name with either a new req_name argument or the supplied base_name. (test_manfile): Update calls to make_filename() and filename_info(). * src/check_mandirs.h: Update prototype. * src/man.c (struct candidate): Rename 'name' to 'req_name'. (display_filesystem, display_database_check): Update accordingly. (compare_candidates): Sort exact-case matches to the front. (add_candidate): Update calls to compare_candidate() and filename_info(). When comparing duplicates, check the name field in the mandata rather than the requested name. (try_section): The hack to get the name from info_buffer is no longer required now that filename_info() fills that in. (display_filesystem): Update calls to make_filename(). Use the mandata name for the displayed title rather than the requested name. Sanity-check in->name != "-". * include/manconfig.h.in: Bump the database version to 2.4.0. * lib/xstrndup.c: Prototype strnlen(). Mon Apr 22 00:00:08 BST 2002 Colin Watson * src/globbing.c (match_in_directory): New function, implementing a limited glob() with optional case-insensitivity. (look_for_file): Use match_in_directory() rather than glob(). Accept new match_case argument. * src/globbing.h: Update prototype. * src/check_mandirs.c (purge_whatis, purge_missing): Update calls to look_for_file(). * src/man.c (usage, man_getopt): Add --ignore-case and --match-case arguments. (try_section): Update calls to look_for_file(). (try_section, display_filesystem, display_database, display_database_check, display_pages, man): Make sure to use the candidate name rather than the requested name, so that case-insensitive lookups work. * man/man1/man.man1 (OPTIONS): Document --ignore-case and --match-case. * po/.cvsignore: Ignore man-db.pot rather than man_db.pot. Thu Apr 18 11:15:11 BST 2002 Matej Vela * docs/manpage.example: Use .BR for links to other man pages. Wed Apr 3 19:54:03 BST 2002 Colin Watson * Rename package from man_db to man-db. * docs/NEWS: Start updating for 2.4.0. Wed Apr 3 18:44:04 BST 2002 Colin Watson * GNUmakefile.in (distclean): Remove autom4te.cache. Wed Apr 3 18:40:19 BST 2002 Colin Watson * .cvsignore: Add autom4te.cache. * configure.in: Use AC_LIBOBJ rather than setting LIBOBJS directly. (--enable-setuid): Use quadrigraphs to get [ and ]. (--with-config-file): New option. * include/Defines.in (config_file): Honour --with-config-file setting. Fri Mar 29 21:08:37 GMT 2002 dann frazier * docs/manpage.example.sgml: Update copyright year. Thu Mar 21 16:22:58 GMT 2002 Colin Watson * src/man.c (main): Save the value of $LESS at startup to $MAN_ORIG_LESS, and use that saved value in preference to $LESS. This lets recursive invocations of man give less the correct page titles. Wed Mar 20 09:37:11 GMT 2002 Eirik Fuller * src/check_mandirs.c (splitline): Don't create a copy of base_name as pointer_name. (test_manfile): Be more careful about pointer reuse across calls to splitline(). Mon Feb 11 13:01:07 GMT 2002 Michael Piefel * po/de.po: Corrections and updates; convert to UTF-8. * man/THANKS: Add credit (the contributor of the previous de.po is unidentified). Sun Jan 27 03:31:11 GMT 2002 Colin Watson * configure.in (ALL_LINGUAS): Add da. Reorder alphabetically. Sat Jan 12 17:55:12 GMT 2002 Colin Watson * src/lexgrog.l: Match a line at a time rather than a character at a time after the end of the NAME section. * src/check_mandirs.c (testmandirs): More --debug information. * include/manconfig.h.in (LESS_OPTS): Prune duplicate -Pm option. Set -PM too so it works even when $LESS contains -M. * src/man.c (make_display_command): Substitute prompt_string into LESS_OPTS twice to accommodate the above. Mon Jan 7 16:16:02 GMT 2002 Colin Watson * src/lexgrog.l: Another {blank_eol} fix, thanks to Peter Clay. Sun Jan 6 19:05:46 GMT 2002 Colin Watson * src/lexgrog.l: Use {blank_eol}, not [blank_eol]. The latter matches in entirely inappropriate places. Sun Dec 23 06:17:47 GMT 2001 Colin Watson * src/man.c (long_options, usage, man_getopt): Add a new -E/--encoding option. It behaves a little like -T, except that it uses nroff instead of troff and outputs to a pager. (make_roff_command): Only call determine_lang_table() if roff_device isn't already set. (display, try_section, display_filesystem, display_database): Check for different_encoding. * man/man1/man.man1 (DEFAULTS, OPTIONS): Document -E. Sun Dec 23 05:23:05 GMT 2001 Colin Watson * src/man.c (compare_candidates): Compare sections according to section_list before comparing them lexicographically. (add_candidate): Do a better job of inserting each entry at the right place in the list. Sun Dec 23 04:47:02 GMT 2001 Colin Watson * src/man.c (determine_lang_table): Format man pages in UTF-8 if that's the current locale's character set. Sun Dec 23 02:35:24 GMT 2001 Colin Watson * src/man.c (popen, pclose): Move to a separate library file ... * lib/popen.c: ... here. * acinclude.m4 (MAN_FUNC_PCLOSE): Use AC_LIBOBJ to conditionally compile this. * acconfig.h: Remove BROKEN_PCLOSE definition. Major rewrite of man's searching code to make it maintainable and to prepare for better sorting of displayed man pages. * src/man.c (add_candidate): New function to add an item to a list of candidate pages. (compare_candidates): New helper function. (compare_names, compare_mandata_ext): Remove. (try_section): Use add_candidate() rather than displaying the page immediately. (try_db): Likewise. (display_filesystem): New function to display pages found by try_section(). (try_db_section): Rename to display_database(), and use the candidate structures. (exist_check): Rename to display_database_check(); use candidates. (locate_page): Pass the candidate list through to try_section() and try_db(). (display_pages): New function to iterate through a candidate list and display each entry. (man): Create a candidate list and pass it to locate_page(). Display pages only after building the full list. Mon Dec 17 03:40:48 GMT 2001 Colin Watson * man/man8/mandb.man8 (EXIT STATUS): Document mandb's exit codes. Mon Dec 17 03:20:15 GMT 2001 Colin Watson * src/whatis.c (long_options): Remove duplicate for --exact. (word_fnmatch): New function. (parse_whatis): Match using word_fnmatch() if --wildcard but not --exact was given. * man/man1/apropos.man1 (OPTIONS): Document this. (DESCRIPTION): Fix typographical glitch. Mon Dec 17 00:53:20 GMT 2001 Colin Watson * man/man1/man.man1 (OPTIONS): Mention groff 1.17 and the ps and utf8 devices. * man/*/man1/man.man1: Likewise. Sun Dec 9 03:31:54 GMT 2001 Morten Brix Pedersen * po/da.po: New file. * man/THANKS: Add credit. Sun Dec 9 03:19:57 GMT 2001 Jose Rodriguez * src/man.c (main): Initialize program_name before calling error(). Fri Dec 7 01:35:31 GMT 2001 Colin Watson * configure.in: Detect libdb3, although man-db hasn't been well tested with it yet. Fri Dec 7 00:35:53 GMT 2001 Paul Slootman * src/man.c (main): Delete spurious backslashes in prompt_string. Wed Nov 21 20:59:14 GMT 2001 Colin Watson * po/fr.po: Update from Laurent Pelecq. * po/.cvsignore: Ignore ChangeLog. Wed Nov 21 00:48:50 GMT 2001 Colin Watson Keeping generated files like the output of gettextize in CVS is bad. * intl/*, po/ChangeLog, po/Makefile.in.in: Remove. * autogen.sh: Run gettextize. * release.sh: When releasing, pass --copy to gettextize. Wed Nov 21 00:29:26 GMT 2001 Colin Watson * src/compression.c (decompress): Free esc_file and esc_filename once we're finished with them. * src/man.c (local_man_loop): If argv is a directory, display a useful error message rather than letting zsoelim get confused. Mon Nov 19 00:53:03 GMT 2001 Colin Watson * libdb/db_lookup.c (copy_datum): Explicitly null-terminate dat.dptr, since C string-manipulation functions are used on it. Fri Nov 16 04:28:31 GMT 2001 Colin Watson * src/manp.c (add_nls_manpath): Concatenate strings more safely. Changes adapted from a patch by OGAWA Hirofumi : * acinclude.m4 (MAN_CHECK_BDB): $LIBS, not LIBS, and quote it while we're here. * src/manp.c (pathappend): Use strsep() rather than strtok(). (cat_manpath): Likewise. (add_nls_manpath): Likewise. Thu Nov 8 11:27:32 GMT 2001 Colin Watson * src/man.c (get_preprocessors_from_file): Drop privileges to access temporary file. Wed Nov 7 13:34:38 GMT 2001 Colin Watson * src/man.c (format_display): Drop privileges throughout. Don't free command until after it could have been used for an error message. Sun Oct 14 05:23:20 BST 2001 Colin Watson * src/version.c: Include for exit(). * include/manconfig.h.in: Remove spurious orphaned #ifdef. Oops. Spanish translation updates from David Martínez : * po/es.po, man/es_ES.88591/man1/apropos.man1: Bring up to date. * man/man1/lexgrog.man1: Fix thinko - s/problems/programs/. Tue Sep 25 22:46:45 BST 2001 Colin Watson * src/whatis.c (get_whatis): Suppress wrong report of a pointer loop when the second or subsequent element in a pointer chain points to itself and has a usable whatis. Wed Sep 19 00:47:55 BST 2001 Colin Watson * src/man.c (local_man_loop): Drop privileges throughout. Documentation corrections thanks to Andreas Dilger : * man/man1/man.man1 and translations (SEE ALSO): Refer to man(7). * docs/manpage.example, docs/manpage.example.pod, docs/manpage.example.sgml (SEE ALSO): Move to the end. (SYNOPSIS, DESCRIPTION, OPTIONS): Add more advice. * docs/manpage.example (FILES): Restore tabs that had been turned into spaces. Tue Sep 18 03:46:00 BST 2001 Colin Watson * lib/xstrndup.c: New file. * lib/Makefile.in: Build it. * include/manconfig.h.in: Prototype xstrndup(). * src/man.c (compare_names, compare_mandata_ext): New functions. (try_section): Build title more locally, displaying extensions correctly. Sort the results of look_for_file(). (try_db_section): Build title even if NROFF_MISSING is defined. (try_db): Sort data returned from the database. (locate_page): Look in the filesystem first and then the database, rather than the other way round. * src/manp.c (checkpath): Remove; it used to resolve symlinks, but it doesn't do that any more and I don't think it should. * src/manp.c: Constify arguments to many functions by either being more careful not to alter them or by duplicating them. * src/util.c (is_directory): Likewise. * src/catman.c, src/man.c, src/mandb.c, src/whatis.c (main): Simplify calls. * src/manp.h, include/manconfig.h.in: Update prototypes. * src/manp.h: add_system_manpath() is static now. * include/manconfig.h.in: Provide stupid getcwd() emulation with getwd() if the former isn't available. * src/man.c (main, format_display): Assume getcwd() is available. * src/mandb.c (main): Likewise. * src/manp.c (add_dir_to_path_list): Likewise. * src/manp.c (add_dir_to_path_list): The checks that manpaths end in /man or /MAN were overly anal and never compiled in; remove them. * acinclude.m4 (MAN_PROG_GNU_NROFF): More portable shell for ash. * src/man.c (lang_table): We use the latin1 alias rather than iso8859 for all other languages, so do so for Korean too. * src/lexgrog.l: Prevent the no-op request '.' from eating text on the next line. (find_name): Remove trailing spaces as well as leading ones. Fri Sep 7 19:28:12 BST 2001 Colin Watson * Version: 2.3.20. * docs/NEWS: Update. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update. Fri Sep 7 00:55:53 BST 2001 Colin Watson * GNUmakefile.in (dist): Include other manpage.example formats. * lib/tempfile.c (create_tempfile): Create with mode 0600. * src/check_mandirs.c (test_manfile): Drop privileges for temporary file operations. * src/lexgrog.l (find_name): Likewise. * src/man.c (make_roff_command): Likewise. * src/straycats.c (check_for_stray): Likewise. (straycats): Likewise. * src/ult_src.c (ult_src): Likewise. Thu Sep 6 21:54:05 BST 2001 Colin Watson * include/Defines.in: Add lexgrog to list of transformed program names. Adjust sysconfdir detection. * src/Makefile.in (install): Really install lexgrog by default. Create the directory config_file is in rather than sysconfdir. Wed Sep 5 19:55:01 BST 2001 Colin Watson * GNUmakefile.in (dist): Generate a .tar.gz, not a .tgz. * src/man.c: Korean: roff_device is ascii8, LESSCHARSET is iso8859. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update. Wed Sep 5 03:42:18 BST 2001 Colin Watson * src/compression.c (decompress): Constify arguments. * include/manconfig.h.in: Likewise. * src/lexgrog.l (find_name): Deal with '-' and compressed files. * man/man1/lexgrog.man1 (DESCRIPTION): Document this. (BUGS): Remove (optimism ...). (NOTES): New section. lexgrog can't parse .so requests. * src/Makefile.in: Really build lexgrog by default, and add some objects. Wed Sep 5 02:02:20 BST 2001 Colin Watson * docs/NEWS: Describe recent changes. * man/man1/man.man1 (OPTIONS): Document --html. (ENVIRONMENT): Document $BROWSER. * man/man8/mandb.man8 (OPTIONS): Explain that --create implies --no-purge. Tue Sep 4 18:38:23 BST 2001 Colin Watson * src/man.c (format_display): If $BROWSER contains several elements separated by colons, try each in turn until one succeeds. Tue Sep 4 02:09:07 BST 2001 Colin Watson * src/man.c (format_display): Actually change to the temporary directory for HTML output. * src/mandb.c (main): --create implies --no-purge. Sat Sep 1 17:40:06 BST 2001 Colin Watson * lib/mkdtemp.c, lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.4. * lib/Makefile.in, lib/README: Add them. * configure.in: Check for mkdtemp() and mkstemp(). * lib/tempfile.c (path_search): New function, split from create_tempfile(). Now checks $TMP as well as $TMPDIR, and ensures that neither is checked when privileges are raised. (create_tempfile): Use it. Fix the umask around the call to mkstemp() rather than calling fchmod() after the fact. (create_tempdir): New function. * include/manconfig.h.in: Prototype create_tempdir(). * src/man.c: --html code needs to be guarded by TROFF_IS_GROFF. (man_getopt): If -H is given, set troff to 1. Add -H to the "incompatible options" error message. (make_roff_command): Revert determine_lang_table() special case. (format_display): Use a temporary directory for HTML output (groff tends to output several files, including images). Take an extra argument, used to set the name of the main output file. (display): Pass man_file to format_display(). * src/util.c (remove_directory): New function. * include/manconfig.h.in: Prototype it. Fri Aug 31 22:20:08 BST 2001 Colin Watson Initial support for ESR's $BROWSER variable. Not complete yet. * src/man.c: Remove ENABLE_HTML guards around all the --html code. Too many #ifdefs clutter the code, and it should at least be usable to some extent now. (main): Check $BROWSER before other ways of finding html_pager. (man_getopt): If -H is given, set roff_device to "html". Reset htmlout and html_pager with -D. (make_roff_command): Don't call determine_lang_table() if htmlout is set. (make_browser): New function. (make_display_command): Add case for htmlout being set. (format_display_and_save): Rename roff_cmd to format_cmd. (display_catman): Likewise. (display): Likewise. Add some cases for htmlout being set (always format, never save a cat page). Split some code out into format_display(). (format_display): New function. * src/man.c (main): Save the value of $LESS for later. (make_display_command): Use setenv() to change $LESS in the environment rather than nasty shell code. * src/man.c (main): Don't loop if $LANGUAGE is set but empty. (display_catman): Fix segfaults due to strappend() misuse. * src/manp.c (read_config_file): Print dotmanpath, not home (which might point to freed memory). * src/man.c (main): Tidy up error message. (store_line_length): Remove duplicate 'int width' declaration. Wed Aug 29 20:44:27 BST 2001 Colin Watson * man/man8/mandb.man8 (WHATIS PARSING): Move to ... * man/man1/lexgrog.man1: ... here. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Run msgmerge. Wed Aug 29 01:48:53 BST 2001 Colin Watson * man/man1/apropos.man1 (ENVIRONMENT): Fix grammar error. Wed Aug 29 01:34:33 BST 2001 Colin Watson * src/lexgrog.l (usage): New function. (main): Rewrite. Add command-line options, and make the output more easily parseable by other programs. By default, the lexgrog program now only attempts to parse its input as a man page and only displays the whatis line, although this can be changed on the command line. * src/Makefile.in: Include lexgrog in $(PROGS), so that it gets built by default and linked against version.o. * man/man1/lexgrog.man1: New man page. Still needs some work. * man/Makefile.in: Install it. Tolerate it being missing in some languages (ugly hack). Tue Aug 21 01:57:44 BST 2001 Colin Watson * src/Makefile.in: Link non-setuid programs against fake_security.o rather than security.o. * src/fake_security.c: Add a few stub variables to match recent security.c changes. Tue Aug 21 01:34:49 BST 2001 Colin Watson * src/Makefile.in (install): Don't depend on all, so that the package isn't recompiled when running 'make install' on a machine with a skewed clock. Don't install the wrapper. Install man and mandb in $(bindir) rather than $(libdir)/man-db. If lexgrog and globbing have been built, install them in $(libdir)/man-db rather than $(sbindir). Ensure $(sbindir) and $(libdir)/man-db exist. Tue Aug 21 00:40:47 BST 2001 Colin Watson * src/man.c (escape_special): Rename to escape_less(). Constify argument. (determine_lang_table): Constify argument. Unify some common code. (make_display_common): Use escape_less() rather than escape_special(). * docs/NEWS: Document shell escaping. Sun Aug 19 23:56:36 BST 2001 Colin Watson * configure.in: Compile with -Wall by default. * src/compression.c: Include "security.h". * src/manp.c: Likewise. * src/check_mandirs.c (purge_whatis): Correct return value when purging a WHATIS_MAN entry with a missing target. * src/whatis.c (get_whatis): Remove unused variables 'pointer' and 'ext'. * src/man.c: Include for time(). (local_man_loop): Remove unused variable 'dir'. (make_roff_command): Remove unused variable 'tmpfile'. (exist_check): Print 'loc' in pointer format rather than string format (it's a struct mandata *). * src/wrapper.c: Include for initgroups(). Sun Aug 19 13:16:01 BST 2001 Colin Watson * src/manp.c (iterate_over_list): New function (get_from_list() can only get the first matching element). (get_manpath): Use iterate_over_list() to get multiple matching MANPATH_MAP entries. Sun Aug 19 13:02:01 BST 2001 Colin Watson * src/man.c (popen, pclose): Rely on the BROKEN_PCLOSE check in configure rather than checking architectures here. (man_getopt): Wrap the remaining code related to --html in '#ifdef ENABLE_HTML'. (make_roff_command): Remove HAS_TROFF and NROFF_MISSING asserts; I think they're unnecessarily unwieldy here. (tmp_cat_filename): Constify argument. (commit_tmp_cat): Constify arguments. (display_catman): New function, split from display(). (display): Use display_catman(). Don't shadow status from an outer scope. (try_section): Simplify cat page case. * src/util.c (escape_shell): New function. * include/manconfig.h.in: strappend() is no longer in util.c. Prototype escape_shell(). * src/man.c (make_roff_command): Use escape_shell() liberally to protect against strange characters. (make_display_command): Likewise. Add special handling for $MAN_PN in the less prompt string, since the environment variable is no longer parsed by the shell. (display_catman): Likewise. (display): Likewise. * src/whatis.c (use_grep): Likewise. * src/catman.c (main): Print a warning if setlocale() fails. * src/man.c (main): Likewise. * src/mandb.c (main): Likewise. * src/manpath.c (main): Likewise. * src/whatis.c (main): Likewise. * src/wrapper.c (main): Explain why this doesn't need to warn if setlocale() fails. Thu Aug 9 15:10:26 BST 2001 Colin Watson * configure.in: Require autoconf 2.50a (for AS_VAR_*). * src/wrapper.c: If DEBUG is defined, allow _man and _mandb as argv[0] names as well as man and mandb, rather than instead of them. * docs/NEWS: Document lexgrog improvement. The mkstemp() work was more an improvement than a fix, as I don't think it was exploitable. Mon Aug 6 02:22:38 BST 2001 Colin Watson * src/lexgrog.l: groff requests aren't case-sensitive, so stop the preprocessor detection thinking they are. Mon Aug 6 01:26:26 BST 2001 Colin Watson * lib/tempfile.c (create_tempfile): Use mode 0644 rather than mode 0600 so that it can be read with different privilege levels. Thu Aug 2 00:12:41 BST 2001 Colin Watson * lib/tempfile.c: New file. create_tempfile() does sane mkstemp()-like temporary file creation, while searching through $TMPDIR, P_tmpdir, and /tmp in the style of tempnam(). * include/manconfig.h.in: Prototype create_tempfile(). * lib/tempnam.c: Remove, as we no longer use it. * lib/Makefile.in, lib/README: Remove mentions of tempnam.c, and use tempfile.c instead. * configure.in: Don't replace tempnam(). * src/compression.c (create_ztemp): Use create_tempfile() rather than tempnam(). * src/man.c (create_stdintmp): Likewise. * zsoelim/zsoelim.l (open_file): Likewise. * src/straycats.c (straycats): Use create_tempfile() rather than mkstemp(). * src/compression.c (decompress): Call remove_ztemp() rather than duplicating code. (remove_ztemp): Only close the fd if it looks valid. * src/man.c (remove_stdintmp): Remember to free stdin_tmpfile. * acinclude.m4: Correct AC_VAR_* to AS_VAR_*. * src/util.c (is_changed): Fix comment. * docs/NEWS: Preliminary entries for 2.3.20. Tue Jul 24 02:17:53 BST 2001 Colin Watson * docs/manpage.example: Some cleanups. Use more conventional formatting for references to other man pages. * docs/manpage.example.pod, docs/manpage.example.sgml: New files. Mon Jul 16 16:42:46 BST 2001 Colin Watson * src/lexgrog.l: Restore fr_name to the NAME regex. Fri Jul 13 11:51:40 BST 2001 Colin Watson * man/de_DE.ascii: Remove (Latin-1 variant still exists). Fri Jul 13 02:35:39 BST 2001 Colin Watson * */.cvsignore: New files. * src/man.c (make_roff_command): Look up the correct character set each time a page is displayed, not just the first time. Thu Jul 12 01:11:41 BST 2001 Colin Watson * src/lexgrog.l: Split out NAME-matching regex into one regex per language. Add support for cs, fi, hu, nl, and pl, not forgetting Latin (for Lingua::Romana::Perligata(3pm), of course). (add_separator_to_whatis): New function, to allow trimming the first space from the " - " separator. (main): Rewrite; find_name()'s prototype changed long ago. Tue Jul 10 14:37:51 BST 2001 Colin Watson * src/util.c (is_newer): Rename to ... (is_changed): ... this. We now check whether the cat page has a different timestamp from the man page, rather than simply whether it is newer. Remove hack for archivers that preserve timestamps: it's no longer needed. * include/manconfig.h.in: Rename is_newer() prototype to is_changed(). * src/man.c (commit_tmp_cat): Set the modification time of a created cat page to be the same as the corresponding man page. (display): stat() the man page so that commit_tmp_cat() can get its modification time. Use is_changed() rather than is_newer(). Sun Jul 8 16:06:43 BST 2001 Colin Watson * src/whatis.c (get_whatis): Allow an entry to point to itself if it contains a non-empty whatis field. This occasionally happens when multiple names and descriptions are present, and it's easier to tolerate this. (display): If an entry points to itself, don't display the pointer in square brackets. * include/sections.list: Remove; it's no longer needed. * GNUmakefile.in (dist): Don't install it. * include/Defines.in: Don't reference it. Also remove definition of message_catalogue (obsoleted by gettext). * include/manconfig.h.in (LESS_OPTS): Don't include $LESS. * src/man.c (make_display_command): Include $LESS here instead. Put it after prompt_string rather than before, so that long options in $LESS work. Sat Jul 7 16:32:24 BST 2001 Colin Watson * src/man.c (determine_lang_table): Fix silly bracketing typo that caused none of the lang_table entries to match. Thu Jul 5 15:48:42 BST 2001 Colin Watson * Version: 2.3.19. * docs/NEWS: Update. * man-db.gnu: Update. Change formatting to something closer to that currently in the Free Software Directory CVS repository. * man-db.lsm: Update. Thu Jul 5 14:27:17 BST 2001 Colin Watson * man/man5/manpath.man5 (FORMAT): MANDB_MAP now only affects setuidness when in the system configuration file. * src/man_db.conf.in: Likewise. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update. Wed Jul 4 13:39:40 BST 2001 Colin Watson The product of some hacking at the Debian Conference. Enjoy. * docs/NEWS: Describe recent changes. * include/manconfig.h.in: Add SYSTEM_CAT and USER_CAT defines. Move includes from security.c to ... * src/security.h: ... here (new file). * src/man.c: Include security.h. * src/mandb.c: Likewise. * src/security.c: Likewise. * src/manp.c (add_mandb_map): Take an additional parameter, user. Use the new MANDB_MAP_USER flag instead of MANDB_MAP if it is set. (cat_manpath): Look at user catpaths before system catpaths. (add_to_dirlist): Take user parameter, passed through to add_mandb_map(). (read_config_file): Call add_to_dirlist() with user set for ~/.manpath, and reset for /etc/manpath.config (security fix). (get_mandb_manpath): Allow user manpaths. (global_catpath): Rename to get_catpath(), and only allow it to handle user catpaths (from ~/.manpath) as well if explicitly requested. (is_global_mandir): Note that this is trusted. * src/manp.h: Reflect renaming of global_catpath() to get_catpath(). * src/man.c (need_to_rerun): Use get_catpath() instead of global_catpath(). (make_roff_command): Likewise. (display): Likewise. (find_cat_file): Likewise. (try_db_section): Likewise. (try_db): Likewise. * src/catman.c (main): Likewise (check only user mandirs). * src/mandb.c (main): Likewise (check only user mandirs). * src/straycats.c (straycats): Likewise (check only with user mandirs). * src/whatis.c (search): Likewise (check only with user mandirs). * src/man.c (need_to_rerun): Use is_global_mandir() rather than global_catpath() to decide whether to drop privileges. * src/mandb.c (main): Likewise. Unify common code for system and user catpaths. * src/man.c (make_roff_command): Check catpath even if global_manpath is false. (locate_page): Simplify slightly. * src/security.c (get_man_owner): New function: gets and caches the password entry structure for MAN_OWNER. * src/man.c (commit_tmp_cat): If running as root, chown created cat pages to MAN_OWNER. Sun Jul 1 01:58:33 BST 2001 Colin Watson * src/check_mandirs.c (splitline): Don't initialize the pointer field here; instead, control it from ... (test_manfile): ... here. Change the logic for multiple name/description blocks again. Remove misguided special-casing of the first name in a block. Set the id field more carefully, depending on string equality instead of ordering. Avoid scribbling over lg.whatis when a later splitline() needs it. Don't call splitline() if whatis parsing failed. * src/check_mandirs.c (purge_normal): New function, factored out from purge_missing(). (purge_whatis): New function to decide whether to purge a WHATIS_MAN entry. (purge_missing): Use both of these. (testmandirs): purge_whatis() sometimes needs to ensure a hierarchy is rescanned. Honour this. Improve indentation levels. * src/mandb.c (main): Reset force_rescan before each purge. * src/lexgrog.l: Treat '..' as a no-op request. Sun Jul 1 01:38:13 BST 2001 Colin Watson * manual/misc.me (Modes of operation): Mention new requirement to use --update to update databases. mandb knows how to delete old entries now, so remove a sentence saying it can't. * src/man.c: More in the quest for sane indentation levels. * man/man1/apropos.man1: Textual cleanups. * man/man1/man.man1: Likewise. * man/man1/manpath.man1: Likewise. * man/man1/whatis.man1: Likewise. * man/man1/zsoelim.man1: Likewise. * man/man5/manpath.man5: Likewise. * man/man8/accessdb.man8: Likewise. * man/man8/catman.man8: Likewise. * man-db.lsm: Reformatted as per the LSM.README. Thu Jun 28 22:52:04 BST 2001 Colin Watson * src/man.c (try_db_section): Downgrade whatis refs warning to a debugging message, as it's rather noisy for a stable release. Thu Jun 28 22:38:41 BST 2001 Colin Watson * src/check_mandirs.c (gripe_rwopen_failed): New function. (testmandirs): Use it. (purge_missing): New function to purge database entries whose associated manual pages have been deleted. * src/check_mandirs.h: Prototype purge_missing(). * src/mandb.c (main): New --no-purge option. Unless it is used, purge_missing() is called on each database before calling mandb(). Don't call straycats() until after the temporary database has been moved to its permanent location. Make sure all cleanup code is called with dropped privileges. Add statistics message for purged entries, and separate messages for the benefit of translations. When --test is given, only assume --quiet if --debug wasn't given. (usage): Describe --no-purge. * src/man.c: Move extension's storage to ... * src/globbing.c: ... here. (look_for_file): Constify string arguments. * src/man.h: Move prototype of look_for_file() to ... * src/globbing.h: ... here (new file). * src/manp.c (pathappend): Only append the new element(s) if any were left after removing duplicates. (read_config_file): Make sure what we free was actually allocated. * src/Makefile.in (mandb): Link with globbing.o. * man/man8/mandb.man8 (OPTIONS): Document --no-purge. General textual cleanup. * src/accessdb.c (main): Move content into a tighter scope. * src/security.c (drop_effective_privs): Style nit. Thu Jun 28 13:28:13 BST 2001 Colin Watson * man/man1/man.man1 (ENVIRONMENT): Document $MANWIDTH. Thu Jun 28 13:15:04 BST 2001 Colin Watson * src/man.c (store_line_length, get_roff_line_length): New functions, adapted from Andries Brouwer's man. (main): Outside catman mode, find out and store the line length. (make_roff_command): Outside catman mode, retrieve the stored line length and feed a .ll request into the pipeline if it's non-standard. We let recent groff handle the page length. (display): Don't even consider saving the cat page if save_cat is already false. (get_preprocessors): If the database says no preprocessors are to be used, it's OK to save the cat page. Thu Jun 28 01:44:02 BST 2001 Colin Watson * src/man_db.conf.in (SECTION): Remove guarantee that ties will be broken in lexical order within sections. It's rather complicated to be sure of that right now, and it should rarely matter. * docs/ToDo: lexgrog learnt how to detect preprocessors ages ago. Thu Jun 28 01:02:32 BST 2001 Colin Watson * src/manp.c (gripe_stat_file): Downgrade the warning if a manpath element doesn't exist to a debugging message (affects people without a /usr/local/share/man, for example). (read_config_file): Additional debugging message. Free home if it gets allocated. Thu Jun 28 00:35:09 BST 2001 Colin Watson The caching cleanup I've been promising for weeks. Here be dragons. * src/man.c (man): Only update database caches if --update is given. (main): --all no longer implies a database update (you can always use --all --update if you need that). * man/man1/man.man1 (OVERVIEW): It's no longer necessarily man's job to keep the caches up to date; use --update to get that. (DEFAULTS): Likewise. Some rationale. Mention globbing fallback. (OPTIONS/--local-file): Fix typo. (OPTIONS/--update): New description. Only useful with setuid man. * manual/misc.me (Modes of operation): man will only update database entries if the --update flag is used. Tue Jun 26 22:10:07 BST 2001 Colin Watson * src/lexgrog.l: More cleanup. No substantive changes. * include/manconfig.h.in: Likewise. Also bring xrealloc() prototype into sync. * src/mandb.c (main): Allow root as well as MAN_OWNER to work on system manpaths. Tue Jun 26 03:45:01 BST 2001 Colin Watson * src/man_db.conf.in (SECTION): Add a little more advice about where to list sections with extensions. * src/manp.c (add_to_dirlist): Add SECTIONS as an alias for SECTION, since I keep getting it wrong and I came up with it in the first place. Both make sense in different situations. * src/check_mandirs.c (splitline): Trim trailing spaces off names and descriptions. If the given base_name contains a comma, only use the part of the name before it as the target for pointers. * src/whatis.c (get_whatis): Unroll recursion into a finite loop to avoid infinite recursion if the database contains a pointer loop. Add the page name as an argument so that a warning can be printed. (display): Pass the new argument to get_whatis(). (apropos): Recommend 'mandb --create' rather than plain 'mandb' if the database gets corrupted. * src/lexgrog.l: Ignore no-op groff requests (e.g. '.'). New variable, fill_mode. Reset it when .nf is encountered, set it when .fi is encountered. (newline_found): If fill_mode is set, add 0x11 instead of a space. Mon Jun 25 02:55:36 BST 2001 Colin Watson * docs/NEWS: Describe recent changes. Add dates of old releases. * include/manconfig.h.in: Move check_mandirs.c prototypes to ... * src/check_mandirs.h: ... here (new file). * src/man.c: Include check_mandirs.h. * src/mandb.c: Likewise. * src/man.h (make_filename): Move prototype to check_mandirs.h. * src/check_mandirs.c (test_manfile): Split parsing of file names into mandata structures into a new function ... (filename_info): ... this. (test_manfile): Calculate length of file name minus compression extension separately from the parsing, and do so whether COMP_SRC is defined or not. * src/man.c (try_section): Use filename_info() to find out if the section of a glob-located file is different from the current section and is mentioned elsewhere in the configuration file. If so, ignore that file in the current section. Mon Jun 25 01:30:24 BST 2001 Colin Watson * src/man.c (man_getopt): Conditionalize gxditview initialization on TROFF_IS_GROFF. As a bonus, this squashes a compiler warning. (man): Remove some unreferenced cruft, while I'm in the process of fixing up multi-character sections. * src/Makefile.in: Build intermediate man.o and mandb.o objects, so that changing other objects just requires a relink. * src/globbing.c (look_for_file): Print the layout in debugging mode only when it's first parsed. Sun Jun 24 18:47:20 BST 2001 Colin Watson * configure.in (--with-db): Improve help output formatting. * manual/intro.me (Arguments to configure): Document --enable-mandirs. * README: Update. * manual/Makefile ($(manual).html): Improve grohtml invocation. (realclean): Remove generated .png files. Sun Jun 24 17:22:53 BST 2001 Colin Watson * src/man.c (try_section): Break if a page has been found and --all wasn't given. (try_db): Print extension in debug mode. Compare against requested section if the extension is a section in its own right, to avoid duplication. * src/man_db.conf.in: It's SECTION, not SECTIONS. * configure.in: --enable-mandirs=OS defines how the manual page hierarchy is laid out (GNU, HPUX, Solaris, IRIX). If unset, globbing behaves as before. * acconfig.h: Add MANDIR_LAYOUT. * src/globbing.c (parse_layout): New function. (look_for_file): Associate each glob with a layout. * configure.in: Don't check for off_t (only used by gettext). Sat Jun 23 15:23:14 BST 2001 Colin Phipps * zsoelim/zsoelim.l (open_file): Supply a format string to error(). Sat Jun 23 15:15:41 BST 2001 Colin Watson * ult_src.c (ult_src): Restore the original mantree to the start of basename before calling test_for_include(), in case ult_softlink() went outside the mantree. (ult_softlink): Make debugging message print the absolute path. Tue Jun 19 02:33:40 BST 2001 Colin Watson * src/man.c (man): Allow sections to be more than one character, and trim them for use in directory names. * src/manp.c (read_config_file): Read ~/.manpath first, as entries are added the other way around now. Mon Jun 18 18:55:39 BST 2001 Colin Watson * src/manp.c (add_sections, get_sections): New functions. (add_to_dirlist): Recognize new SECTIONS directive. * src/manp.h (iterate_catlist, start_iterator): Remove (not used). (get_sections): New prototype. * src/man.c (get_section_list): Use get_sections() instead of std_sections if it returns a non-empty list. * src/man_db.conf.in: Add documentation of SECTIONS, and a default line. The documentation is still inaccurate (extensions don't work well yet). * include/manconfig.h.in (STD_SECTIONS): Reduce to only single-character sections; the rest will be set in the configuration file. * src/manp.c (add_to_list): Add to the tail rather than the head (needed for SECTIONS, probably makes other things more intuitive). (read_config_file): Restore print_list() in debug mode. * src/check_mandirs.c: Add copyright notice and change information. * src/lexgrog.l: Likewise. * src/man.c: Likewise. * src/mandb.c: Likewise. * src/compression.c (get_ztemp): Remove redundant test. * src/man.c (get_preprocessors_from_file): Change an = to ==. * src/wrapper.c (main): Cosmetic improvements. Sat Jun 16 19:22:51 BST 2001 Colin Watson * src/straycats.c (check_for_stray): Check that canonicalize_file_name() succeeded, not that it failed. (I'm pretty sure that this is the last instance of this now.) Sat Jun 16 18:30:09 BST 2001 Colin Watson * libdb/db_store.c: Move id-favouring logic to a macro. If FAVOUR_STRAYCATS is set, make sure a WHATIS_MAN entry won't inadvertently replace a STRAY_CAT. * configure.in: Don't strip binaries in LDFLAGS (GNU standards). * src/check_mandirs.c (testmandirs): Check that opendir() succeeded, not that it failed! (testmandirs): Instead of initializing info.pointer here, initialize it ... (splitline): ... here. (testmandirs): Shuffle whatis logic some more, to make sure pages that really are in the filesystem don't end up as WHATIS_MAN. This reverts part of the change of 26 May 2001. * man/man8/mandb.man8: Document the expected format of NAME sections for whatis parsing, and some common reasons why parsing fails. Tue Jun 12 22:20:17 BST 2001 Colin Watson * docs/NEWS: More 2.3.19 stuff. Sun Jun 10 14:05:10 BST 2001 Gordon Sadler * man/man1/manpath.man1 (ENVIRONMENT): Replace 'semicolon' with 'colon' throughout. Sun Jun 10 13:59:04 BST 2001 Colin Watson * src/manp.c (pathappend): Fix infinite loop when adding a manpath entry which is a substring of an existing entry. Sun Jun 10 13:49:02 BST 2001 Colin Watson * src/check_mandirs.c (testmandirs): Treat EROFS like EACCES while opening a database read-write (i.e. only print debug messages). (create_db): Likewise. src/man.c (open_cat_stream): Likewise. (try_db_section): Likewise. * src/straycats.c (check_for_stray): Carry on gracefully rather than exiting if a straycat filter fails. * src/manp.c (pathappend): Remove duplicate entries. * src/lexgrog.l: Allow .LP, .PP, and .P as well as .br between whatis definitions. Sat Jun 2 14:34:59 BST 2001 Colin Watson * configure.in: Give our English man pages the same date format as the other locales. * src/straycats.c: Use 'col -bx' rather than 'col-bx'. Mon May 28 14:56:35 BST 2001 Colin Watson * include/manconfig.h.in: Since it isn't sensible to define debug (-d options at run-time do just as well), remove the commented definition. * include/manconfig.h.in, src/catman.c, src/check_mandirs.c, src/compression.c, src/man.c, src/mandb.c, src/manpath.c, src/whatis.c: Remove instances of '#ifndef debug'. * src/util.c: debug is already declared extern in manconfig.h. Mon May 28 14:30:38 BST 2001 Colin Watson * tools/README: Describe chconfig and install-manpage. * man/man5/manpath.man5, docs/ToDo: Document the DEFINE directive. * libdb/db_delete.c, libdb/db_lookup.c, libdb/db_store.c, src/whatis.c: Remove redundant strtok() declaration. * src/check_mandirs.c: Declare strpbrk(). * src/*: Global style cleanup. Sorry about the large diff, but it had to happen sometime: I can't stick with the prevailing coding style when there are several to choose from! No meaningful code change, although I disentangled a few assignments from if conditions and rearranged a few other sections. * po/*: Update accordingly. Sun May 27 18:32:41 BST 2001 Colin Watson * acinclude.m4 (MAN_CHECK_BDB): New macro to check for Berkeley DB. * configure.in: Use it. * src/check_mandirs.c (test_manfile): Be more accurate about finding the " - " at the end of a series of whatis names, and make sure to skip commas between them. Add more commentary. * src/man.c (open_cat_stream): Return NULL if the cat page is unwriteable, rather than wasting time compressing to /dev/null. (format_display_and_save): Give up if both outing and saving become false. Sun May 27 18:00:00 BST 2001 Colin Watson * docs/NEWS: Preliminary entries for 2.3.19. Add current version number throughout as well as just "Major changes since ...". * manual/misc.me (Modes of operation): mandb doesn't necessarily have to be rerun any more, as the filesystem will be checked if the database doesn't return anything. man and mandb can be built for setuid operation but installed non-setuid now. Sat May 26 15:33:37 BST 2001 Colin Watson * manual/README: Note that HTML output is disabled by default. I don't currently provide a pre-built PostScript manual anywhere. * manual/misc.me (Credits): Add Fabrizio. * manual/*: FHS updates. Various boring typo/syntax/whitespace fixes. Sat May 26 15:14:29 BST 2001 Colin Watson * GNUmakefile.in, autogen.sh: Put 'timestamp' in stamp-h and stamp-h.in rather than the date. * src/man.c (open_cat_stream): Open the cat file before forking in order to deal with errors better. Open to /dev/null without complaining if the cat file is unwriteable. (close_cat_stream): Only commit the temporary cat if it was created. (locate_page): Fall back to the filesystem if nothing was found in the database (since it might be out of date). * src/man.c (try_db_section): If the database can't be opened read-write due to EACCES, only print a message in debug mode. * src/check_mandirs.c (testmandirs): Likewise. (create_db): Likewise. * src/check_mandirs.c (test_manfile): Make sure separate whatis keys each get their own whatis entry. Wed May 23 17:06:31 BST 2001 Colin Watson * configure.in: Fix PACKAGE and VERSION substitutions. Wed May 23 15:51:06 BST 2001 Colin Watson * configure.in: Updates for autoconf 2.50. (AC_PREREQ): Require version 2.1.2. (AC_INIT): Avoid deprecated use with one argument. (man_ac_version): Don't work out the autoconf version any more; inline syntax is all that needed it, and any autoconf since 2.1.2 will do. (AC_STDC_HEADERS): Now AC_HEADER_STDC. (AC_LINK_FILES): No longer needed with newer gettext. (AC_OUTPUT): Avoid deprecated use with arguments. Fix instances of underquoting throughout, as the new autoconf is less tolerant of this. * include/manconfig.h.in: Remove compatibility code for pre-1995 autoconf versions. Thu May 17 19:11:37 BST 2001 Colin Watson * src/man_db.conf.in: Improve documentation of MANDB_MAP. Wed May 16 00:09:13 BST 2001 Colin Watson * tools/config.sub: Update to today's CVS. Wed May 16 00:07:04 BST 2001 Colin Watson * A number of minor fixes from SuSE's diff: * GNUmakefile.in: Don't prepend ../ to prefix before passing it to subdirs. * lib/cleanup.c: HUP and TERM signal handling was mistakenly acting on INT instead. * src/lexgrog.l: Replace a few instances of " \t\n" with "blank_eol". * src/man.c: Drop privileges before changing back to the original directory just before exiting (only matters for profiling). * src/util.c: Undefine MAX before redefining it. * po/POTFILES.in: Read src/lexgrog.c rather than src/lexgrog.l (gettext understands C better than lex). * po/de.po, po/es.po, po/fr.po: Remove a few stray '\r's. * I'll look at the zlib bits of the patch soon. From a preliminary look I'll probably end up rewriting it - I'd prefer more of the compression stuff actually to go in src/compression.c. Tue May 15 22:01:59 BST 2001 Colin Watson * src/man.c (get_section_list): Return std_sections if argument to -S was an empty string or if that or $MANSECT contained only colons. Previously, man would behave wrongly in the former case and segfault in the latter. Also remove a redundant xstrdup(). Mon May 14 23:46:25 BST 2001 Colin Watson * Version: 2.3.18. * README: Add contact details. * libdb/stamp-h: Removed. * GNUmakefile.in, libdb/Makefile.in: Updated accordingly. * src/man_db.conf.in: FHS 2.1 has /usr/local/share/man as the location of locally installed man pages rather than /usr/local/man. Accordingly, the MANDB_MAP for /usr/local/man is now /var/cache/man/oldlocal, and /usr/local/share/man takes over /var/cache/man/local. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update with msgmerge. Mon May 14 22:18:32 BST 2001 Colin Watson * src/security.c: Count how many times drop_effective_privs() has been called, and don't actually regain privileges until regain_effective_privs() has been called an equal number of times. This should flush out several subtle bugs. * src/mandb.c: Call manpath() rather than read_config_file() (this was changed while merging 2.3b12). Otherwise 'mandb --user-db' segfaults as manp never gets set. Sun May 13 18:34:33 BST 2001 Colin Watson * GNUmakefile.in (dist): Don't install po/Makefile.in. * src/stamp-h: Removed. * GNUmakefile.in, src/Makefile.in: Updated accordingly. * GNUmakefile.in (distclean): Don't clean configure, src/lexgrog.c, zsoelim/zsoelim.c. (realclean): Clean configure here instead. realclean targets in subdirs already remove the other two. * zsoelim/Makefile.in (clean): Let realclean remove zsoelim.c. Sun May 13 17:17:32 BST 2001 Colin Watson * man/Makefile.in: Another try to get NLS installation working properly. The last change was wrong when LINGUAS was unset. * GNUmakefile.in (dist): Install docs/manpage.example. Sun May 13 16:54:01 BST 2001 Colin Watson * man/Makefile.in: Exclude NLS directories without man pages, as CVS can't delete directories quite as fully as I'd like. * configure.in: No subdirectory Makefiles need ALL_LINGUAS any more. * manual/Makefile: Make the location of soelim variable so that distributions can e.g. use the version in the build directory. * manual/Makefile, manual/README: Add an HTML target. Disabled by default as groff's HTML driver doesn't produce very good output yet (as of 1.16). * include/Defines.in: Only remove /usr from the default sysconfdir if the prefix is exactly /usr, not something that happens to contain /usr (like the default /usr/local). Sun May 13 13:39:17 BST 2001 Colin Watson * man-db.gnu, man-db.lsm: Mention move to SourceForge and the new URLs for the Debian package pool. * man-db.gnu: New architectures (successful Debian ports as of today). New mailing list for announcements. Sun May 13 13:18:56 BST 2001 Colin Watson * README: Document FHS changes; correct pointer to docs/INSTALL.autoconf. * docs/INSTALL.autoconf: Update to instructions from automake 1.4. * docs/COPYING: Minor fixes from GNU (FSF address, Y2K). Sun May 13 13:00:17 BST 2001 Colin Watson * GNUmakefile.in (dist): Add include/sections.list. * GNUmakefile.in, man/Makefile.in: Cause USE_NLS to be substituted properly from configure. * include/Defines.in: Remove some old gencat definitions. * docs/NEWS: Update in preparation for 2.3.18 release. Correct a few it's -> its typos in earlier entries. Sun May 13 02:18:00 BST 2001 Colin Watson * autogen.sh: Create stamp-h.in. * po/cs.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/ja.po: Update with msgmerge. Sun May 13 02:03:05 BST 2001 Colin Watson * docs/ToDo: Most of Wilf's beta code is in now; mention SuSE. Sun May 13 01:22:29 BST 2001 Colin Watson * docs/manpage.example: New file. Sun May 13 01:19:47 BST 2001 Colin Watson * include/manconfig.h.in: Bump database version from 2.3.1 to 2.3.2. * libdb/db_ver.c (dbver_wr): Reformat. (dbver_rd): Downgrade warnings about wrong version numbers to debugging messages. * libdb/db_lookup.c (split_data): Fix fencepost error that would overlook a missing whatis field. * src/man.c (try_db_section): Display warning if whatis refs are relied upon to find a page. * libdb/db_storage.h: Note that WHATIS_MAN and WHATIS_CAT are deprecated. * src/accessdb.c (main): Give FHS_CAT_ROOT priority over CAT_ROOT. * man/man8/accessdb.man8 (DESCRIPTION): Document this. * man/de_DE.85591/man8/accessdb.man8 (DESCRIPTION): Likewise. * man/de_DE.ascii/man8/accessdb.man8 (DESCRIPTION): Likewise. * man/es_ES.88591/man8/accessdb.man8 (DESCRIPTION): Likewise. * man/it_IT.88591/man8/accessdb.man8 (DESCRIZIONE): Likewise. * src/check_mandirs.c (testmandirs): Tidy up database opening code. * src/mandb.c (mandb): Don't create a new database if opt_test is set. (main): If opt_test is set, just delete the temporary database rather than moving it into place. * man/man8/mandb.man8 (OPTIONS): Document --test. (FILES): Document FHS compliant database locations. (AUTHOR): Add myself. * src/ult_src.c (ult_softlink): Remove overly-cautious check for non-local symlinks in mantrees. * src/whatis.c (apropos): Remove a now redundant test that cont.dptr is non-NULL. Sun May 13 01:00:47 BST 2001 Colin Watson * src/whatis.c (apropos): Complain and exit if a data pointer is NULL. For this, locally undefine BTREE to avoid using optimized functions, as they don't appear to provide enough error checking yet. Fri May 4 03:59:08 BST 2001 Colin Watson * configure.in: Change PACKAGE from man-db to man_db. * po/*.po: Update with msgmerge. * release.sh: New file (quick release script). Fri May 4 03:44:49 BST 2001 Colin Watson * acconfig.h: Remove Debian-specific entries. * aclocal.m4: Remove, as it's another autogenerated file. * autogen.sh: New file (very simple for now). Fri May 4 03:34:54 BST 2001 Colin Watson * GNUmakefile.in (dist): Update set of installed files somewhat. No need to build man_db-nls.h any more. * man/Makefile.in: Declare ALL_LINGUAS and LINGUAS. * src/man.sh: Remove (obsoleted by src/wrapper.c). Fri May 4 02:56:30 BST 2001 Colin Watson * README: Update for new NLS configuration methods. Reflect renaming of configuration file from man_db.config to man_db.conf. Fri May 4 00:18:23 BST 2001 Colin Watson * stamp-h.in: Remove (generated by GNUmakefile). Fri May 4 00:17:50 BST 2001 Colin Watson * GNUmakefile.in, configure.in, include/Defines.in, libdb/Makefile.in, libdb/db_delete.c, libdb/db_lookup.c, libdb/db_store.c, libdb/db_ver.c, man/Makefile.in, src/Makefile.in, src/lexgrog.l-2.3.8, src/lexgrog.l-2.4a, src/wrapper.c: Dispose of all the old catgets stuff. Replace with gettext idioms where appropriate. * libdb/man_db-nls.h, src/man_db-nls.h: Remove (obsolete with gettext). * include/config.h.in: Remove (generated by autoheader). Thu May 3 01:17:08 BST 2001 Colin Watson * GNUmakefile.in: Strip .po from language names; fix it's -> its typo. * configure.in: Stop trying to guess the package name and version number from the current directory name. Wed May 2 18:38:49 BST 2001 Colin Watson * src/manp.c: Remove #include of security.h (now merged elsewhere). (pathappend): Constify second argument. (mkcatdirs): Eliminate DIRLIST; now takes mandir and catdir as arguments. (add_2_dirlist): Rename to add_to_dirlist(); return void, and otherwise eliminate use of DIRLIST. As mentioned below, we now use a linked list instead. (read_config_file): Update accordingly. * src/security.c: *uid no longer static for now, as other objects use them. * src/man.c: Declare ruid and euid extern here now that security.h is gone. * src/check_mandirs.c (update_db): Close dbf rather than database. Wed May 2 17:27:22 BST 2001 Colin Watson * acinclude.m4: New file. Restore definitions inadvertently removed from aclocal.m4 a few changes ago. * aclocal.m4: Update accordingly with 'aclocal'. * config.guess, config.sub: Move to tools directory. * configure.in: Move gettext macros below AC_PROG_CC etc. * configure.in: Remove Debian-specific code; build dependencies handle this now. Wed May 2 16:41:28 BST 2001 Colin Watson * acconfig.h: Removed some definitions gettext used to need. * Makefile.in (_root): Added ABOUT-NLS to the distribution. Wed May 2 16:31:21 BST 2001 Colin Watson * config.guess, config.sub: New files, synced from today's CVS. Wed May 2 16:28:02 BST 2001 Colin Watson * configure.in, include/Defines.in, man/Makefile.in: Remove use of curdate. * man/it_IT.88591/man1/man.man1, man/ja_JP.eucJP/man1/man.man1, man/man1/man.man1: s/curdate/date/g. Wed May 2 16:15:00 BST 2001 Colin Watson * po/POTFILES.in: Added src/accessdb.c and src/wrapper.c. Wed May 2 15:53:45 BST 2001 Colin Watson * ABOUT-NLS, aclocal.m4, intl/*, po/ChangeLog, po/Makefile.in.in: Update to gettext 0.10.37 (from 0.10.32). Various additions and removals. * GNUmakefile.in, libdb/Makefile.in, src/Makefile.in: Remove old gencat/xcat targets. Wed May 2 01:33:04 BST 2001 Colin Watson * src/mandb.c (main): Initialize security properly, since we may be setuid, and drop privileges when creating temporary databases in user-supplied hierarchies. Thanks to Ethan Benson for reporting this vulnerability. * man-db.gnu, man-db.lsm: Add myself as a developer; change maintainer. * libdb/db_lookup.c, src/man.c: Cosmetic fixes. * src/accessdb.c (usage): Remove spurious space in output. Wed May 2 01:02:19 BST 2001 Colin Watson * Merging in changes from Wilf's 2.3b12 beta release. * docs/ChangeLog: Folded in changelog comments. * GNUmakefile.in, configure.in: Build configuration file. * */Makefile.in: Rearrange code for CPPFLAGS and similar. * configure.in: Look for grep, seteuid(), setresuid(). * include/config.h.in: Add HAVE_SETEUID and HAVE_SETRESUID. * include/manconfig.h.in: Add GREP and various grep flags. * src/whatis.c: Use GREP rather than "grep". * src/man_db.config: Renamed to src/man_db.conf.in. * src/man_db.conf.in: Add commented out DEFINE directives. * docs/ToDo: Need to document DEFINE directive. (Also, I (cjwatson) checked in two other todo items by mistake earlier: inline pipelines and merging work done by Wilf and Andries.) * include/Defines.in: CPPFLAGS tweaks; rename config file; %.i rule. * include/comp_src.h.in: paths.h -> ./manconfig.h. * src/security.c, src/man.c: Rewrite seteuid() handling; remove special "running as root" case. * src/security.h: Remove; combine previous contents with security.c. * src/man_db-nls.h: No longer need man_CHOWN. * include/manconfig.h.in: Add init_security() prototype. * src/manp.c: Major rewrite. Replace static storage with linked list. Improve configuration file handling, replacing get_dirlist() with read_config_file(). Move some of the more deeply nested bits of read_config_file() into separate functions like add_mandb_map(). (cjwatson: This won't compile yet. Fabrizio also hacked on this heavily, including splitting part of get_dirlist() out into add_2_dirlist() and adding mkcatdirs(). I've merged these as best I can for now, but it's still unfinished.) * src/manp.h: Remove get_dirlist() prototype, add prototypes for read_config_file() and get_def(). * src/man.c, src/mandb.c, src/straycats.c, src/whatis.c: Use new get_defs() functions to pull paths from config file rather than hard-coding them. Fri Apr 27 22:39:34 BST 2001 Colin Watson * Merging in changes from Wilf's 2.3.11 release. * docs/ChangeLog, docs/NEWS: Folded in changelog comments. * GNUmakefile.in: Added deroff and manual targets. * README: Added comment about manual; added notes on configure flags. * configure.in: Minor improvement for non-GNU makes. * src/lexgrog.l, src/lexgrog.l-2.4a: Allow comments other than at the beginning of a line. * src/manp.c: Replace has_subdirs() with has_mandir(): for $PATH components not in config, check for ../man as well as man subdirs. * zsoelim/zsoelim.l: Use #defines for exit codes. * GNUmakefile.in, README, docs/INSTALL.quick, src/man.c: Cosmetic rearrangements (whitespace, typos, etc.). Fri Apr 27 21:36:11 BST 2001 Colin Watson * manual/*: Add the source code for the man_db manual from Wilf's FTP site. Fri Apr 27 18:33:17 BST 2001 Colin Watson * src/accessdb.c (main): Close the database and set dbf to NULL if dbver_rd() fails. * src/check_mandirs.c (update_db): Likewise. * src/man.c (try_db): Likewise. * src/straycats.c (straycats): Likewise. * src/whatis.c (search): Likewise. Fri Apr 27 18:10:47 BST 2001 Colin Watson * src/lexgrog.l: Detect grap (.G1) and vgrind (.vS). * include/manconfig.h.in: Add GRAP_FILTER and VGRIND_FILTER to filter enum. Fri Apr 27 18:00:04 BST 2001 Colin Watson * New maintainer. * man/man1/man.man1 (HISTORY): Update some dates, add myself. * man/it_IT.88591/man1/man.man1 (HISTORY): Likewise. * man/ja_JP.eucJP/man1/man.man1 (HISTORY): Likewise. * man/de_DE.88591/man1/man.man1 (HISTORY): Update some dates. * man/de_DE.ascii/man1/man.man1 (HISTORY): Likewise. * man/es_ES.88591/man1/man.man1 (HISTORY): Likewise. * ja_JP.ujis/man1/apropos.man1: Remove (superseded by ja_JP.eucJP). * ja_JP.ujis/man1/man.man1: Likewise. * ja_JP.ujis/man1/manpath.man1: Likewise. * ja_JP.ujis/man1/whatis.man1: Likewise. * ja_JP.ujis/man1/zsoelim.man1: Likewise. * ja_JP.ujis/man5/manpath.man5: Likewise. * ja_JP.ujis/man8/accessdb.man8: Likewise. * ja_JP.ujis/man8/catman.man8: Likewise. * ja_JP.ujis/man8/mandb.man8: Likewise. Tue Apr 17 15:23:30 BST 2001 Colin Watson * End of the Great CVS Sync. * Debian release 2.3.17.1-3. * src/ult_src.c (ult_src): Return an error when ult_softlink() fails. * src/man.c: Use latin1 character set for C and POSIX locales. * po/ja.po: Update Japanese translation. * man/ja_JP.eucJP/man1/apropos.man1: New file, updating Japanese translation in new character set. * man/ja_JP.eucJP/man1/man.man1: Likewise. * man/ja_JP.eucJP/man1/manpath.man1: Likewise. * man/ja_JP.eucJP/man1/whatis.man1: Likewise. * man/ja_JP.eucJP/man1/zsoelim.man1: Likewise. * man/ja_JP.eucJP/man5/manpath.man5: Likewise. * man/ja_JP.eucJP/man8/accessdb.man8: Likewise. * man/ja_JP.eucJP/man8/catman.man8: Likewise. * man/ja_JP.eucJP/man8/mandb.man8: Likewise. * man/THANKS: Updated (new Japanese eucJP translation). * src/man.c (main): Support LC_MESSAGES being set differently from other locale categories (internal_locale). * src/man.c (main): Multiple locale preferences can be set with $LANGUAGE. * src/version.c (ver): Remove previous maintainer address. * configure.in: Find version number correctly. Sun Apr 1 14:37:28 BST 2001 Colin Watson * Debian release 2.3.17.1-2. * src/whatis.c (main): Disable regex searches if -w (wildcard) option is given. * docs/ToDo: Using zlib rather than gzip would be good. Sat Mar 31 18:07:46 BST 2001 Colin Watson * Debian release 2.3.17.1-1. * src/check_mandirs.c (test_manfile): Check if the result of symlink and hard link resolution is in the cache before looking for .so links. This provides a substantial speedup when many symlinks exist in the mantree. * src/catman.c (main): Initialize full locale by calling setlocale() with LC_ALL rather than LC_MESSAGES (GOTO Masanori). Remove manual getenv() calls accordingly. * src/man.c (main): Likewise. * src/mandb.c (main): Likewise. * src/manpath.c (main): Likewise. * src/whatis.c (main): Likewise. * include/manconfig.h.in: Add 3perl to section names, following 3pm; Debian is using this to allow other packages to shadow pages from core Perl packages. Wed Feb 28 21:02:41 GMT 2001 Colin Watson * Debian release 2.3.17-3.2. * configure.in: More fixes for Debian troff and /dev/null input files. This restores detection of -mandoc macros. * man/man1/man.man1 (OPTIONS): Typo: "It's" -> "Its". * man/man1/zsoelim.man1 (OPTIONS): Likewise. * man/man1/man.man1 (OPTIONS): Mention that argument to -M must be the root of a mantree. (SEE ALSO): Add reference to man-db manual to explain the above. Wed Feb 21 00:54:47 GMT 2001 Colin Watson * Debian release 2.3.17-3.1. * src/man.c (local_man_loop): Fix format string vulnerability in printing of error message. * src/whatis.c (get_whatis): Fix segfault if whatis reference is NULL. * src/man.c (local_man_loop): chdir() to original working directory so that 'man -l' works again on relative paths to compressed pages. * src/compression.c (decompress): free() file if the decompressor failed so that atexit() doesn't try to remove it again. * src/mandb.c (main): Reverse sense of -s option to agree with the documented intent. * configure.in: Work around change in the behaviour of Debian nroff, which no longer accepts /dev/null as an input file. * GNUmakefile.in: Restore full clean rules. Fri Apr 7 10:50:45 EET 2000 fab (fpolacco@debian.org) * Checked in by Colin Watson during SourceForge CVS sync. * Upstream changes from Debian changelog (2.3.17-2): - Commented away call to distclean_root in GNUmakefile: need to leave the Makefile and configure in the tarball. - Found and fixed subtle bug which made wrapper uselessly linked with -ldb2. When invoked by root on a system which enables group.db, then the call to initgroups() segfaults due to the libc link to libdb! * Other changes not mentioned in Debian changelog: - man-db.gnu: Update date and prerequisites (libdb2 becomes weak prerequisite). - man-db.lsm: New file. - src/lexgrog.l: Cosmetic changes. - src/wrapper.c: Add debugging code. Fri Apr 7 10:50:45 EET 2000 fab (fpolacco@debian.org) * Checked in by Colin Watson during SourceForge CVS sync. * Version: 2.3.17. * Upstream changes from Debian changelog: - Corrected apparent disappearing of option -e in apropos. - Corrected wrong usage of undocumented option -X which produced error when passed to filters. This is now parametrized as optional argument, defaulting to use devX75. Documented in usage : -X = -TX75, -X100 = -TX100, -X100-12 = -TX100-12. - Applyed patch submitted by Tomohiro KUBOTA: - roff_device and LESSCHARSET are determined by user environment rather than language of manpage for English manpage. - roff_device "ascii8" is used for non-English/non-ISO-8859-1 languages. - Added new check for libdb in configure.in - Added /usr/local/{share/}man to config file, due to bug in FHS, thanx to Gregor Hoffleit. - Added new message catalog po file for cs (czech) (4 new messages), thanx to Vladimir Michl. - tired of people continously complaining that man behaves differently than in RedHat (which is "The Reference Linux", you all know that), I'll add tbl as default filter for man. This will fix those three or four manpages that do not take the burden to declare their dependency on the tbl formatter (usually because upstream uses RedHat and so ...). Now what would I do if someone fill a bug against this because of wasting of CPU cicles for un-necessary filtering on the hundreds of pages that do not need tbl? I would certainly agree with them. Therefore I will fix this introducing scanning of manpages a la grog in mandb, and storing the result in the database. ...[noise of hacking and debugging]... Well, I did it (use accessdb to see it!). It took 4 weekend (stolen to the implementation of man 2.4) to complete and debug. Now you can announce the world that man-db 2.3.17 knows in advance which filters to run when processing a manpage which is in the database. Wed Mar 22 16:00:16 EET 2000 fab (fpolacco@debian.org) * Checked in by Colin Watson during SourceForge CVS sync. * Version: 2.3.16. * Upstream changes from Debian changelog: - Applyed patch submitted by Javier Fernandez-Sanguino Pena to permit search of trnlated manpages before giving the first english one found. Mon Feb 28 22:09:09 EET 2000 fab (fpolacco@debian.org) * Checked in by Colin Watson during SourceForge CVS sync. * Version: 2.3.13. * Upstream changes from Debian changelog: - Applied patch to avoid disappearing of index file during regeneration. Thanx to Colin Phipps. - Applied patch to generate secure temporary file in straycat. Thanx to Colin Phipps. Wed Feb 23 22:34:54 EET 2000 fab (fpolacco@debian.org) * Version: 2.3.12 * New maintainer. * find the huge list of changes (in three years) in file debian/changelog. Wed Sep 27 23:59:05 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3b12 * src/manp.c: replace static storage with linked list * src/security.h: removed/combined with security.c * src/security.c, src/man.c: re-write seteuid() handling: remove special "running as root" case * src/whatis.c: use GREP rather than "grep" * include/manconfig.h: many #DEFINE additions * configure.in: look for grep, seteuid(), setresuid() * GNUmakefile.in, */Makefile.in: minor modifications * include/Defines.in: modifications * src/man_db.config: renamed as src/man_db.conf.in * src/man_db.conf.in: add commented out DEFINE directives. Thu Sep 21 19:33:58 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.11 * manual/*: bundle the source code of the man_db manual Wed Sep 20 16:17:19 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/manp.c: replace has_subdirs() with has_mandir(): for $PATH components not in config, check for ../man as well as man subdirs. * various: small bug-fixes from Markus, Joey (joey@infodrom.north.de), Lionel (cons@dxcern.cern.ch) * src/util.c: when checking man/cat timestamps, compare mod time of cat with latest of mod or create time of man: If untar new man page with old timestamp, still reformat. Thu Jul 13 11:29:32 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.10 * src/apropos.c: fix for #undef REGEX regarding int regex * src/lexgrog.l: default to new version. * src/README.lexgrog: new. * configure.in: all echo's through MAN_ECHO() for --quiet. * various: apply patch from Carl Edman (cedman@princeton.edu), port to NeXTstep and misc small fixes. Fri Jun 16 11:12:08 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.9 Wed Jun 14 17:08:41 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (make_display_command): fix command when ascii==1 * src/man.c (display): don't return 1 on skip if local_man_file==1 * man/Makefile.in: force make to resolve the program name strings (which are sed commands) once only. * configure.in: don't exec pager (too many side effects) Sun Jun 4 13:51:22 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.8 * various: apply patch from CERN to allow globbed support for HPUX, OSF and SOLARIS system manual page hierarchies. * GNUmakefile.in: add hook for `make check' Mon May 29 18:57:24 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/whatis.c (main): if $POSIXLY_CORRECT is in effect, default to case-less extended regex searches for apropos as specified by POSIX 1 * man/man1/apropos.man1: document above change. * src/whatis.c (apropos, parse_name): ensure case-less matching on manual page name aswell as it's whatis for apropos. * all manual pages: replace instances of program with %program% and arrange to do a sed replacement with the actual name of the program, chosen by the installer. * zsoelim/zsoelim.l: fix recursion detector. * src/lexgrog.l (newline_found): new. Mon May 22 20:07:17 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * nls/de_DE.88591/*.m: from Lars Fenneberg (li@gimli.comlink.de) * src/Makefile, libdb/Makefile: fix -DNLS * src/man.c (LESS_PROMPT): Make " Manual page" a translatable message. * man/de_DE.ISO_8859-1: rename as man/de_DE.88591 * nls/THANKS, man/THANKS: new. * src/whatis.c: If $POSIXLY_CORRECT, force apropos to do extended regex matching. Sat May 20 12:27:47 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c: if -f or -k, simply execv() the program, passing the entire argv[] to it. * man/man1/man.man1: document change. * src/whatis.c: ignore -f, --whatis, -k and --apropos Sat May 13 18:10:50 BST 1995 Markus Armbruster * Version: 2.3.7 * lib/cleanup.c (pop_all_cleanups): new * src/man.c, src/security.c: use pop_all_cleanups() in children. * general: use fork() instead of vfork() in situations where vfork() could cause problems. Tue May 9 23:30:58 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * manual pages: aesthetic/grammer changes. * flex files: process with flex-2.5.2 Mon May 8 11:15:07 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * include/manconfig.h.in: #define some exit codes. * all sources: use the codes. * English manual pages: add EXIT STATUS section where appropriate * src/man.c (make_display_command): back out execing the pager as PAGER does not have to be a simple program name. * configure.in: prepend "exec " to the default pager. * src/mandb.c: fix stupid bug where global databases remain owned by the creator in all circumstances. Clean up. * src/straycats.c, src/check_mandirs.c: homogenized and re-worded messages emitted by mandb. Mon May 8 11:15:07 BST 1995 Markus Armbruster * lib/cleanup.c, lib/cleanup.h: new functions. Install sighandler, initialise and operate a stack of cleanup funcs callable on exit(). * src/mandb.c, src/man.c: modify to use cleanup functions. Tue Apr 25 20:21:51 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.6 * src/whatis.c: new, replaced with edited version from 2.4 alpha source tree. Apropos now does _real_ word matches. * man/man1/apropos.man1: remove description of option -e. Mon Apr 24 17:26:54 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (get_section_list): Ignore empty $MANSECT. * src/man.c (main): if (!*pager) pager = CAT; * libdb/db_storage.h, include/manconfig.h.in, src/check_mandirs.c, src/straycats.c: small modifications to fix broken FAVOUR_STRAYCATS behaviour and properly handle situation when STRAYCAT and WHATIS_CAT share namespace. Move definition of FAVOUR_STRAYCATS to include/manconfig.h.in. From Zoltan. * zsoelim/zsoelim.c: exit 1 on command line file open failure. * src/man.c (man_getopt): consolidate incompatible option parsing. * src/man.c (usage): update wrt. option parsing. * src/man.c (display): only prompt/attempt display if found==1. * src/man.c (make_display_command): exec the pager. Fri Apr 21 15:16:59 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.5 (public release) * src/whatis.c: fix a couple of problems caused by whatis/apropos split. * configure.in: remove determination of viable gencat program, always use our own. Wed Apr 19 09:53:27 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * GNUmakefile.in: renamed Makefile to differentiate between GNU make and others. * configure.in: create bogus ./makefile to catch non GNU make programs. Mon Apr 17 11:06:32 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.4 * src/man.c (format_display_and_save): don't save cat if formatting process fails and/or produces nothing. Sat Apr 8 18:02:52 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/mandb.c: change #ifdef SECURE_MAN_UID to #if defined(SECURE_MAN_UID) && defined(MAN_DB_UPDATES) as the databases should be owned by their creators if man is not responsible for updating them. * src/man.c: minor changes regarding MAN_DB_UPDATES * include/manconfig.h.in: update CATMODE and DBMODE w.r.t. recent MAN_DB_UPDATES/MAN_CATS definitions. * src/mandb.c: changes to operation. Work on a temporary copy of the database, then rename() to actual database. Catch SIGINT, SIGTERM and remove the temp copy if necessary. * src/compression.c (decompress): kill(getpid(), SIGINT) instead of exit(0) if child (decompressing man page) fails. * src/straycats.c (check_for_stray): kill(getpid(), SIGINT) instead of exit(0) if child (decompressing cat page) fails. * libdb/db_lookup.c (make_content): ndbm limit is 4k not 1k. Mon Apr 3 20:52:06 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * docs/NEWS: new * README: more Linux-system information. * configure.in, acconfig.h: #define NDEBUG if !--enable-debug * include/Defines.in: comment out @LEXLIB@, not required in link stage. Sun Apr 2 17:42:02 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3.3 * README: add sections referring to default preprocessors and system specific notes. * xcat/xcat.l, zsoelim,zsoelim.l, src/lexgrog.l: process with flex-2.5.1 Fri Mar 31 17:12:44 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/whatis.c (display): add free(string) * src/whatis.c, src/Makefile.in: produce separate object files for apropos and whatis so that the programs know which one they are regardless of actual program-filename. * All Makefile.in, include/Defines.in: append CPPFLAGS supplied to ./configure or make to the standard $(CPPFLAGS) variable. Allows configuring with unusual #include directories, eg. CPPFLAGS=-I/usr/src/gdbm LDFLAGS=-L/usr/src/gdbm ./configure * configure.in (--with-db=LIBRARY): override the default database interface library on systems having a choice. Options={db,gdbm,ndbm} * configure.in: Re: sec 5.6 of the autoconf manual, replace (if test a=b -o a=c) with (if test a=b || test a=c) Tue Mar 28 16:44:46 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.3b2 * lib/flock.c, lib/flock.h: New. flock() wrapper to fcntl() for systems that lack flock(). * xcat/xcat.l: #include "manconfig.h". For systems not supporting __inline__ * include/Defines.in (%.d : %.c): modify rule to account for C compilers other than gcc * All Makefiles.in (cd $dir && $(MAKE)): change to $(MAKE) -C $dir * nls/Makefile.sub.in: merge into nls/Makefile.in Mon Mar 27 22:42:53 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/globbing.c (look_for_file): don't rely on GLOB_NOMATCH as AIX doesn't have it. * configure.in, include/manconfig.h.in (man_ac_version): new, replaces ac_version and is more robust * configure.in, aclocal.m4: rename non-autoconf macros so that future versions of autoconf won't clash * gencat/gencat.c, gencat/genlib.c: tidy up header includes and remove unused variable definitions * configure.in: check for gencat Mon Mar 27 12:51:47 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.3b1 * src/man.c: small HAS_TROFF/NROFF_MISSING changes from Markus. Thu Mar 23 18:09:46 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c: man will only _create_ user db's if MAN_DB_CREATES is #defined (It is not defined by default) * add ability to install programs/man pages with transformed names. ie --program-prefix=PREFIX, --program-suffix=SUFFIX and --program-transform-name=EXP arguments to configure are now observed. * src/man.c (try_db): store an info->addr==NULL entry in the hashtable if we fail to access this db. Only try to open the db once. If the db access succeeds, but the lookup fails to find anything, store info==NULL in the hashtable. * libdb/db_ver.c (dbver_rd): don't die if wrong version. Issue a message, return 1 and let the caller decide what to do. Mon Mar 20 16:13:23 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/whatis.c (get_whatis): new. Use the pointer member of mandata structure to access the whatis string. (display): modify to use get_whatis(). * src/checkmandirs.c (splitline): don't store whatis referenced `whatis' lines in the db. * libdb/db_lookup.c (make_content): store a NULL whatis as "" rather than "-". Sun Mar 19 16:37:58 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/lexgrog.l: wipe out roff comment lines (again). * src/whatis.c: use BSD style regex if POSIX unavailable. Ignore --regex if neither available. Fix failed-regex-compilation error message. * lib/regex.c, lib/regex.h: remove * configure.in: account for regex changes. * libdb/db_delete.c (dbdelete): don't barf on delete request of a multi-key that is not listed in the main key, return NO_ENTRY. * src/man.c (try_section): don't try to delete db entry for missing straycat. Return 0 and leave that to the caller. Sat Mar 18 12:31:48 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Replaced strncasecmp() calls with strncmp(). Removed partial support for man dirs named .../MAN. * lib/{alloca.c,putenv.c,memcmp.c}: new lib/{getopt.c,getopt1.c,getopt.h,error.c,xstrdup.c,xmalloc.c}: newer replacements * All Makefile.in, include/Defines.in, include/manconfig.h.in: use standard (GNU coding) installation variables: bindir, sysconfdir, man?ext, man?dir, localedir, manroot. These variables, along with prefix and exec_prefix may be specified on the `make' command line. * configure.in: move definition of BINDIR and config_prefix to include/Defines.in to allow dynamic evaluation. Rename config_prefix to sysconfdir. * libdb/db_lookup.c (list_extensions): fix return count. * libdb/db_delete.c (dbdelete): take account of situation where there were multiple name entries and they are subsequently deleted. When deleting the last one (which still has a multi-key entry), delete the standard key too, rather than recomputing it's content (which would be nothing and cause a "corrupt db" message). Fri Mar 17 23:36:44 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (glob_for_file, make_names): remove src/globbing.c: new file lib/glob.c, lib/glob.h, lib/fnmatch.c, lib/fnmatch.h: replacements from GNU glob.tar.gz configure.in: glob changes. Use POSIX glob replacement. Allow --extension to be used in globbing environment. Don't search for cats in alternate cat directory if no index. * All Makefile.in: add standard (GNU coding) targets: all, clean, mostlyclean, distclean, realclean, install, uninstall, TAGS, dist Other configuration/goal modifications * Makefile.in: force config.status to do selective re-creation * src/zsoelim.l: cater for ".SH \f?NAME\f?" * acconfig.m4 (AC_FUNC_PCLOSE), src/man.c (display): small changes from Markus * Makefile.in, README: change `make all' to equal `make nls=off' rather than `make nls=all' * include/Defines.in: move -DDEFAULT_MANROFFSEQ to include/manconfig.h * include/manconfig.h: change inline parsing. Use autoconf-2.2 Thu Mar 16 12:38:15 GMT 1995 Markus Armbruster (armbru@pond.sub.org) * Version: 2.2a20 * zsoelim/zsoelim.l: general fixes * configure.in: don't add -lc as library containing db routines. * lib/glob.c: ultrix fixes * lib/rename.c: replacement * lib/strappend.c: small fix and copyright notice Wed Mar 15 11:17:58 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/lexgrog.l: modifications to whatis parser, mainly for stray cats. * src/man.c (main): add drop_effective_privs() and regain_effective_privs() around manpath configuration so that users' `hidden' manpaths are found and used. * substantial configuration changes regarding all Makefiles to allow `alternate build directory' support. man_db may be built in *any* directory. Aids multi-architecture builds and testing of various configuration options. * rationalised source files to #include "local_header" and #include . CPPFLAGS uses -I- to limit -I paths to "" resolving only. Other alternate build directory mods. * src/comp_src.h.in: moved to ./comp_src.h.in src/manconfig.h, src/path.h.in: combined into ./manconfig.h.in * *ensure* that lib/{regex,fnmatch,getopt}.h are only #included if the replacement c source is used. Otherwise use system routines and system headers. * ./configure.in, acconfig.h, aclocal.m4 (AC_FUNC_PCLOSE, BROKEN_PCLOSE): new autoconf macro * gencat is not installed by default. (cd gencat && make install) * tools/mkcatdirs: re-written tools/checkman: new utility to check for duplicate manual pages across manual page hierarchies. * docs/INSTALL, README: new * src/man.c (display): attempt to open tmp_cat_filename(), if unable, don't try to save cat. Sun Mar 12 18:12:13 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a19 * all source (main): replace mkprogname(%s) with xstrdup(basename(%s)) * src/util.c (strappend): remove * lib/strappend.c: new Mon Mar 6 20:05:27 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (--local): re-enable support for compressed local files. eg `man -l foo.1.gz' * src/man.c (make_roff_command): Check in alternate catdir then mandir for external format script if ALT_EXT_FORMAT #defined. * zsoelim/zsoelim.l: partial rewrite to mimick GNU soelim `bad roff request' error behaviour. Mon Mar 6 13:51:32 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c: fix SEGV if arg --local used * src/man.c (gripe_system): exit with errorcode of failed command Sun Mar 5 20:54:13 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a18 * src/catman.c (main): check individual cat directories for existence and perms. * src/man.c (commit_tmp_cat): fix SEGV * src/man.c: NO_MAN_UPDATES & NO_MAN_CATS #defined code regions for experimental CERN use, untested and incomplete. * configure.in, src/Makefile, src/paths.h.in: undo bogus dependance on NLS for output device=latin1. * configure.in (--with-device=): new option to select default nroff output device. Test that nroff can handle selected output device (if any). Thu Mar 2 19:30:45 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/lexgrog.l (too_big), (add_str_to_whatis), (add_char_to_whatis): new functions (find_name): add extra argument. add string bounds checking, add new condition to terminate NAME section: \n{W}*\n+.+ * src/check_mandirs.c, src/straycats.c, src/manconfig.h: change callers of find_name(). * src/man.c (try_db_section): warn of re-cache failure, but don't exit. lots of changes/simplifications w.r.t. global/user hierarchies. global_manpath == 1 for global hierarchy, global_manpath == 0 for user. global_manpath is set once we know which hierarchy we are displaying from. Tue Feb 28 13:34:15 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (display): fix SEGV. * src/util.c (strappend): allow realloc of NULL string. * src/man.c: replace strappend(xstrdup("string"), ...) with strappend(NULL, string, ...) * src/straycats.c (check_for_stray): allow any supported straycat compression extension if COMP_SRC is #defined. Replace static buffers with dynamic. * src/check_mandirs.c, src/whatis.c: replace static buffers with dynamic. * src/util.c: (mkdbname): new function. src/*.c: replace static database[PATH_MAX] with mkdbname() calls. Sun Feb 26 20:58:59 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a17 * src/whatis.c: warn if no index or whatis db's available. * src/man.c: Fixes to setuid/privs code regarding user manual trees and ruid==0 from Markus. * configure.in: add checks for AIX, USG, stdlib.h, MINIX, ISC_POSIX * lib/glob.c: ensure that _POSIX_VERSION can be defined Sun Feb 19 12:38:10 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a16 * Various portability fixes provided by Philippe Defert (defert@cern.ch) * FSSTND changes regarding /usr, /var/catman searching * Some header file re-arrangement to aid user configuration. Sun Feb 12 15:00:44 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a15 Sat Feb 4 10:54:21 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * man(1), manpath(5): revisions. Thu Feb 2 23:36:20 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/catman.c (do_access): new * src/man.c (do_chown): new catman changes, don't do_prompt() if print_where==1 * src/manp.c: changed an !is_directory() to is_directory() != 1 Sat Jan 28 09:39:07 1995 Markus Armbruster (armbru@pond.sub.org) * man.c: **changes** ?? Sun Jan 22 16:15:04 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a14+ * configure.in, libdb/mydbm.h libdb/db_gdbm.c: if using gdbm, explicitly test for gdbm_exists() rather than use header #defines. * man/man1/mandb.man1, man/man1/catman.man1: moved to man/man8 and renamed. * apropos(1), whatis(1), manpath(1), zsoelim(1), catman(8), mandb(8) manual pages: significant revisions. Sat Jan 21 14:33:28 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * incorporate Markus' changes with my post 2.2a13 changes. * src/version.c (ver): fix, use fprintf() instead of error(). Thu 22 Dec 1994 15:12:38 +0100 1994 Markus Armbruster (armbru@pond.sub.org) * src/man.c (make_roff_command, make_display_command, open_cat_stream, close_cat_stream, display, find_cat_file, checked_system, get_preprocessors): new functions * src/man.c (format_and_display, format_and_display_file, display_cat_file, parse_roff_directive, add_directive): removed functions * src/man.c (glob_for_file, make_name): made consistent. * src/util.c (strappend): new function. (do_system_command): changed/renamed to do_system(). * src/manp.c (global_catpath): replaced/fixed * src/security, src/fake_security (do_system_command_drop_privs): renamed to do_system_dropped_privs(). * lib/rename.c: new file Mon Jan 9 20:42:38 GMT 1995 Wilf. (G.Wilford@ee.surrey.ac.uk) * nls/Makefile, man/Makefile: allow for bogus or non existent native languages passed in $nls. * src/man.c (do_prompt): replaced with less friendly but more portable version. * inline directives replaced with __inline__ to be more ansi. Mon Dec 19 12:59:28 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a14 * aclocal.m4, configure.in: don't define variable nroff_device * src/Makefile, src/paths.h.in: define GNU_NROFF_DEVICE. If nls != off, GNU_NROFF_DEVICE=" -Tlatin1" else, GNU_NROFF_DEVICE=" -Tascii" * src/man.c, src/catman.c, src/security.c: #include if available. _exit() from child rather than exit(). Sun Dec 18 17:54:22 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/util.c (basename): removed lib/basename.c: extracted from src/util.c configure.in: check for/replace basename function if necessary. * src/catman.c (add_arg): replace strdup() with xstrdup(). * soelim/soelim.*: renamed zsoelim/zsoelim.* * manual pages: reflect soelim - zsoelim name change. Fri Dec 16 12:17:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * configure.in: correctly determine db header and required library * src/man.c (main, do_extern): pass manpath to whatis / apropos in case man was called with -M or -m. * src/catman.c (main): interrogate $MANSECT for manual sections. * man/man1/catman.man1, man/man1/man.man1 ($MANSEC): replace with the correct variable - $MANSECT. * src/man.c: new option (-7 or --ascii) passes page through minimal latin1 to ascii translator. Only useful for nroff written in ascii and formatted with -Tlatin1. * man/man1/man.man1: document it. * src/man.c (make_command): new routine to piece together man's system() call. Thu Dec 15 13:52:42 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a13 * src/catman.c (parse_for_sec): only supply man with -L locale arguments if locale!=0x0 * src/Makefile: fix libmandb.a rule Wed Dec 14 22:49:59 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version 2.2a12 * major package restructure with creation of new subdirectories for xcat and the db routines. Allowed split up of single db source file into some constituent function parts. * some Makefile restructuring to allow arbitrary ordering of subdirectory builds. * ./dblib/*, ./xcat/*: new or moved from src/. * src/db_storage.c: moved and split up into ./dblib/*.c src/mydbm.h, db_storage.h: moved into ./dblib src/nls.h: moved to ./nls.h src/xcat.c, src/xcat.l, src/Register: moved into ./xcat Wed Dec 14 00:17:11 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/manconfig.h: #include for size_t declaration. * src/checkmandirs.c (reset_db_time): remove use of strerror() in debug line for systems without it. * src/manp.c: ensure no warnings given if quiet==1 Tue Dec 12 22:10:07 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/xcat.l: allow duplicate message id's to exist in single C source file, do not duplicate in the relative message file or src/man_db-nls.h. Warn of such duplications as they may be in error. Tue Dec 12 19:05:21 GMT 1994 Markus Armbruster (armbru@pond.sub.org) * configure.in: fix definition of BINDIR when --prefix not used * src/man.c: replace "export foo=bar" with "foo=bar; export foo" in system() command * soelim/Makefile: do not backup old soelim before install * lib/error.h: new * convert all error message to the form error(int exitcode, int errno, char *message) where exitcode!=0 causes exit(exitcode) after message and errno!=0 causes the error text to be appended to the message. All messages have ": " prepended. * all C source: #include "../lib/error.h" and replace prognam with program_name. * src/db_storage.c (ndbm_flopen, btree_flopen): generalised (ndbm_trun_open, btree_trunc_open): removed (ndbm_flclose): new * src/gripes.c: functions copied to relevant caller. src/gripes.c, src/gripes.h: removed Sun Dec 11 15:16:42 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a11 (not released) * src/man.c (main): putenv("LESSCHARSET=latin1"), remove from less_options[] * src/lexgrog.l: translate \\[ ] (escaped space) to space, accept '\" as *roff comment, add a space at *roff end-of-line if necessary. Sat Dec 10 21:37:41 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * man/man1/catman.man1: new * soelim/soelim.man1: new * src/man.c (display_cat_file): if (COMP_SRC), support straycats with any supported compression extension or none at all. src/man.c (make_cat_file): replace execle() with execve(). * src/catman.c: added ARG_MAX support and use execve() instead of system(). This should now behave on systems with small execve() argument capacity by batching more, but smaller, man jobs. * Makefile: `make all' now equates to `make nls=all' Thu Dec 8 00:03:12 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a10 * src/catman.c: new utility. src/man.c (main): minor changes wrt --catman flag. * src/paths.h.in (MAN_BIN): add definition for catman. * dvi/: provide dvi files of the packages' manual pages. Tue Dec 6 20:58:19 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * man/man.man1: addition of EXAMPLES section. * src/man.c (do_prompt): change message. src/man.c (need_to_rerun): make -u really force an update. src/checkmandirs.c (reset_db_time): new function. * src/mydbm.h, src/db_storage.c (ndbm_flopen, ndbm_trunc_flopen): provide file locking mechanism for ndbm. src/db_storage.c (btree_trunc_flopen): renamed (btree_trunc_open), add mode argument to open() call. * src/db_storage.c (make_content): add `static' to declaration of (dash). * src/man.c (try_db_section): ensure db found file entry is consistent with the physical file, if not, update the db entry before proceeding. Cache consistency should be getting much better in a wide variety of circumstances now. This check is not performed for straycats. Tue Dec 6 12:05:57 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * man/man.man1, man/mandb.man1: large changes. * aclocal.m4, configure.in (AC_PROG_GNU_ROFF): test for GNU nroff src/man.c: Do not use col with GNU nroff -Tlatin1 as (a) it is not needed: see grotty(1) and (b) it is not 8 bit clean. continuation dashes should now reappear. Wed Nov 23 16:49:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/check_mandirs.c (test_manfile): Provide better checking for the existence of both foo.1 and foo.1.gz type problems. This should catch any problems earlier and relieve the db interface code of the job of identifying such problems. * src/man.c (manopt_to_env): cater for $MANOPT option arguments that contain spaces (for -r). src/man.c (man_getopt): revise, change duplicate option behaviour, modify -[tTZ] handling and add option -D. src/man/man1/man.man1: document. * src/man.c: create LESS_OPTS and LESS_PROMPT and move their definitions to src/paths.h[.in]. * configure.in: append -s by default to whatever pager is found. favour db.h and -ldb above gdbm.h and -lgdbm. N.B. db creates index.bt gdbm creates index.db ndbm creates index.dir and index.pag Wed Nov 23 16:46:59 GMT 1994 Zoltan Hidvegi (hzoli@cs.elte.hu) * src/man.c: changes relating to (less_options) and (prompt). Add command line support for less' prompt: option -r. * man/man1/man.man1: document it. Sat Nov 19 20:19:39 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a9 * src/mydbm.h, src/db_storage.c: incorporate completely new database type: a binary tree method using the Berkeley db-1.85.1 library. Currently experimental and is not used by default, it has the potential of enhanced speed and easy maintenance as it allows storage of identical keys, thus reducing the amount of work necessary to store and lookup multi sectional manual pages such as manpath.1 and manpath.5. During initial tests, the `walk through' algorithm, used in apropos searches was 65% faster and the general database open function is 100% faster when compared with gdbm-1.7.3. * src/whatis.c (apropos): #define-optimised for btree database type. * src/convert_name.c (convert_name): reorder actions to stop certain catfiles ending up with a double compression extension, for instance: foo.1.gz.gz. * src/Makefile, src/man.c: enable -DNO_DEFAULT_TBL_OR_COL as an experiment. Fri Nov 18 21:00:47 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a8 (not released) * configure.in (config_file, config_prefix): Fix behaviour. * src/*.[cl], soelim/soelim.l: s,malloc,xmalloc,g s,realloc,xrealloc,g s,strdup,xstrdup,g src/manconfig.h: remove redefinitions of malloc, realloc and strdup. Thu Nov 17 22:01:11 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/lexgrog.l: changed catfile whatis extraction rules to be a little more forgiving. Increased char array size from 1024 to 2048. * mkcatdirs: shell script to create relative cat dirs. * src/$PROGS: replaced all occurances of `optional_argument' with `required_argument' in (long_options). * src/man.c, src/compression.c, src/straycats.c: ensure that a failed child process is recognised and dealt with (normally exit(0)). * src/man.c (make_cat_file): removed need to filter-then-copy if not setuid. [untested] * src/man.c, src/mandb.c (main): optional profiling support if __profile__ defined. * configure.in (config_file, config_prefix): don't work unless --prefix= is a command line option, temporarily setting them to /etc/man_db.config and /etc respectively. Wed Nov 16 20:34:54 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a7 * src/man.c (format_and_display_file): Fix bug which caused `man -l -' to fail. Produce sensible error message when -l file is inaccessable. Allow compressed manual pages to be specified when using -l (must have correct extension) * soelim/soelim.l (main): ensure (progname) is the basename of argv[0] . * src/manpath.c (main): remove local declaration of (quiet). add `--global' option. Wed Nov 16 20:29:20 GMT 1994 Markus Armbruster (armbru@pond.sub.org) * configure.in: if $prefix=/usr, put config file in /etc else put it in $prefix/etc src/manconfig.h (CONFIG_FILE): move to paths.h.in * src/nls.h (LC_MESSAGES): define as (LC_ALL) in all cases where (LC_MESSAGES) is not defined in * src/lexgrog.l: #include "manconfig.h" to redefine strdup() to xstrdup() Tue Nov 15 21:38:19 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/manp.c (is_global_mandir): new src/man.c (locate_page): use it instead of (global_catpath) * src/*.h: add suitable predicates to function prototype declarations moved all function declarations to header files src/compression.h.in: renamed to comp_src.h.in Mon Nov 14 18:17:48 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a6 * src/hashtable.c, src/hashtable.h (struct nlist): replaced (union) member with (void *) and simplified. Modified users. * src/man.c (make_cat_file): fixed NULL ptr reference in call to (execle) src/man.c: determined and fixed memory leaks using Checker. Mon Nov 14 03:33:37 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/db_storage.c (replace_if_necessary, split_data, list_extensions): new src/db_storage.c (free_content): replaced with (free_mandata_struct) all callers changed src/db_storage.c (split_content_keep, split_content_temp): replaced with (split_content) Sun Nov 13 13:50:46 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/nls.h: change of macros, add (NLS_INIT, EXIT_FUNC) src/*.c: removed (NLS_CLOSE) macros, adjustments due to above src/version.c (close_catalogue): new configure.in (AC_HAVE_FUNCS): (atexit, on_exit) * getmandbver.c: removed Sat Nov 12 14:18:02 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/security.h: new, contains security macros from src/manconfig.h src/manconfig.h: removed security macros src/security.c, src/security.h: replaced (SYSV_SAVED_IDS) with (BROKEN_LINUX_SAVED_IDS) * src/paths.h.in, src/compression.h.in, configure.in: changed compression defines src/paths.h.in: defined (STD_SECTIONS), got rid of (MANPATH_MAIN) src/*.c: removed all (MANPATH_MAIN) defines configure.in: added (COMP_CAT) and (COMP_SRC) definitions src/manconfig.h: removed (COMP_SRC) definition * All manual pages: Fixed to be compatible with native *roff implementations having a request argument limit of 6 * src/db_storage.c (gripe_extract_data, gripe_corrupt_data): new routines * All Makefiles: add (exec_prefix, mandir, bindir) where necessary Sat Nov 12 13:38:59 GMT 1994 Markus Armbruster (armbru@pond.sub.org) * soelim/Makefile (install): made more portable * src/manconfig.h: changes to (POSIX_SAVED_IDS) definition * src/man.c (main): removed unnecessary #ifdef conditions regading (SECURE_MANUID) Sat Nov 12 13:24:17 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/ult_src.c (ult_src): no longer follow an absolute .so include src/ult_src.c (test_for_include): new Fri Nov 11 10:16:32 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/man.c (manopt_to_env): generalised * src/man.c (do_extern): removed (gripe_alloc) call, modified callers src/manp.c: removed (gripe_alloc) calls, general tidy src/gripes.c (gripe_alloc): removed * src/ult_src.c (ult_src): fixed loop when (buf) != NULL changed absolute .so include actions configure.in (AC_HAVE_FUNCS): removed (memmove) * src/mydbm.h (copy_datum): added references src/db_storage.c (copy_datum): added function Fixes for `native ndbm' data corruption by Markus Armbruster * src/Makefile: removed dbver.o as dependency of manpath * aclocal.m4 (AC_FUNC_SPRINTF_COUNT): new file and macro configure.in: use it acconfig.h: add (SPRINTF_CHARCOUNT) src/check_mandirs (add_dir_entries): use it src/whatis.c (display): use it * src/check_mandirs.c (test_mandirs): added a (free(exists)) * src/straycats.c (check_for_stray): Fixes regarding straycats with no compression extension Fri Nov 11 00:29:15 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * lib/xmalloc.c, lib/xstrdup.c, lib/error.c: replaced lib/strdup.c: removed lib/strstr.c: replaced lib/strsep.c, lib/strspn.c, lib/strcspn.c, lib/ansidecl.h: new configure.in (AC_REPLACE_FUNCS): with respect to above * src/check_mandirs.c (testmandirs): (free_hashtab) only if necessary Thu Nov 10 11:07:52 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * Version: 2.2a5 * src/man.c (usage, man_getopt, parse_roff_directive, ditroff): add `-Z' option man/man1/man.man1: document it Wed Nov 9 20:16:35 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * configure.in (prefix, nroff, neqn, groff, soelim, CFLAGS, LDFLAGS): portability changes. Suggestions from Markus Armbruster gencat/Makefile (CFLAGS, LDFLAGS): definitions removed * soelim/Makefile (install): procedural changes * src/ult_src.c (ult_softlink): changes regarding S_ISLNK * src/manconfig.h: #define __inline * src/man.c, src/whatis.c, src/nls.c (LC_MESSAGES): define as LC_ALL if necessary Tue Nov 8 23:17:22 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) * src/version.c (ver): aesthetic changes * src/man.c, src/whatis.c, src/manpath.c, src/mandb.c (usage, ver): calling changes * src/version.h, src/update_db: removed * src/convert_name.c (conver_name): argument changes src/man.c (format_and_display): caller of above changed (need_to_rerun, locate_page): new functions to split (man) (format_and_display_nosave): renamed to format_and_display_file * soelim/soelim.l (usage, ver): new functions removal of NLS dependence * Version: 2.2a4