| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
(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).
|
|
|
|
| |
schwarze@.
|
|
|
|
| |
ok kristaps@
|
|
|
|
| |
ok kristaps@.
|
|
|
|
|
|
|
| |
* 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@
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is from a patch to tech@ as critiqued by schwarze@, checked in to
get the ball rolling.
|
|
|
|
| |
formatting manpages is now linked into man.cgi.
|
|
|
|
|
|
|
|
|
| |
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 exists almost entirely to document that /tmp must exist in a jailed
Apache directory for dbopen() not to fail. This was a massive headache
to track down.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Insecure. This means that we're operating over the full file-system
with access to mandoc(1). In this mode, mandocdb entries are formatted
on-the-fly. The $INSECURE environment variable must be passed to
man.cgi for this mode to work.
(2) Secure. Manuals are assumed to be pre-formatted in a cache directory,
which may be set with $CACHE_DIR but default to /cache/man.cgi.
This mode works with manup(8), which updates the cached pages from
outside of the jail. man.cgi simply locates the manual file and
outputs it to stdout.
|
|
|
|
| |
have arbitrarily-located cache directories for man.cgi.
|
| |
|
|
|
|
|
| |
doing so. This will be used by a jailed man.cgi, as the cache built by
manup(8) creates a man.conf for it to use.
|
|
|
|
|
|
|
| |
apropos(1) does so) and updates an HTML fragment cache for use by man.cgi.
Right now man.cgi is "online" in that it requires mandoc(1) in its path,
but this doesn't work for, say, OpenBSD's apache chroot(1). This allows
a cache to be maintained.
|
| |
|
| |
|
|
|
|
|
|
|
| |
In other words, if you smash this into a cgi-bin directory, it will Just
Work for your system's manuals (it of course needs access to mandoc(1) and
your file-system, hence "non-jailed").
The notion of a jailed case is much more subtle and being worked on now.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is necessary since an array of records can have duplicate record
numbers in different mandoc.index files.
The volume [right now] is just the index of the parsed mandoc.index in
the manpaths. This is sensible because the order of the manpath is
significant (it's the order of duplicate-named manuals displayed by
man(1)) and is thus not likely to change.
|
|
|
|
|
| |
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.
|
|
|
|
| |
itself.
|
|
|
|
|
| |
Most of this code (except the manpath part) written by schwarze@.
This isn't hooked into anything yet.
|
|
|
|
| |
and remove a trailing blank noticed by jmc@
|
|
|
|
|
| |
<manpages.bsd.lv/history.html>. Ok schwarze@ (with modifications) and
Jason McIntyre.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* Not sure there were any text nodes, might have been other stuff instead.
* Not sure it was just one node, maybe several were deleted.
* No problem if some nodes were deleted, as long as some valid ones are left.
* We do not leave early, but after cleaning out all the crap.
* We are not "bailing", but we consider the block valid after cleanup.
|
| |
|
| |
|
|
|
|
| |
handling NULL strings.
|
|
|
|
| |
is raised later.
|
|
|
|
| |
on unknown macros.
|
|
|
|
|
|
|
|
| |
.Rs
plain text
.Re
This avoids a crash on invalid.
|
|
|
|
| |
nested logical subexpressions with AND (-a) and OR (-o) support.
|
| |
|
| |
|
|
|
|
|
| |
.TP 8
.SH foo
|
|
|
|
|
|
| |
in practice, and discourage using fancy characters in manuals.
Text about "Dashes and Hyphens" by jmc@.
Feedback and ok jmc@, grudgingly ok kristaps@.
|
|
|
|
|
| |
the arguments in apropos(1) into a single string passed to exprcomp(). Ok
schwarze@.
|