| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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@.
|
| |
|
| |
|
|
|
|
|
|
|
| |
just like the default right margin already is. This may be useful for
people with expensive screen real estate. Besides, it helps automated
man(7) to mdoc(7) output comparisons to validate -Tman output.
ok kristaps@ on an earlier version
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
long live the tricky exceptions!
|
|
|
|
|
|
| |
1) Avoid excessive, needless recursion, lest you overflow the stack;
2) Close all dir file descriptors, lest you run out of descriptors.
ok 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.
|