| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.
|
|
|
|
|
|
|
|
|
|
| |
* let .Nm fall back to the empty string, not to UNKNOWN
* never let .Rv copy an argument from .Nm
* avoid spurious \fR after empty .Nm in -Tman
* correct handling of .Ex and .Rv in -Tman
* correct the wording of the output for .Rv without arguments
* use non-breaking spaces in .Ex and .Rv output where required
* split MANDOCERR_NONAME into a warning for .Ex and an error for .Nm
|
|
|
|
|
| |
so let us do the same for compatibility. Using this feature is of
course not recommended except in manual page obfuscation contests.
|
|
|
|
|
| |
since this is hardly more complicated than explicitly ignoring them
as we did in the past. Of course, do not use them!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Repair three instances of silent truncation, use asprintf(3).
* Change two instances of strlen(3)+malloc(3)+strlcpy(3)+strlcat(3)+...
to use asprintf(3) instead to make them less error prone.
* Cast the return value of four instances where the destination
buffer is known to be large enough to (void).
* Completely remove three useless instances of strlcpy(3)/strlcat(3).
* Mark two places in -Thtml with XXX that can cause information loss
and crashes but are not easy to fix, requiring design changes of
some internal interfaces.
* The file mandocdb.c remains to be audited.
|
|
|
|
|
| |
the length of the title is unknown, and speed doesn't matter here,
so use asprintf/free rather than a static buffer
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
left quotes.
Also, properly reinitialize the styles attribute string buffer for
each column in a table so that the attributes don't accumulate.
Patch from Matthew@ Dempsky, tweaked by me; OpenBSD rev. 1.66.
|
|
|
|
|
| |
no space between the delimiters and the enclosed text.
The mdoc_html.c part was added by kristaps; ok 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@.
|
|
|
|
|
| |
if desired, they can be overridden in the CSS file.
Suggested by kristaps@, and i always like to simplify code.
|
|
|
|
|
| |
manual output in existing HTML or XHTML documents, e.g., when invoking
mandoc from an SSI or CGI.
|
|
|
|
| |
doing manpages.bsd.lv stuff.
|
|
|
|
|
|
|
|
|
| |
margin. This is dubious: the HTML4 spec specifically says that
BLOCKQUOTE shouldn't be abused for indentation, which is exactly what we
do. However, `D1' needs indentation and it's the only way to force text
browsers to do so. Alternatives?
Also remove the unused HALFINDENT defines while here.
|
|
|
|
|
| |
`Li' prints as a CODE tag and the style-sheet has the `lit' class apply
to multiple tag types.
|
|
|
|
|
|
| |
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'.
|
| |
|
|
|
|
|
|
|
| |
these in the front-ends except for -Ttree, which will display the parsed
tree.
While here, fix that quoted strings aren't scanned for replacement parts.
|
|
|
|
|
|
| |
concatenated string. This for some reason hasn't been found before now... ?
Anyway, fixed, and make the IDs created again be correctly prefixed by a
letter as per the HTML spec.
|
|
|
|
|
|
| |
followed by non-digits, e.g. `1g', really means `1'. Next, fix some
spacing issues where `sp' was invoked in -man after sections or
subsections. Make sure this behaviour is mirrored in -Thtml.
|
|
|
|
| |
provided. From a patch by Tim van der Molen.
|
|
|
|
| |
Make buffmt functions internally bufinit(), too.
|
|
|
|
|
|
| |
bufcat_id(), then collapse it into a little function without so much
crap. Next, make bufinit() only be called when we really need to do so,
and not simply before pre/post calls.
|
|
|
|
|
|
|
|
|
|
| |
conditional; same for print_xmltype() and print_doctype(), same reason;
make bufncat() be static, as it was only being called from html.c;
have bufcat() simply call through to strlcat(). Finally, assert()
whenever we truncate.
Also rename buffmt() -> bufcat_fmt() to differentiate from buffmt_man et
al., which do not concatenate.
|
|
|
|
|
| |
widths (e.g., `Bl -tag -width "\s[blahblah]bar"). This has long since
been done for -Tascii but escaped noticed with -T[x]html.
|
|
|
|
| |
test it enough).
|
|
|
|
|
|
|
|
| |
quick fix for, say, rc.d(8) in OpenBSD, which has nested macros on the
`Nm' SYNOPSIS line that were skipped over by the length calculator. This
should [maybe?] be a recursive length check, but still it'd need to be
a min-width to accomodate for (say) `Qq' and the like printing excess
characters post-length-calculation.
|
|
|
|
| |
perusal of online manuals.
|
|
|
|
| |
being used.
|
|
|
|
| |
twice.
|
|
|
|
| |
includes an unreported bug where `Ex' wasn't properly adding a newline.
|
|
|
|
|
| |
output. This also makes it easier to read. While here, remove
superfluous assignment to local variables for this and `Mt'.
|
|
|
|
|
| |
assumptions about its children. Also remove superfluous reassignment to
local variable.
|
|
|
|
| |
variables.
|
|
|
|
|
| |
first argument. groff of course doesn't do links, but it will uglify
subsequent arguments in the list (we warn about >1, anyway).
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a first step to get rid of the frequent petty warnings in this area:
- always store dates as strings, not as seconds since the Epoch
- for input, try the three most common formats everywhere
- for unrecognized format, just pass the date though verbatim
- when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@
|
|
|
|
| |
the concatenated string (in -T[x]html, it gets a SPAN, too).
|
|
|
|
|
| |
Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared
the keep flag.
|
|
|
|
|
| |
directives. For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).
|
|
|
|
|
| |
shitty groff behaviour. Do the same, but raise a warning to this
effect. This from a TODO noted by schwarze@.
|
|
|
|
| |
whitespace.
|
|
|
|
| |
This removes a TODO raised by schwarze@.
|
| |
|
| |
|
|
|
|
| |
with "xxBSD-yy"
|