| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Problem reported by jmc@, thanks.
|
|
|
|
|
|
|
|
|
| |
reported by Nicolas Joly <njoly at pasteur dot fr>:
- add EOS spacing after trailing punctuation after .Cd, .Fc, and .Lb
- suppress spacing before trailing punctuation after .Fd
Add the remaining issues from the same report to the TODO file.
|
|
|
|
|
|
|
|
| |
Settle for "struct man *man", "struct mdoc *mdoc", "struct meta *meta"
and avoid the confusing "*m" which was sometimes this, sometimes that.
No functional change.
ok kristaps@ some time ago
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* When allocating a body end marker, copy the pointer to the normalized
block information from the body block, avoiding the risk of subsequent
null pointer derefence.
* When inserting the body end marker into the syntax tree, do not try to
copy that pointer from the parent block, because not being a direkt child
of the block it belongs to is the whole point of a body end marker.
* Even non-callable blocks (like Bd and Bl) can break other blocks;
when this happens, postpone closing them out in the usual way.
Completed and tested at the OpenBSD impromptu Coimbra hackathon (c2k12).
Thanks to Pedro Almeida and the Laborat'orio de Computa,c~ao Avan,cada
da Universidade de Coimbra (http://www.uc.pt/lca) for their hospitality!
|
|
|
|
|
|
|
|
| |
even on an input line containing a partial implicit macro.
Fixes horizontal spacing in vi(1), ddb(4), and ppp(8).
OpenBSD rev. 1.74.
|
| |
|
|
|
|
|
|
|
| |
not just the first one in each -diag list.
While here, drop the needless if-statement
and choose a more precise wording for the comment.
ok kristaps@
|
|
|
|
| |
entry raised by deraadt@.
|
|
|
|
|
|
|
| |
compatible with groff-1.21. This tweak was originally added for
compatibility with groff-1.15, which is no longer needed.
ok jmc@ kristaps@
|
|
|
|
|
|
|
| |
and assert that print_bvspace cannot be called on NULL pointers.
No change in behaviour, none of these were bugs,
but the code becomes easier to understand.
Based on a clang report posted by joerg@; ok kristaps@.
|
|
|
|
| |
found while syncing to OpenBSD
|
|
|
|
|
|
| |
Originally pointed out by joerg@ then again by Thomas Klausner by way of
Nicolas Joy. Note: don't use these constructions as you can't link to
the sections with `Sx'.
|
| |
|
|
|
|
|
| |
Fixing a regression introduced in rev. 1.105.
ok and prodding for comments kristaps@.
|
|
|
|
|
|
|
|
| |
variable from mandoc_getarg() so that it prints the warning every time.
Then, remove the warning from args_checkpunct(). This way, warnings
are being posted at the correct time. This makes the flag argument to
mdoc_zargs() superfluous, so make it be zero when it's invoked. Finally,
move the args() flags into mdoc_argv.c and make them enums.
|
|
|
|
|
| |
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.
|
|
|
|
|
|
|
|
|
| |
error where (1) -man pages were punctuating delimiters (e.g., `.B a ;')
and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its
own line) would also be punctuated. This introduces a small amount of
complexity of mdoc_{html,term}.c must manage their own spacing with
running print_word() or print_text(). The check for delimiting now
happens in mdoc_macro.c's dword().
|
|
|
|
|
|
|
|
|
| |
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h. This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.
|
|
|
|
|
| |
make mdoc_vmsg not return an int. libmdoc is now completely clean of
return-value checks from the message subsystem.
|
|
|
|
|
|
| |
removal of manual delimiter checks in html.c and term.c. Finally, add
the escaped period as a closing delimiter, removing a TODO to this
effect.
|
|
|
|
| |
with "xxBSD-yy"
|
|
|
|
| |
isn't known to cause any problems, but better safe than sorry.
|
|
|
|
|
|
|
| |
Remove `Pp' or `Lp' if it is the FIRST or LAST child of an `Sh' or `Sh' body.
Make "skipping paragraph" be an error, not a warning, as information (an
invoked macro) is ignored.
|
|
|
|
| |
ending of scopes and drop stray scope-endings.
|
|
|
|
|
| |
Remove references to MDOC_ACTED (it was only assertions) and the pre-
and post-action functions.
|
|
|
|
|
|
|
|
| |
Clarify that `Mt' gets a default `~' (as per groff 1.20) and document it
in mdoc.7.
Made `Lk' be removed in mdoc_macro.c if it has no arguments. This fixes
segfaults in mdoc_{term,html}.c that nobody's managed to raise yet.
|
|
|
|
|
|
|
| |
* slightly simplify .Pf *_IGNDELIM code, and share part of it with .No
* do not let opening delimiters fall out of the front of .Ns (from kristaps@)
This fixes a few spacing issues in csh(1) and ksh(1).
OK kristaps@
|
|
|
|
|
|
|
|
|
|
| |
report an ERROR: We can still render the page by just closing
the open scope, but it is likely that information will be missing
or document structure mangled.
Before, man(7) only reported a WARNING (which is dangerous because
we cannot be sure rendering is correct) and mdoc(7) ran into FATAL
(which is too drastic, there is no reason not to show what we have).
"looks good" kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
should not flag the end of a sentence if:
1) The punctuation is followed by closing delimiters
and not preceded by alphanumeric characters, like in
"There is no full stop (.) in this sentence"
or
2) The punctuation is a child of a macro
and not preceded by alphanumeric characters, like in
"There is no full stop
.Pq \&.
in this sentence"
"looks fine" to kristaps@; tested by jmc@ and sobrado@
|
|
|
|
|
| |
on those parts of the code and text that i have written as Kristaps is.
"fine with me" kristaps@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the parser can use the resulting cues. In particular, this allows
to use .nr nS to force SYNOPSIS-style .Nm indentation outside the
SYNOPSIS as needed by ifconfig(8).
To actually make this useable, .Pp must rewind .Nm, or the rest of the
section would end up indented. Implement a quick hack for now,
a generic solution can be designed later.
ok kristaps@ and tested by sobrado@
|
|
|
|
|
|
|
| |
The bug was uncovered by SYNOPSIS .Nm as this happened to be the first
block with this particular combination of properties.
Found the hard way by kristaps@ in NetBSD gcc-contrib(1),
fix by me.
|
|
|
|
|
|
|
| |
kristaps@ will do the missing HTML part soon.
"looks nicer" jmc@
"seems perfect to me" sobrado@
"slap it in" kristaps@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
delayed: It must either succeed right away or fail outright.
As noticed by Kristaps, neglecting to fail properly when required
could make invalid input screw up the syntax tree and ultimately
trigger assertions in other, unrelated parts of the program.
This fix tested by and OK by kristaps@.
While here, comment the rather tricky function rew_dohalt().
This function will probably need more tweaks later on.
|
|
|
|
|
| |
seems like gcc3 didn't catch it :-(
thanks to thib@ and kristaps@ for reporting
|
|
|
|
|
|
|
|
|
|
| |
* Let rew_alt() always succeed, obsoleting tons of case statements.
* Merge rew_dobreak() into rew_dohalt().
* Encode all rewinding cases uniformly in terms of "enum rew".
Required because i'm too dumb to get SYNOPSIS .Nm rewinding right
without cleaning this up first.
"get it in" kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the Rostock mandoc hackathon and tested and polished since,
supporting constructs like:
.Ao Bo Ac Bc (exp breaking exp)
.Aq Bo eol Bc (imp breaking exp)
.Ao Bq Ac eol (exp breaking imp)
.Ao Bo So Bc Ac Sc (double break, inner before outer)
.Ao Bo So Ac Bc Sc (double break, outer before inner)
.Ao Bo Ac So Bc Sc (broken breaker)
.Ao Bo So Bc Do Ac Sc Dc (broken double breaker)
There are still two known issues which are tricky:
1) Breaking two identical explicit blocks (Ao Bo Bo Ac or Aq Bo Bo eol)
fails outright, triggering a bogus syntax error.
2) Breaking a block by two identical explicit blocks (Ao Ao Bo Ac Ac Bc
or Ao Ao Bq Ac Ac eol) still has a minor rendering error left:
"<ao1 <ao2 [bo ac2> ac1> bc]>" should not have the final ">".
We can fix these later in the tree, let's not grow this diff too large.
"get it in" kristaps@
|
|
|
|
|
|
|
|
|
| |
functionality and UGLY works quite well thanks to schwarze@'s careful
attention.
This also backs out function-prototype changes for struct regset,
instead stuffing a pointer to the regset directly into struct
mdoc/man/roff.
|
|
|
|
| |
libman and libmdoc.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
-column' up until the first `It'. This is UGLY and should have all
sorts of warnings, and will. On the one hand, it fits with groff's
notion of tabs and tab-spaces. On the other hand, it's not really
"free-form" text any more. Note that this does not yet accomodate for
macros coming on these lines.
|
|
|
|
| |
comes into play).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add `Ta' macro, which is basically a NULL case everywhere but in
mdoc_macro.c, where it closes out an existing `It' body scope and opens
a new one, then continues parsing as in phrase() (TODO: merge these
two?).
Fix where scope-breaking was silently just dying instead of printing an
error.
Fix where trailing `Ta' or tab weren't creating a new MDOC_BODY context.
We now support arbitrarily complex `It' contents for `Bl -column'.
|
|
|
|
|
|
|
|
|
|
| |
will make it easy for re-entrant parsing of `Ta' macros to fit in with
standard closure rules.
Added some more regressions for `Bl -column'. Note that one should
fail, as documented in the TODO file.
Recorded change of AST BNF in mdoc.3.
|
|
|
|
|
| |
be changing this around and want a record in CVS of what was happening
beforehand.
|