| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
fields are endian-neutral, although the recno(3) key is unknown.
|
|
|
|
|
|
|
|
|
|
|
| |
fix up the section attributes of the HEAD, it's parent BLOCK, and
all its (text) children. This is required because the section
attributes get set when each node is allocated, i.e. before processing
the content of the node itself. Thus, the listed nodes got the section
attribute of the preceding section. No need to fix up the BODY, all
is fine there already.
Found while implementing TYPE_Sh for mandocdb(8).
OK and comment requested by kristaps@.
|
|
|
|
|
|
|
|
|
|
|
| |
They have been considered valid in the past, but were reformatted
to the mdoc(7) "Month day, year" style.
To make page footers more similar to groff, no longer reformat them,
just print them as they are.
This doesn't change anything with respect to what's considered valid
or what is warned about.
ok kristaps@
|
|
|
|
| |
and prior commits handle the contained binary fields.
|
|
|
|
|
|
|
|
|
|
|
|
| |
volume name for the respective manual section, just like in mdoc(7).
This gives us nicer page headers for cvs(1), lynx(1), tic(1),
mkhybrid(8), and many curses(3) manuals.
ok kristaps@
To not break compatibility, i wrote a corresponding patch for GNU troff
which Werner Lemberg accepted upstream at rev. 1.65 of:
http://cvs.savannah.gnu.org/viewvc/groff/tmac/an-old.tmac?root=groff
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
While here, change "mdoc macro compiler" to "UNIX manpage compiler", which
is more correct. I'm not sold on this language; I may end up just going
with mandoc(1)'s notation.
Note also that our archives are now hosted at gmane.
|
|
|
|
|
| |
Also slightly clarify the role of mdoc/man/cat. Finally, remove mandoc(1)
reference (it's not mentioned in the manual).
|
|
|
|
|
| |
whatis(1) (both apropos/whatis aren't related to mandoc from an
operator's perspective).
|
|
|
|
|
|
| |
(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.
|