| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* Hierarchical naming of enum mandocerr items.
* Improve the wording to make it comprehensible.
* Mention the offending macro.
* Garbage collect one chunk of ancient, long unreachable code.
|
|
|
|
|
| |
this bug is more than four years old, introduced by kristaps@
in mdocml.bsd.lv rev. 1.46, March 30, 2010.
|
|
|
|
|
| |
since this is hardly more complicated than explicitly ignoring them
as we did in the past. Of course, do not use them!
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
| |
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.
|
|
|
|
|
| |
This doesn't hurt normal manual display
and makes the mandocdb(8) database more useful.
|
|
|
|
|
| |
This doesn't hurt normal manual display
and makes the mandocdb(8) database more useful.
|
|
|
|
| |
No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at the end of partial implicit macros. Prodded by jmc@.
Actually, this is a revert of rev. 1.64 Fri May 14 14:09:13 2010 UTC
by kristaps@, with this original commit message:
"Block-implicit macros now up-propogate end-of-sentence spacing.
NOTE: GROFF IS NOT SMART ENOUGH TO DO THIS."
Please speak after me: Then why the hell should we?
We already weakened this in rev. 1.93 Sun Jul 18 17:00:26 2010 UTC,
but that weakening was insufficient. Let's take it out completely.
Admittedly, there are two places in OpenBSD base where what Kristaps
did make the output nicer, in calloc(3) and in fish(6). But both are
atypical. There are 18 other places where this revert makes the
output nicer, the typical case being:
"Mail status is shown as ``No Mail.'' if there is no mail."
You do *not* want the EOS spacing after ``No Mail.'' in that sentence.
|
|
|
|
|
|
| |
but only within .Nm blocks. Simplify the code accordingly.
Triggered by research done by Franco Fichtner.
|
|
|
|
|
|
|
|
| |
we have to compare the line where the first one *ends* (not where it begins)
to the line where the second one starts.
This fixes the bug that .Bk allowed output line breaks right after block
macros spanning more than one input line, even when the next macro follows
on the same line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Regarding mandocdb(8), this fixes yet another regression introduced
when switching from DB to SQLite: The ability to search for strings
crossing word boundaries was lost and is hereby restored. At the
same time, database sizes and build times are both reduced by a bit
more than 5% each.
|
|
|
|
|
|
|
|
|
|
| |
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
|