| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This shrinks the database in standard mode by 3%, in -Q mode by 9%,
without loss of functionality.
|
|
|
|
|
|
|
|
| |
This really takes us beyond what grep -R /usr/*/man/ can do
because now you can search for pages by *one* criterion and then
display the contents of *another* macro from those pages, like in
$ apropos -O Ox Fa~wchar
to get an impression how long wide character handling is available.
|
|
|
|
|
|
| |
and return a list of names with sections, used by apropos(1) for display.
While here, improve uniformity of the interface by allocating the file
name dynamically, just like the names list and the description.
|
|
|
|
|
|
|
| |
* Again accept suffixes on the name of the whatis utility.
* The usage line for whatis must not invite expressions.
* Revert the argument names in the SYNOPSIS back to the usual ones.
* Revert a few gratuitious changes regarding line breaks etc.
|
| |
|
|
|
|
| |
(via mansearch), and merge mandocdb.h into mansearch.h (and remove).
|
|
|
|
|
|
|
|
|
| |
This makes the utility much smaller and simpler.
A lot of functionality has been omitted while the sqlite3 search routines
improve (logical operations, etc.).
It still needs work to make the output more conventional.
Also add the manpage utility, which I use extensively as a mind-meld of
apropos and man.
|
| |
|
| |
|
| |
|
|
|
|
| |
we can do this in the frontend.
|
| |
|
|
|
|
|
| |
the next section. Also, remove the limit of 72 characters and enforce
this, instead in the apropos frontend.
|
|
|
|
|
| |
including various tweaks to the whatis(8) manual;
ok kristaps@
|
|
|
|
|
| |
man.cgi should sort in the first place -- it wasn't before.
Revert uppercasing of man.cgi title.
|
|
|
|
|
|
| |
(and thus the default), always use strcasestr(). Discussed on tech@
with schwarze@. While here, fix the apropos.c usage() message to be
consistent with apropos(1) and clean up the EXAMPLES in apropos(1).
|
|
|
|
|
|
|
| |
* Bugfix: Use all arguments, not just the last one.
* Use 'Nm~' instead of 'Nm,Nd~' to match OpenBSD behaviour.
* For the progname, accept '^whatis', not '^whatis$' to ease testing.
ok kristaps@
|
|
|
|
|
| |
This is from a patch to tech@ as critiqued by schwarze@, checked in to
get the ball rolling.
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
itself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(although I still don't have -M, which is a big piece).
First, the default search path is the cwd. This will change to use -M
once I look over that code.
If MANPATH is specified, this replaces the cwd.
Both of these are augmented by -m.
If paths don't exist or don't have databases, they're silently ignored.
This makes perfect sense: you may be given a superset of possible paths.
The corner case of no paths (where, say, MANPATH consists of bogus paths
or the cwd is unreadable) simply means that no paths are searched.
|
|
|
|
|
|
|
|
|
|
|
| |
directories containing mandocdb(8) databases. Some changes follow:
(1) don't support -M yet;
(2) fall back to cwd if no prior manpath has been specified;
(3) resolve manpages using realpath() to prevent consecutive chdir()'s
over relative paths;
(4) note where further error-reporting is required;
(5) fix leaking memory on exit in several cases.
|
|
|
|
| |
nested logical subexpressions with AND (-a) and OR (-o) support.
|
|
|
|
|
| |
the arguments in apropos(1) into a single string passed to exprcomp(). Ok
schwarze@.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apropos [search_type[,...]=]substring
apropos search_type[,...][,i]~regex
... and expression evaluation must take the search type into account.
This allows to:
* drop the global -I option and
* drop the enum match, just using a boolean int.
"go ahead" kristaps@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this when it completes; this is to keep it in-tree.
Right now this uses prefix notation. Ignore it. I'll make this into
infix notation real soon.
The goal of this (exprcomp and exprexec) is to have arbitrary logical
expressions.
|
| |
|
|
|
|
|
|
|
|
|
| |
inspired by apropos.c and mandoc-tools' mandoc-cgi.c). This uses UTF-8
right now for its re-writing, but will soon accomodate for the regular
suspects (this is a rather simple matter).
I also introduce man.cgi (cgi.c), which is a standalone CGI that replaces
mandoc-tools' mandoc.cgi. Right now it's just a framework.
|
|
|
|
| |
making the utility exit non-zero.
|
|
|
|
| |
NULL.
|
|
|
|
|
|
| |
results array. This is much faster than the previous method, a linear
search, at a small cost. Note that array offsets are used instead of
storing the res pointer because we may realloc the results vector.
|
| |
|
| |
|
|
|
|
|
|
| |
state struct (directly using fprintf and perror to do this); add some
in-line documentation; remove state init and destroy directly to the
main function.
|
|
(originally including extern.h, state.c, and sort.c). The apropos
utility interfaces with the databases of mandocdb to provide semantic
searching capabilities. It Works For Me, but will need lots of cleanup
in the coming months.
|