Age | Commit message (Collapse) | Author |
|
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@.
|
|
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.
|
|
|
|
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@.
|
|
|
|
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.
|
|
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@
|
|
following one reindex certain files in a local tree:
makewhatis -d mytree mytree/*/foo*.*
|
|
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@
|
|
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.
|
|
|
|
Update usage() as well; reminded by jmc@.
Mention the manwhere(1) predecessor in 1BSD; suggested by kristaps@.
OK jmc@.
|
|
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.
|
|
From Ulrich Spoerlein, tweaked by kristaps@.
Werner Lemberg added the same .St argument to groff today.
|
|
regarding HISTORY and AUTHORS.
ok jmc@
|
|
* 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.
|
|
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@.
|
|
|
|
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@
|
|
While here, reference apropos(1) from the description,
inspired by the makewhatis(8) manual.
|
|
from kristaps@, ok jmc@.
|
|
|
|
|
|
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
|
|
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.
|
|
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@.
|
|
to prepend, append or insert the man.conf(5) default path;
compatible with GNU manpath(1), implementation by kristaps@,
heavily tweaked by me.
|
|
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.
|
|
(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.
|
|
ok kristaps@
|
|
(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.
|
|
Before allocating a record for a file,
first make sure we actually want to use the file.
|
|
(1) Correctly compare cat vs. man paths.
(2) Compare arch (and section) names case-insensitively.
Problem noticed by kristaps@.
|
|
* 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.
|
|
and put canonicalized absolute pathnames into the database;
from kristaps@.
|
|
|
|
index_prune always counted the free slots,
but didn't tell anybody about them, so they weren't reused
|
|
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@
|
|
while here, clean up some redundant initializations in print_man_head().
|
|
when adding support for formatted manual pages.
|
|
macros, do not die on an assertion, but show correct error messages.
Assertions of meta data validity suggested by joerg@.
ok joerg@
|
|
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@
|
|
and trivial sync to bsd.lv (two new comments)
|
|
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".
|
|
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
|
|
This fixed `-d' perpetually adding the same files.
While here, remove -vv, clean up the code and document it.
From kristaps@.
|
|
Make `-i' only apply to regular expressions.
For substring matches, always use strcasestr().
Also, improve some manuals and comments.
|
|
|
|
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.
|
|
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.
|