summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
AgeCommit message (Collapse)Author
2012-01-16Backout activation of the new apropos(1)/whatis(1)/makewhatis(8).Ingo Schwarze
In its current state, it causes too much slowdown, in particular during system builds, and there are other regressions. That cannot be fixed quickly while it's enabled. Problems pointed out by espie@, backout requested by deraadt@, diff "looks good" to espie@.
2012-01-15Two details improving the quality of the Xenocara mandoc database,Ingo Schwarze
also helping a bit in ports land: 1) Do not skip manuals for section mismatches; use the section where the file is actually located. 2) Always use the file name as an .Nm search key.
2012-01-14add/fix HISTORY and AUTHORSIngo Schwarze
2012-01-10Continue using the traditional name makewhatis(8),Ingo Schwarze
do not rename to mandocdb(8): Even though there is some additional functionality, the basic purpose remains the same. Requested by espie@; "decide fast" deraadt@.
2012-01-10Rename file from mandocdb.8; no change of content yet.Ingo Schwarze
2012-01-09Stop -W from complaining about MLINKs; only warn when a fileIngo Schwarze
seems inaccessible by its main title. This reduces the number of warnings in base to about 140, which is already low enough to find a couple of actual problems among the noise.
2012-01-09Rename whatis.{db,index} back to mandoc.{db,index}Ingo Schwarze
such that makewhatis(8) called from pkg_delete(1) does not fail trying to open old-style whatis.db files as btree(3). Suggested by espie@ deraadt@ millert@
2012-01-07Improve handling of relative paths, letting invocations like theIngo Schwarze
following one reindex certain files in a local tree: makewhatis -d mytree mytree/*/foo*.*
2012-01-05Enable the new apropos(1), whatis(1), and makewhatis(8).Ingo Schwarze
Unlink the old apropos(1), whatis(1), and makewhatis(8) from the build. Call the new tools from pkg_create(1) and pkg_add(1). "Please enable it now." deraadt@
2012-01-05Do not truncate the production database when starting to build a new one,Ingo Schwarze
because that would break apropos(1) during the build, and if the build fails, you would be left without any database at all. Instead, build the database in temporary files in the same directory and rename(2) them into place when they are ready. Suggested by deraadt@. There is still a tiny race between the two rename(2)s; if that's a problem, we can solve it later using locking. Put this in now such that we can move on.
2012-01-05improve EXAMPLES; feedback and ok jmc@Ingo Schwarze
2012-01-05Small tweaks for precision; lots of feedback from jmc@.Ingo Schwarze
Update usage() as well; reminded by jmc@. Mention the manwhere(1) predecessor in 1BSD; suggested by kristaps@. OK jmc@.
2012-01-04Heads of .It macros in -diag lists are not parsed,Ingo Schwarze
even though .It macros in general are parsed. Fixing a bug reported by deraadt@, based on an incomplete fix by kristaps@, and update the test suite to catch this issue.
2012-01-03Support .St -isoC-2011 to refer to ISO C11.Ingo Schwarze
From Ulrich Spoerlein, tweaked by kristaps@. Werner Lemberg added the same .St argument to groff today.
2012-01-01Add the missing EXIT STATUS section and lots of new informationIngo Schwarze
regarding HISTORY and AUTHORS. ok jmc@
2011-12-28Some parsing improvements from kristaps@:Ingo Schwarze
* Accept multiple lines in cat page NAME parsing. * Do not trim the description to 70 characters in the database. * Instead, limit the length of the description during output. * In man(7), accept \-\- as a Nm-Nd separator; occurs in 3p.
2011-12-26Document whatis(1) -S and -s; leading, trailing, and double colonsIngo Schwarze
in the MANPATH; and the new whatis.index file. Include some synching to apropos(1) and to the usage() string. Use some feedback from jmc@.
2011-12-26Do not skip manuals shared across architectures when building databases.Ingo Schwarze
2011-12-26Copy from src/usr.bin/whatis, not changing the content yet.Ingo Schwarze
Since the code is moving from src/usr.bin/whatis/whatis.c to src/usr.bin/mandoc/apropos.c, the manual will move with it. The old copy will be removed after switching over. ok jmc@
2011-12-25Update the whatis.db database format.Ingo Schwarze
While here, reference apropos(1) from the description, inspired by the makewhatis(8) manual.
2011-12-25State default usage before listing arguments of a utility;Ingo Schwarze
from kristaps@, ok jmc@.
2011-12-25Plug a memleak and constify some strings; from kristaps@.Ingo Schwarze
2011-12-25Accept "makewhatis" as an alias for "mandocdb".Ingo Schwarze
2011-12-25Use the traditional name "whatis.db" for the mandocdb(8) databases.Ingo Schwarze
Requested by deraadt@, ok kristaps@. CAUTION: If you run "sudo mandocdb" after this, the old apropos(1) and whatis(1) will not work any longer. To get temporary copies of the new ones, run: cd /usr/bin; rm -f apropos whatis; ln -s mandoc apropos; ln -s mandoc whatis
2011-12-25For binary compatability of the databases across architectures,Ingo Schwarze
use pointers to arrays, not pointers to structs. It is now possible to create databases on sparc64 and use them on i386 and vice versa. Kristaps@ can't think of anything else that might be required, either. Put this in now such that we can move on.
2011-12-25Implement test mode (makewhatis -t), required for pkg_create(8).Ingo Schwarze
Always do all consistency checks; when any one fails, decide whether to print a message, or skip the file, or both, or none. While here, do some cleanup as well: * Bail out on conflicting options. * Do not crash with -a if there are plain files in the root dir. * Collect some related variables into structs. Feedback and OK kristaps@.
2011-12-24Support leading, trailing and double colons in MANPATHIngo Schwarze
to prepend, append or insert the man.conf(5) default path; compatible with GNU manpath(1), implementation by kristaps@, heavily tweaked by me.
2011-12-20Do not cast void pointers to pointers requiring alignment.Ingo Schwarze
This makes mandocdb(8)/apropos(1) work on strict alignment architectures. Basic way to fix this confirmed by deraadt@ and kettenis@, thanks. This now works on both sparc64 and i386, but note that the binary database format is still machine-dependent.
2011-12-19Improvements from kristaps@:Ingo Schwarze
(1) Make the database format simpler and smaller by - storing the file type as a single character and - storing paths relative to the dir containing the database. The latter allows to move trees around. Both together typically save 15-25% of the index size. (2) Make sure apropos(1) "any" really covers all search keys. (3) Make manpath_parseline() static, drop manpath_parseconf() completely.
2011-12-12implement -C (alternative config file) for apropos(1) and mandocdb(8);Ingo Schwarze
ok kristaps@
2011-12-10Bugfixes from kristaps@:Ingo Schwarze
(1) Always show architecture-independent manuals, even when an architecture is specified on the command line. (2) Do not leak memory when a manual is skipped because it's the wrong section or architecture.
2011-12-10Avoid leaking index records:Ingo Schwarze
Before allocating a record for a file, first make sure we actually want to use the file.
2011-12-10Fix selection of arch-specific manuals:Ingo Schwarze
(1) Correctly compare cat vs. man paths. (2) Compare arch (and section) names case-insensitively. Problem noticed by kristaps@.
2011-12-09Improve parsing of preformatted manuals:Ingo Schwarze
* If the first section is empty, reuse the file name as the description. * Strip backspace encoding from the description. * Make the loops more readable using string(3) functions. * Put fclose() at the end, as line isn't valid afterwards. From kristaps@, tweaked a bit by me.
2011-12-09In default mode, use realpath(3) on the "dir" argumentsIngo Schwarze
and put canonicalized absolute pathnames into the database; from kristaps@.
2011-12-09sort output case-insensitively; from kristaps@Ingo Schwarze
2011-12-08bugfix: make reclaiming of index slots actually work;Ingo Schwarze
index_prune always counted the free slots, but didn't tell anybody about them, so they weren't reused
2011-12-07Implement search support for 24 additional macros, extract more informationIngo Schwarze
from Fn, and lift section restrictions from An Cd Er Ev Fn Fo In Pa St Va Vt by removing 4 handler functions and 50 lines of code. ok kristaps@
2011-12-05As requested by kristaps@, add and improve comments related to -Omdoc;Ingo Schwarze
while here, clean up some redundant initializations in print_man_head().
2011-12-04Fix parsing of file names given on the command line; i broke itIngo Schwarze
when adding support for formatted manual pages.
2011-12-04When a man document contains nothing at all except one or more invalidIngo Schwarze
macros, do not die on an assertion, but show correct error messages. Assertions of meta data validity suggested by joerg@. ok joerg@
2011-12-03Remove an OpenBSD-specific tweak regarding .Xr spacingIngo Schwarze
and make it compatible with bsd.lv mandoc and with groff-1.21. This tweak was originally added for compatibility with groff-1.15, which is no longer needed. ok jmc@ kristaps@
2011-12-03remove useless "#ifdef __linux__" that crept in,Ingo Schwarze
and trivial sync to bsd.lv (two new comments)
2011-12-03Make the mandocdb(8) format endian-neutral by storing integer dataIngo Schwarze
in network byte order; from kristaps@. Hopefully, this finishes the database format. This commit requires another rebuild of your mandoc databases by running "sudo mandocdb".
2011-12-02In man(7), when no explicit volume name is given, use the defaultIngo Schwarze
volume name for the respective manual section, just like in mdoc(7). This gives us nicer page headers for cvs(1), lynx(1), tic(1), mkhybrid(8), and many curses(3) manuals. ok kristaps@ To not break compatibility, i wrote a corresponding patch for GNU troff which Werner Lemberg accepted upstream at rev. 1.65 of: http://cvs.savannah.gnu.org/viewvc/groff/tmac/an-old.tmac?root=groff
2011-12-01Fix mandocdb(8) to pass over the type when pruning the database.Ingo Schwarze
This fixed `-d' perpetually adding the same files. While here, remove -vv, clean up the code and document it. From kristaps@.
2011-11-29Sync to bsd.lv, mostly from kristaps@.Ingo Schwarze
Make `-i' only apply to regular expressions. For substring matches, always use strcasestr(). Also, improve some manuals and comments.
2011-11-29tables of matchable keys; from kristaps@Ingo Schwarze
2011-11-28Discuss the default behaviour up front before talking about optionsIngo Schwarze
modifying it; based on a remark by kristaps@. While here, mention parsing of unformatted files and the changed index format and fix a few minor issues.
2011-11-28Put back the chdir(2) to the right man page tree before parsing manuals;Ingo Schwarze
this got lost during the bsd.lv sync in rev. 1.10; oops. This is required for processing .so links: otherwise, several files in Xenocara fail to parse and cause ugly complaints instead.