Age | Commit message (Collapse) | Author |
|
in isspace() and tolower() arguments containing arbitrary char data.
Thanks to deraadt@ for triggering the audit.
|
|
close below-subsection implicit scopes that may still be open.
In the formatter, make sure indentation is reset when leaving a scope,
not only when entering the next one.
Improves the formatting of gpg(1); issue reported by jca on ports.
|
|
Improves the rendering of gpg(1); issue reported by jca on ports.
|
|
It is already documented in the Heirloom troff manual,
and groff handles it as well.
Bug reported by Bjarni Ingi Gislason <bjarniig at rhi dot hi dot is>
on <bug-groff at gnu dot org>. Well, admittedly, that bug was reported
against groff, but mandoc was even more broken than groff with respect
to this syntax...
|
|
we don't do hyphenation anyway, so there is no point in throwing an ERROR
when encountering .hw.
Real-world usage of the request found by naddy@ in sysutils/dwdiff(1).
|
|
positional arguments (like Dt Fn Xr) and macros taking text as
arguments (like Nd Sh Em %T An). In the past, even the latter put
each word of their arguments into its own MDOC_TEXT node; instead,
concatenate arguments unless delimiters, keeps or spacing mode
prevent that. Regarding mandoc(1), this is internal refactoring,
no output change intended.
Once we will switch mandocdb(8) from DB to SQLite in the future,
this is going to be required to support search expressions crossing
word boundaries, and it will reduce both database sizes and build
times by a bit more than 5% each.
|
|
man-ext macros by Eric S. Raymond, enabled by default in groff_man(7).
Usual disclaimer: You don't write new man(7) code, so you are not going
to use these, either.
Improves e.g. the bzr(1) and etherape(1) manuals.
Thanks to naddy@ for bringing these to my attention.
|
|
Fixes irunner(1) in devel/ipython and uim-xim(1) in inputmethods/uim.
Thanks to naddy@ for bringing these to my attention.
|
|
|
|
from FreeBSD ports SVN rev. 293734, Ulrich Spoerlein March 24, 2012
in case of conflicts with NetBSD, i keep the simpler NetBSD names
|
|
reduces groff-mandoc-differences for several pthread_*(3) manuals
noticed by Franco Fichtner <franco at lastsummer dot de>
dragonfly.git/commitdiff/370c546b87777b40b5fc862491555ef71b4ee130
|
|
dragonfly.git/commit/107cb94cae2c24ce3f6851ce0ed24b80d64e3ec8
|
|
from Antonio Huete Jimenez <tuxillo at quantumachine dot net>
via Franco Fichtner (both DragonFly).
|
|
No merging is needed; basically, mandoc is developed here and mdocml.bsd.lv
is not really "upstream", but just OpenBSD plus compatibility goo. All the
same, the exercise is far from useless: NetBSD, FreeBSD, and DragonFly have
mandoc in base, NetBSD uses it by default to show manuals, and FreeBSD and
DragonFly have finally come close to switching away from groff as well.
Useful bug reports come in and help making our mandoc better.
Maybe we should list mandoc as an OpenBSD associated project on index.html.
|
|
already there in the middle of words. So far, we only allowed this on text
lines. Now it turns out some macros allow this for their arguments, too,
in particular .Nd and most of the .%? citation macros.
Issue found by Franco Fichtner <franco at lastsummer dot de> while doing
systematic groff-mandoc comparisons in the DragonFly base system, THANKS!
While here, garbage collect two empty prevalidator function pointer lists
and sort a couple of function declarations.
|
|
do not throw a FATAL error and do not die, but just throw a WARNING
and move the stuff out of the .Bl block.
This bug felt completely 2008-ish; meanwhile, such bugs from the
Kristaps-doesnt-like-syntax-errors-so-lets-just-give-up--Era
are becoming rare, but this was one of the last survivors.
Thanks to bentley@ for reminding me to finally fix this.
|
|
- avoid bad qualifier casting in roff.c, roff_parsetext()
by changing the mandoc_escape arguments to "const char const **"
- avoid bad qualifier casting in mandocdb.c, index_merge()
- garbage collect a few unused variables elsewhere
|
|
Original code from Christos Zoulas, NetBSD rev. 1.11-1.13, April 3, 2013.
I tweaked the code as follows:
* In roff_getnum(), don't skip a minus that isn't followed by a digit.
* In roff_getop(), do not handle "!=", groff doesn't support it either.
* In roff_evalcond(), treat negative numbers as false, like groff.
Besides, make the interfaces of roff_getnum() and roff_getop() more
similar to each other and simplify parts of the code a bit.
|
|
two entries in enum roffrule; no functional change.
From Christos Zoulas, NetBSD rev. 1.11, April 4, 2013.
|
|
Christos Zoulas in NetBSD rev. 1.11;
i'm even going a step further and making this yet a bit shorter.
No functional change.
|
|
references to user-defined strings. While here, make number registers
signed int, like in groff.
Inspired by NetBSD roff.c rev. 1.8 and read.c rev. 1.7
written by Christos Zoulas on March 21, 2013, but implemented
in a completely different way, without hacking into read.c,
where this functionality really doesn't belong.
|
|
preserving read support for the ".nr nS" SYNOPSIS state register;
read support for arbitrary registers is still not available.
Inspired by NetBSD roff.c rev. 1.18 (Christos Zoulas, March 21, 2013),
but implemented differently. I don't want to have yet another different
implementation of a hash table in mandoc - it would be the second one
in roff.c alone and the fifth one in mandoc grand total.
Instead, i designed and implemented roff_setreg() and roff_getreg()
to be similar to roff_setstrn() and roff_getstrn().
Once we feel the need to optimize, we can introduce one common
hash table implementation for everything in mandoc.
|
|
|
|
different meanings, that cannot be helped. But we can make this less
confusing by stating that the second instance refers to stuff like (2),
(3), and (9), and by adding the sections header the first instance
refers to, for example ERRORS or RETURN VALUES.
Source for confusion noticed by Jan Stary <hans at stare dot cz>,
better wording suggested by jmc@, tweaked by me.
|
|
This fixes horizontal spacing when an Ns macro follows a block-closing
macro and the corresponding block-opening macro is not on the same line.
|
|
one, so they miss the clearing of MDOC_NEWLINE in mdoc.c, node_alloc().
Consequently, MDOC_NEWLINE must be cleared before processing the next
macro on the same line.
This fixes horizontal spacing for input lines beginning like .Oc Ns ...
Issue found by Franco Fichtner <franco at lastsummer dot de>
while working on DragonFly mandoc integration.
|
|
whether they are the first macro on the line or called by another macro.
To help debugging, indicate this property "first macro on a new input line"
by prefixing an asterisk to the line number in -Ttree output.
|
|
|
|
from int to size_t, to match some existing ones (offset, *rmargin, viscol).
Move some related local variables from int to size_t as well.
Needed as a preparation to make a generalized adjbuf() function available
beyond the file term.c, i.e. in mandoc.c.
Also saves a couple of ugly casts.
|
|
This improves the formatting of about 40 base manuals
and reduces groff-mandoc formatting differences in base by about 5%.
|
|
Change the logic depending upon COMPILER_VERSION everywhere, to assume gcc4
is the norm and to explicitely test for gcc3 when a different behaviour
is required.
No functional change intended. Be sure to `make install' in share/mk before
attempting to do anything.
|
|
against vend, causing a premature line break. Fix that bug by reverting
revision 1.10 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.
Committing now because jmc@ already starts to rely on the .%C macro,
see for example /usr/src/usr.bin/bdes/bdes.1 rev. 1.11.
|
|
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.
|
|
* Without arguments, show the usage line and EXIT_FAILURE.
* Resolve some gratuitious differences (order, parantheses, white space, etc).
|
|
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.
|
|
* 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
Discussed with schwarze@ at t2k13
|
|
Consistently use the PATH_MAX since it is specified by POSIX,
while MAXPATHLEN is not.
|
|
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@.
|
|
mparse_parse_buffer(), no functional change intended.
Exclude the following from the sync:
- Skip the mparse_readmem() function, it's useless in OpenBSD.
- Thus, UNCONST isn't used, so no need for "main.h" and <stdint.h>.
- Skip HAVE_CONFIG_H (always off here) and HAVE_MMAP (always on here).
|
|
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 mdocml.bsd.lv.
|
|
that doesn't work on OpenBSD.
OK tedu@ naddy@
|
|
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.
|
|
Kristaps changed the size member of struct manpaths from int to size_t.
No functional change.
|
|
|