| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
the next section. Also, remove the limit of 72 characters and enforce
this, instead in the apropos frontend.
|
| |
|
|
|
|
| |
const-ify several strings.
|
|
|
|
| |
Requested by deraadt@, ok kristaps@.
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
|
|
|
| |
This makes mandocdb(8)/apropos(1) work on strict alignment architectures.
Basic way to fix this confirmed by deraadt@ and kettenis@, thanks.
ok kristaps@
This now works on both sparc64 and i386, but note that the binary
database format is still machine-dependent.
|
|
|
|
|
| |
bytes. This cuts down a little in index size and allows for cleaner
extraction of information.
|
|
|
|
|
|
|
| |
prefix. This means that an index in, say, /usr/share/man will point to
man1/foo.1 instead of /usr/share/man/man1/foo.1. Not only does this
save a lot of space, it also allows manual trees to be moved around
without any side effects to the mandocdb(8) databases.
|
|
|
|
|
| |
including various tweaks to the whatis(8) manual;
ok kristaps@
|
|
|
|
|
| |
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, use the file name as .Nd.
* No need to check (len > 0) after successful fgetln(3).
* Improve some comments and strip trailing whitespace.
ok kristaps@
|
|
|
|
| |
hyphen-space combo, not the last hyphen as done previously.
|
|
|
|
| |
of catpage entries in the mandoc databases.
|
|
|
|
|
|
| |
(1) put fclose() at the end, as line isn't valid afterward (see fgetln())
(2) clean up loops to be more readable to my old eyes
(3) mandate trailing newline, nul-terminate, and use strrchr
|
|
|
|
| |
but didn't tell anybody about them, so they weren't reused
|
|
|
|
|
| |
realpath() to convert them into absolute paths before putting the
traversed subdirectory filenames into the index.
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
when adding support for formatted manual pages.
|
|
|
|
| |
fields are endian-neutral, although the recno(3) key is unknown.
|
|
|
|
| |
and prior commits handle the contained binary fields.
|
|
|
|
|
|
|
|
| |
with byte-swapping. Tested on Mac. Any Linux machines somebody can
test on? Anybody?
While here, note the correct byte-size in mandocdb(8) and also note
field widths and endianness. The btree is now endian-neutral.
|
| |
|
|
|
|
|
|
|
|
| |
btree_read() function. Also, add a forgotten free() for the type of
grokked record.
Then in both mandocdb.c and apropos_db.c, make the "rec" field of the
btree by in network-order.
|
|
|
|
|
|
| |
fixed `-d' perpetually adding the same files. While here, clean up the
code and document it. Remove -vv (complain if you want it back in).
Document the error messages in a DIAGNOSTICS section of mandocdb(8).
|
|
|
|
| |
ok kristaps@
|
|
|
|
|
|
| |
as static global variables, reducing the maze of arguments
passed around among various static functions.
Suggested by kristaps@.
|
|
|
|
|
|
|
|
| |
of the mandoc databases, as suggested by kristaps@.
Given the well-structured code, this is surprisingly simple.
This changes the mandoc.index database format.
Run "sudo mandocdb" to regenerate your databases.
|
|
|
|
|
| |
Coded on the train back from p2k11 in Budapest.
Kristaps has seen the patch and agreed with the direction.
|
|
|
|
|
|
|
|
|
| |
but a few serious things as well:
* -M overrides MANPATH
* -m prepends to the path
* put back database close calls that got lost in mandocdb
* missing sys/types.h in manpath.c, needed for size_t
ok kristaps@
|
|
|
|
|
|
| |
put stuff into the database that man(1) will be able to retrieve.
However, support an option to use all directories and files.
feedback and ok kristaps@
|
|
|
|
|
| |
the configuration file and ignores MANPATH. Everybody else uses MANPATH
(being apropos and man), so why shouldn't we?
|
|
|
|
|
| |
This brings it in line with makewhatis(8), which, like apropos(1), will use
man.conf (or manpath(1)) if no manpath entries are provided.
|
|
|
|
|
|
|
| |
submitted to tech@ on 16/11/2011, 01:39. It has been updated to account
for the logical-operator functions and to avoid keeping a live pointer into
the DBT value, which is not guaranteed to be consistent across calls into
the bdb library.
|
|
|
|
|
|
|
|
|
|
| |
set of keywords already exists is a bad idea, so reuse the mdoc(7)
macro names as apropos(1) search types. This is a gain in brevity
as well. Some time ago, kristaps@ agreed in principle.
The search type bit field constants are used by both mandocdb(8) and
apropos(1) and should better stay in sync, so give them their own
header file.
|
|
|
|
|
|
| |
1) Avoid excessive, needless recursion, lest you overflow the stack;
2) Close all dir file descriptors, lest you run out of descriptors.
ok kristaps@
|
|
|
|
| |
found while merging to OpenBSD
|
|
|
|
| |
systems.
|
|
|
|
|
|
|
| |
accept a set of directories on the command line ("manpaths") that are
recursed for files. The databases are created in each manpath root.
This temporarily removes OP_UPDATE and OP_DELETE functionality, which
will be added back in.
|
|
|
|
|
| |
functions. This will make it easier to call repeatedly (for different
directoreis) as must be done with the new interfaces being developed.
|
|
|
|
| |
"please make this change" kristaps@
|
|
with OpenBSD, which is sandboxing the code for merge. It makes sense
because it doesn't really make a `makewhatis' file in the traditional
sense, so it may be confusing.
|