| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
|
|
| |
append or insert the man.conf(5) default path; compatible with GNU
manpath(1), implementation by kristaps@, heavily tweaked by schwarze@.
Updates to MANPATH documentation applied to whatis.1, apropos.1, and
catman.8 also.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
documentation from apropos(1) to be consistent.
|
| |
|
| |
|
|
|
|
| |
man.cgi.
|
| |
|
|
|
|
|
| |
and repeat them in the search bar. This is handy. While here, make the
QUERY_STRING parser a bit simpler.
|
| |
|
|
|
|
| |
cover all types. Found after some database trawling.
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- include search bar above result page (I relent: it's annoying to
follow three links then press back three times to get a search page);
- make man.cgi.css into man-cgi.css so Apache isn't confused by two
handlers (css, cgi);
- finally consolidate example.style.css to be under the div.mandoc css
selector;
- put catman pages under div.catman;
- put search bar under div#mancgi;
- reflect this properly in the bundled CSS files.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This also cleans up the code a little bit. While here, make some functions
static that are only used within manpath.c.
|
|
|
|
|
|
|
|
|
|
| |
implementation from NetBSD tnftpd, Christos Zoulas (copyright message
retained in the compat_fgetln.c file). Patch verified by schwarze@. He
notes that you'll need -pthread for -static binaries (due to libdb), so
I've noted that -static should really only be used for BSD UNIX.
While here, add some forgotten goop to the Makefile, building and
cleaning extra manpages.
|
|
|
|
|
| |
including various tweaks to the whatis(8) manual;
ok kristaps@
|
|
|
|
| |
feedback and ok jmc@, suggested by and ok kristaps@.
|
| |
|
| |
|
|
|
|
|
|
| |
Also allow for a CSS_DIR to specify alternate CSS locations.
Finally, some clutter as I assume that "css" and "progname" are already
HTML-safe.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
specified, write them out using a SELECT box. Else write nothing (the
manroot will still be checked if it's specified).
|
|
|
|
|
|
|
|
| |
reserved for paths within a manroot). This functionality is bare-bones:
right now, the default manroot is the first one scanned from the cache
directory. At some point this will be sexy and smooth, but it's easy to
upgrade functionality by modifying pathgen() and so forth. If a manroot
isn't parsed from the "manpath=", results are always empty.
|
|
|
|
| |
just uses the first manroot by default.
|
|
|
|
|
| |
Before allocating a record for a file,
first make sure we actually want to use the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Deprecate kvals (key/value pairs for QUERY_STRING values). Since there's
only one place that uses this, kval_parse (now http_parse()) dumps directly
into struct query, which is more high-level.
- Put query values directly into struct req.
- The biggest difference is dynamic support for multiple "manroots". A
"manroot" is a path with an "etc/catman.conf" file. When the cgi starts,
it (prefix) recurses through its CACHE_DIR searching for "etc" directories.
When one's found, it sees if a catman.conf file exists. This is marked
as a manroot and appended to a list. The name of a manroot is the path
without slashes (e.g., OpenBSD/4.9 -> "OpenBSD 4.9").
Right now "manroot" isn't enabled. The first manroot is chosen as the
real one. I'll add the interface to it in the next checkins, but it'll be
quite simple.
|
| |
|
|
|
|
|
|
| |
(1) Correctly compare cat vs. man paths.
(2) Compare arch (and section) names case-insensitively.
Problem noticed by kristaps@.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
comparison only if the manual specifies an architecture, otherwise let it
through. Looked over by schwarze@. This brings us much more in line with
OpenBSD's behaviour.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
query mode.
|
| |
|
|
|
|
|
|
| |
(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
|