| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
against vend, causing a premature line break. Fix that bug by reverting
revision 1.93 which Kristaps committed four years ago. Kristaps patch is no
longer needed because the code below /* Write out the [remaining] word. */
now handles leading blanks correctly, probably already for a long time.
This avoids premature line breaks in about a dozen base system manuals,
for example as(1) and gdb(1), and alignment issues in another twenty,
for example mount(2), ip6(4), pfctl(8), and crypto(9).
|
|
|
|
|
|
|
| |
because that's the usual order in formal citations.
My patch that was accepted into groff by Werner Lemberg
uses the same order, so keep groff and mandoc consistent.
|
| |
|
| |
|
|
|
|
|
|
|
| |
consistently use the style ".An name Aq Mt email".
Triggered by a question from Jan Stary <hans at stare dot cz>,
ok jmc@.
|
|
|
|
|
|
|
|
|
|
| |
As with any low-level roff request involving subtle interactions
with macro internals, this implementation is not exact, but it
does handle the simplest cases.
This request occurs in man(7) code generated from DocBook,
for example mysql(1) and yasm_arch(7).
Thanks to brad@ for reporting the issue back in January 2011.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
so move the str_info structure into that function.
No functional change.
|
|
|
|
| |
so move the statement into the function dbopen().
|
| |
|
|
|
|
|
| |
is actually reachable by man(1). This check got lost when
the database backend was changed from Berkeley to sqlite.
|
|
|
|
|
|
|
|
|
|
|
| |
even when the conditional evaluated to false.
While here, reshuffle the code to reduce indentation and make it
more readable; that way, we can even trim down the comments because
it becomes obvious what the code does.
Found in zipinfo(1) - thanks to espie@ and naddy@
for making me look at that manual page.
|
| |
|
|
|
|
|
|
|
| |
output on collections of manual source files. I'm using this for quite
some time now, and it has proven to be rather useful.
Obviously, this will not be installed on user's systems.
|
|
|
|
|
|
|
|
|
|
|
| |
* Parsing macro arguments has to be done in copy mode,
which implies replacing "\t" by a literal tab character.
* Otherwise, render "\t" as the empty string, not as a 't' character.
This fixes formatting of the distfile example in the oldrdist(1) manual.
This also shows up in the unzip(1) manual as one of several issues
preventing the removal of USE_GROFF from the archivers/unzip port.
Thanks to espie@ for attracting my attention to the unzip(1) manual.
|
|
|
|
|
|
|
| |
Tweak descriptions of the other POSIX 1003.1<letter> standards.
Sort a few others into their proper places.
From Philip Guenther@ during t2k13.
|
|
|
|
|
| |
Having a mask is sufficient to trigger putmdockey.
Simplify by dropping the flags; no functional change.
|
|
|
|
|
| |
the section was dropped when switching from db to sqlite.
Use the customary format foo(N).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the same string within the same manual, so initialize and purge
it for each manual in ofmerge() instead of one single time in main().
There is no point in saving manual names and descriptions in that
table because each of them occurs only once, or very few times.
The is no point in saving section numbers there because they are
so much shorter than the descriptions.
Testing with the complete tree /usr/share/man/ on my notebook shows
that this change slightly reduces memory consumption by about 20%
while there is no measurable difference in execution time.
As a bonus, this allows to delete the functions stradd() and stradds(),
the "next" member from struct str, and the global struct str *words.
While adapting the places in the code using stradd(), i noticed that
parsing of the mdoc(7) .Nd macro was completely broken and that for
formatted manual pages with unusable NAME section, the description
was never set in the struct of. This commit fixes both bugs as well.
|
|
|
|
|
|
|
| |
and ohash_find() twice. As a bonus, this allows to drop hashget().
While here, rename index to slot to match the terminology in the ohash
manual; it also prevents potential clashes with index(3).
Drop the slot variable altogether where it is used only once.
|
|
|
|
|
| |
Also rename straddbuf() to stradds() to be more similar to putkeys().
Just cleanup, no functional change.
|
|
|
|
|
| |
While here, simplify dbopen() and dbclose(): No need for strlcpy()
and strlcat() when dealing with constant strings only.
|
|
|
|
|
|
| |
We are not going back to Berkeley DB and don't care about
overwriting any obsolete files that may be lying around.
So, go back from "mandocdb.db" to "mandoc.db".
|
|
|
|
|
|
| |
used as a default page description if no usable NAME section was found
was preserved when moving from db to sqlite, but the code line actually
doing that was removed without replacement. So, put it back.
|
|
|
|
| |
so make the function void; no functional change.
|
|
|
|
|
|
|
|
|
| |
during the switch from db to sqlite; restore these:
* Warn and skip when directory and file name mismatch.
* Warn and skip when finding special files.
* Warning about "mandocdb.db" is useless, it is always present.
* While here, do not hardcode "mandocdb.db", use MANDOC_DB.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
db to sqlite; they are needed to prevent corruption of the database
when paths containing dot, dotdot, or symlinks are given on the
command line. Also make sure the exit-code is really non-zero on
system errors and use mandoc(1) exit codes.
To make all this simpler,
* Drop the "basedir" argument from almost every function and make it
global because it is really state info used all over the place.
* Move "startdir" and "fd" as local vars into set_basedir() because they
are only used for this one purpose, i.e. to move out of basedir again.
While here,
* Clarify the name of path_arg in the main program; in the -C case,
it is not a dir, and anyway there are lots of different dirs around.
* Include missing <stdio.h> needed for perror().
|
|
|
|
|
|
| |
Consistently use the PATH_MAX since it is specified by POSIX,
while MAXPATHLEN is not.
In preparation for using this at a few more places.
|
|
|
|
|
| |
1) SQL statements were only prepared when creating a new database.
2) We rely heavily on foreign_keys, but never enabled them.
|
|
|
|
|
|
|
|
|
|
| |
As variadic macros are not supported on all architectures,
replace them by a real function. While here,
* choose a more logical order for "dir" and "file" arguments
* choose a more logical order when printing; as a bonus,
a simple sed 's/:.*//' will get you valid file names
* in ofmerge(), skip diagnostic string comparisons
when we don't want warnings anyway
|
|
|
|
|
|
|
| |
sequences such that output modes like -Tutf8 have a chance to select
nice glyphs. This doesn't change anything for -Tascii, and, for now,
it doesn't affect -Tps and -Tpdf either.
OK matthew@ bentley@; like the idea tedu@; no opinion jmc@.
|
|
|
|
|
|
| |
* Add the missing mparse_parse_buffer prototype.
* Drop the useless MAP_FILE constant: It's not specified in POSIX,
so it's not required, it's the default anyway, and it's 0 anyway.
|
|
|
|
| |
That helps to find one's way when hacking on the code.
|
|
|
|
|
|
|
| |
Remove one layer of indirection by deleting mparse_readfd_r()
and doing its work in the public mparse_readfd().
As a bonus, catch recursive .so.
This is part of the preparations to resync to openbsd.org.
|
|
|
|
|
| |
that doesn't work on OpenBSD.
OK tedu@ naddy@
|
| |
|
|
|
|
|
|
| |
I needed this when working on tbl(7) bug fixes.
Deliberately not linked to the build;
this is developer documentation, not user documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and on its last line, the first T{ remained unclosed,
roff_parseln() never returned ROFF_TBL for that last line,
so {man,mdoc}_addspan() never got called for that last line,
so we ended up with a table
where no line associated with a node had TBL_SPAN_LAST set,
so tbl_term() never free()'d the cols in struct roffcol,
so tblcalc() crashed on the NULL == tbl->cols assertion
when starting the *next* table in the same file.
Fix this by returning ROFF_TBL as soon as we open a data cell,
not only when finishing it - as explained above, it may never
get properly closed but instead be interrupted by .TE.
Problem reported by bentley@ in latex2man.1.
I love it when bugs take half a day to debug but
the fix turns out to be flipping one single bit in the source code.
|
|
|
|
|
| |
that is already used almost everywhere instead of gratuitiously
inventing different names at four places. No functional change.
|
|
|
|
|
|
|
| |
1) This struct almost exclusively contains the table options.
2) Information about the table as a whole is actually in "struct tbl_node".
Besides, "struct tbl" was almost impossible to search for.
So rename it to "struct tbl_opts". No functional change.
|
|
|
|
|
|
|
|
| |
preceded by a backslash; otherwise, the escape sequence would later
be identified as invalid and the non-printable character would be
passed through to the output backends, sometimes triggering assertions.
Reported by Mike Small <smallm at panix dot com> on the mdocml discuss list.
|
|
|
|
|
|
|
|
| |
* Guard <sys/param.h> inclusion by #ifdef USE_MANPATH
to make it more obvious why this isn't needed on OpenBSD.
Noticed by deraadt@.
* Resolve gratuitious whitespace differences:
Blanks before tabs and on empty lines.
|
| |
|
|
|
|
| |
Found and fixed on the plane to the OpenBSD t2k13 hackathon in Toronto.
|
|
|
|
|
|
|
| |
any text that follows must be kept on the same line.
I already found the issue and wrote the patch in April 2011,
but didn't come round to do proper testing and forgot about it.
|
|
|
|
|
| |
Issue found when Thomas Klausner <wiz at NetBSD dot org> made me
look at the manuals of his http://www.nih.at/libzip library.
|
|
|
|
|
|
|
| |
takes care of printing the whole line. This reduces code duplication -
in particular after the upcoming commit to repair .Bl -offset -
and makes print_offs() more similar to what print_width() does.
No functional change.
|
|
|
|
|
|
|
|
| |
use abort(3), just like in the three other comparable cases in this file,
instead of ignoring the problem and causing a null pointer access.
Cosmetical issue reported by Ulrich Spoerlein <uqs@spoerlein.net>
found by Coverity Scan CID 976115.
No functional change.
|
|
|
|
|
|
|
|
|
| |
along with the dead code testing whether it's positive.
Reported by Ulrich Spoerlein <uqs@spoerlein.net>,
found by Coverity Scan CID 975717.
While here, remove the now unused **params array as well,
which Coverity apparently missed, at least it wasn't reported...
|
|
|
|
|
|
|
| |
data pointed to, pass the size of the right pointer type to calloc;
cosmetic issue reported by Ulrich Spoerlein <uqs@spoerlein.net>
found in Coverity Scan CID 978734.
No binary change - ok cmp(1).
|