| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
on the same output line, even if it is longer than the output width.
This commit fixes a bug allowing an overly long last line of an
indented block (.RS) to be broken even in literal mode.
The bug was found using the sudo_plugin(4) manual provided by millert@.
I introduced the bug in rev. 1.84 during the g2k12 Budapest hackathon.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reminded about the missing feature by millert@.
This reduces mandoc/groff differences in OpenBSD base by 25%.
ok millert@
|
|
|
|
|
|
|
| |
do not let it depend on the default indent provided by -Oindent.
By default, this doesn't change anything because 7 / 2 = 3;
in -Omdoc mode, it makes man(7) output the same as mdoc(7) output.
OpenBSD rev. 1.87
|
|
|
|
|
|
| |
and ignore .sp after .PP. This fixes vertical spacing
for blank lines after .PP and for .sp after .PP.
OpenBSD rev. man.c 1.68 and man_term.c 1.86
|
|
|
|
|
|
| |
In -mdoc -Tman, improve the framework to control vertical spacing.
Use both to support .Bl -compact (surprisingly hard to get right).
OpenBSD rev. 1.85 and 1.34, respectively.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* do not add an excessive blank line before the block
* in literal mode, start a new line after the tag
getting this to work requires some general (print_man_node) fixes:
* in literal mode, break the output line at the end of each
input line, not just after those input lines ending in text
* but don't break it when there was no output on the line
* and adjust the margins after the .HP tag
these general fixes require an adjustment to -Tascii .TP rendering:
* set up NOBREAK mode before the body, not after the head
finally, based on all this, implement -Tman .Bl -hang in terms of .HP
OpenBSD rev. 1.84 and 1.29, respectively
|
|
|
|
|
| |
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.
|
| |
|
|
|
|
| |
some man(7) changes to accomodate for the an-ext compatibility.
|
|
|
|
|
|
|
|
|
|
|
| |
* one instead of three blank lines after the page header;
* one instead of three blank lines before the page footer;
* source instead of title(section) in the lower right corner.
Select this style variant with the undocumented command line option -Omdoc.
In the long run, we hope to unify the ouput of both languages and
to pull this out again, but that requires coordination with groff.
Grudgingly ok and, (as usual,-) more comments requested by kristaps@
|
|
|
|
|
|
|
|
| |
because that will skip root node validation, potentially entering
rendering modules will NULL pointers lurking in the meta data.
Instead, always validate the root node and (as suggested by joerg@)
assert validity of the meta data before using it in the renderers.
ok joerg@
|
|
|
|
| |
handling NULL strings.
|
| |
|
|
|
|
|
|
|
| |
just like the default right margin already is. This may be useful for
people with expensive screen real estate. Besides, it helps automated
man(7) to mdoc(7) output comparisons to validate -Tman output.
ok kristaps@ on an earlier version
|
|
|
|
|
|
|
| |
forget about pending whitespace (vbl), or the next line would
be misaligned and potentially too long; but i'm fixing this
in a simpler way than he proposed.
Also remove the kludges in .HP that compensated for this bug.
|
|
|
|
|
|
|
| |
to have *next*-line head arguments on the *same* input line.
So .TP must not assume that a head argument with a matching
input line number is a same-line argument (and access a NULL pointer).
Bug found and fix tested by kristaps@ with groff_hdtbl(7).
|
|
|
|
|
|
| |
to the default and check that the left does not outgrow the right one.
Otherwise, the (rmargin >= offset) assertion fails in term_flushln().
Bug found and fix tested by kristaps@ with NetBSD slapo-retcode(5).
|
|
|
|
|
|
| |
this was forgotten after man_term.c rev. 1.25 on March 2, 2010.
The benefit is a sane page header line when .Dt is very long.
Reminded by Thomas Klausner <wiz at NetBSD>, thanks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In columnated contexts (.Bl -column, .Bl -tag, .IP, .TP, .HP etc.), do not
pad after writing a column. Instead, always pad before writing content.
In itself, this change avoids:
- writing trailing whitespace in some situations
- with .fi/.nf in .HP, breaking lines that were already padded
It allows several bugfixes included in this patch:
- Do not count backspace as a character with positive width.
- Set up proper indentation when encountering .fi/.nf in .HP.
- Adjust the .HP indentation width to what groff does.
- Never unlimit the right margin unless in the final column.
ok kristaps@
|
|
|
|
|
|
|
|
| |
This patch was originally written in July 2011 by kristaps@,
i promptly committed it to OpenBSD, and then it was forgotten.
Now i rediscovered it when merging 1.11.7 to OpenBSD.
ok kristaps@ (on his own patch :)
|
|
|
|
| |
minimum: unseparated terms.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
literal mode (`nf') is ended by SH (and, it turns out, SS as well).
Noted the updated behaviour in man.7 as well.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
before paragraphs and/or within `RS' blocks.
|
|
|
|
|
|
|
|
| |
accomodate for the fix, then for the front-ends. -T[x]html accepted the
syntax tree natively, but -Tascii had to use relative offsets. It's
quite a simple fix.
From a TODO by {dcoppa,dsoares}@openbsd.
|
|
|
|
|
|
|
| |
like -Tascii. While adding this, inline term_alloc() (was a one-liner),
remove some switches around the terminal encoding for the symbol table
(unnecessary), and split out ascii_alloc() into ascii_init(), which is
also called from locale_init().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
change any code but for renaming functions and types to be consistent
with other mandoc.h stuff. The reason for moving into libmandoc is that
the rendering of special characters is part of mandoc itself---not an
external part. From mandoc(1)'s perspective, this changes nothing, but
for other utilities, it's important to have these part of libmandoc.
Note this isn't documented [yet] in mandoc.3 because there are some
parts I'd like to change around beforehand.
|
|
|
|
|
| |
necessary to all [real] front-ends, so stop pretending it's special.
While here, add some documentation to the variable types.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
directives. For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).
|
|
|
|
| |
ok kristaps@
|
|
|
|
| |
End-of-sentence spacing got lost for man(7) after plain text lines.
|
|
|
|
|
|
|
| |
* .br .sp .nf .fi .na with arguments - just skip the arguments
* .TH lacking arguments - use empty strings instead like groff
* .TH with excessive arguments - skip those
Reminded by joerg@, ok kristaps@.
|
|
|
|
|
|
| |
into macro processing code. Fixing a regression introduced in 1.95,
found because it caused segfaults in my regression suite.
OK kristaps@
|
|
|
|
|
|
|
|
|
|
| |
.nf
.B hello world
.fi
Also, clean up the print_man_node() function a little bit. This problem
has long since been in the TODO and was recently noted again by Brad
Smith. The -T[x]html fix will follow...
|
|
|
|
| |
shall precede outputted text (surprise!).
|
|
|
|
| |
From an assertion noted by Brad (at comstyle).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Affecting both -Tascii and -Thtml:
* The .IP HEAD uses the second argument as the width, not the last one.
* Only print the first .IP HEAD argument, not all but the last.
Affecting only -Tascii:
* The .IP and .TP HEADs must be printed without literal mode,
but literal mode must be restored afterwards.
* After the .IP and .TP bodies, we only want term_newln(), not
term_flushln(), or we would get two blank lines in literal mode.
* The .TP HEAD does not use TWOSPACE, just like .IP doesn't either.
* In literal mode, clear NOLPAD after each line, or subsequent lines
would get no indentation whatsoever.
Affecting only -Thtml:
* Only print next-line .TP children, instead of all but the first.
OK kristaps@ on the -Tascii part; and:
"Can you work this into man_html.c, too?"
|
| |
|
|
|
|
|
|
| |
not sure whether it's in the header calculation or term.c squashing
spaces or whatever, but let's get this in for general testing as soon as
possible.
|
|
|
|
|
|
|
| |
external-facing function man_addspan() (this required shuffling around
the descope routine) and hooks elsewhere.
Also fixed mdoc.c's post-validation of tables.
|
|
|
|
|
|
|
|
| |
me package, aren't recognised by "groff -mandoc" so we don't need to do
so either. Discussed on tech@ with schwarze@.
While at it, remove references to `b' in man.7. As far as I know, this
was never supported anyway.
|
|
|
|
|
| |
schwarze@, but without the -T[x]html handling, which structurally does
not work. Also add man.7 documentation (not in original patch).
|
|
|
|
|
| |
Merge patch by schwarze@ consolidating RB, BR, etc. into one function.
man_html.c already does this.
|