Age | Commit message (Collapse) | Author |
|
new features:
* support the .in macro in man(7)
* support minimal PDF output
* support .Sm in mdoc(7) HTML output
* support .Vb and .nf in man(7) HTML output
* complete the mdoc(7) manual
bug fixes:
* do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@
* avoid double blank lines related to man(7) .sp and .br
* let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@
* let "\ " produce a non-breaking space; reported by deraadt@
* discard \m colour escape sequences; reported by J.C. Roberts
* map undefined 1-character-escapes to the literal character itself
maintenance:
* express mdoc(7) arguments in terms of an enum for additional type-safety
* simplify mandoc_special() and a2roffdeco()
* use strcspn in term_word() in place of a manual loop
* minor optimisations in the -Tps and -Thtml formatting frontends
|
|
an .Nm block, and gets special handling (new line, indentation).
But .Nm in the middle of a line is just a normal in-line element,
so make sure it does NOT get the special handling.
Partly fixes the test(1) SYNOPSIS; indentation after "[" is still
excessive, which is an unrelated and more difficult issue.
Reminded of the problem by jmc@;
OK kristaps@.
|
|
old groff_man.7 we currently install. As a first step, move the new
manual where it belongs, not changing any content except the OpenBSD
marker. The plan is, after some polishing, to install man.7 and not
install groff_man.7 any longer.
jmc@, sobrado@ and kristaps@ agree
|
|
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"
jmc@ and sobrado@ like this
|
|
and not with a delay, after the next token. But be careful not to cause
leading white space at the beginning of a line or column.
Improves chmod(1), ksh(1), tar(1), ps(1) and probably many more.
ok kristaps@ jmc@ sobrado@
|
|
|
|
1) Proper .Bk support: allow output line breaks at input line breaks,
but keep input lines together in the output, finally fixing
synopses like aucat(1), mail(1) and tmux(1).
2) Mostly finished -Tps (PostScript) output.
3) Implement -Thtml output for .Nm blocks and .Bk -words.
4) Allow iterative interpolation of user-defined roff(7) strings.
Also contains some minor bugfixes and some performance improvements.
|
|
no time for more refinement right now.
In particular, fixes terminfo(3) and mdoc.samples(7).
ok kristaps@, who will add the HTML frontend bits
|
|
and -item list as well, empty bodies are OK, they do not even
warrant a warning, much less the error they were throwing.
According to kristaps, joerg@ also brought this up some time ago.
ok kristaps@ jmc@
|
|
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@ 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@
|
|
* avoid error exit code after mere warnings
* add ERROR: and FATAL: to messages when appropriate
* sort the code in mmsg() to make it easier on the eye
* make the mandocerrs[] list easier to maintain
* update a few comments in mandoc.h
ok 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@
|
|
* support -Tps -Opaper=a4 and -Opaper=letter
* lots of mandoc.1 manual improvements
|
|
|
|
Cluestick applied by deraadt.
|
|
Kristaps coded this from scratch after reading my .nr patch;
it is simpler and more powerful.
Registers live in struct regset in regs.h, struct man and struct mdoc
contain pointers to it. The nS register is cleared when parsing .Sh.
Frontends respect the MDOC_SYNPRETTY flag set in mdoc node_alloc.
|
|
unclear about which units accept floats/integers, which leads me to
assume that it handles either and rounds as appropriate.
from kristaps@
|
|
* do not print invalid arguments verbatim (no groffs prints them, either)
* do not trigger TERMP_PREKEEP twice
* do not die from invlid arguments (groff won't die, either)
* continue to ignore even valid arguments (just like groff)
ok kristaps@ on the previous version, before removing my last bug ;)
|
|
|
|
OK and one stylistic tweak by kristaps@.
|
|
move all width calculations in term_*.c, *_width().
From kristaps.
|
|
* bug fixes:
- interaction of ASCII_HYPH with special chars (found by Ulrich Spoerlein)
- handling of roff conditionals (found by Ulrich Spoerlein)
- .Bd -offset will no more default to 6n
* maintenance:
- more caching of .Bd and .Bl arguments for efficiency
- deconstify man(7) validation routines
- add FreeBSD library names (provided by Ulrich Spoerlein)
* start PostScript font-switching
|
|
so far, monospace without font decoration,
but it already has page headers and footers
|
|
Clean up vertical spacing in the SYNOPSIS, making the code much more
systematic; this doesn't solve all SYNOPSIS problems yet, in particular
not those related to keeps, indentation and the low-level .nr roff
instruction, but it's a nice step forward and i couldn't find relevant
regressions. (from kristaps)
Besides,
* make the output width configurable (default: -Owidth=80) (kristaps)
* use mmap with MAP_SHARED (from Joerg Sonnenberger)
|
|
The main step forward is that this now has *much* better .Bl -column
support, now supporting many manuals that previously errored out
without producing any output.
Other fixes include:
* do not die from multiple list types, use the first and warn
* in .Bl without a type, default to -item
* various tweaks to .Dt
* fix .In, .Fd, .Ft, .Fn and .Fo formatting
* some documentation fixes and additions
* and fix a couple of bugs reported by Ulrich Spoerlein:
* better support for roff block-end "\}" without a preceding dot
* .In must not break the line outside SYNOPSIS
* spelling in some error messages
While merging, fix one regression in .In spacing
that needs to go to bsd.lv, too.
|
|
which is mostly the post-hackathon release,
bringing in the OpenBSD changes to bsd.lv,
but which also has a few additional minor fixes:
* .Lb is an in-line macro, not in_line_eoln
* .Bt, .Ud now warn when discarding arguments
* allow bad -man dates to flow verbatim into the front-ends
- so far all reported by Ulrich Spoerlein
* .Ar, .Fl and .Li starting with closing punctuation emit an empty element
* empty .Li macros print nothing, but may cause spacing
* proper EOS handling for .Bt, .Ex, .Rv, and .Ud.
* cleanup: collapse posts_xr into posts_wtext (which is the same)
* efficiency: very simple table lookup for roff.c
|
|
in both our old in-tree groff and in mandoc, because
1) It looks and reads better.
2) It agrees with both bsd.lv mandoc and with modern groff.
The tmac.an part was done by millert@, with a minor fix by me.
While touching our old groff, switch off hyphenation, suggested a long
time ago by millert@. It helps searching and comparisons.
While touching mandoc terminal_man(), explicitely initialize the
tabwidth - not strictly required, but easier to understand
and more robust, also suggested by millert@.
General mumbling of agreement by many,
including millert@ deraadt@ jmc@ sobrado@ ...
Remaining problem:
Setting the title length (.lt) has no effect for me,
but we can fix this in tree in case anybody figures it out.
|
|
|
|
at least one hyphen, we already had support for breaking the line a the
last fitting hyphen. This patch improves this functionality by only
breaking at hyphens in free-form text, and by not breaking at hyphens
* at the beginning or end of a word or
* immediately preceded or followed by another hyphen or
* escaped by a preceding backslash.
Before this patch, differences in break-at-hyphen support were one
of the major sources of noise in automatic comparisons to mdoc(7)
groff output. Now, the remaining differences are hard to find among
the noise coming from other sources.
Where there are still differences, what we do seems to be better than
what groff does, see e.g. the chio(1) exchange and position commands
for one of the now rare examples.
idea and coding by kristaps@
Besides, this was the last substantial code difference left
between bsd.lv and openbsd.org. We are now in full sync.
|
|
|
|
requested by kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
forgotten when backing my .if/.ie/.el out of libman
|
|
.Bl -tag
.Sm off
.It ...
triggered an assertion, which it shouldn't;
the warning that .Bl -tag "requires the width argument" is enough.
From Joerg Sonnenberger.
|
|
modern groff produces three blank lines before the man(7) footer;
from Joerg Sonnenberger.
|
|
patch from Joerg Sonnenberger;
this finally fixes the test(1) SYNOPSIS.
|
|
This will eventually be used so that mdoc_macro can know whether to
dump list line arguments into the body (`Bl -column' overflowing).
Remove a2list() and arg_listtype() because of this.
From kristaps@.
While merging, fix a regression in mdoc_term.c, print_bvspace():
The bsd.lv version of this broke vertical spacing in .Bl -column.
|
|
sigvec(3) triggers MANDOCERR_BODYLOST, which must not be fatal
|
|
featuring three message levels, as agreed during the mandoc hackathon:
* FATAL parser failure, cannot produce any output from this input file:
eventually, we hope to convert most of these to ERRORs.
* ERROR, meaning mandoc cannot cope fully with the input syntax and will
probably lose information or produce structurally garbled output;
it will try to produce output anyway but exit non-zero at the end,
which is eventually intended to make the ports infrastructure happy.
* WARNING, meaning you should clean up the input file, but output
is probably mostly OK, so this will not cause error-exit at the end.
This commit is mostly just converting the old system to the new one; before
the classification will become really reliable, we must check all messages.
In particular,
* set up a new central message string table in main.c
* drop the old message string tables from man.c and mdoc.c
* get rid of the piece-meal merr enums in libman and libmdoc
* reduce number of error/warning functions from 16 to 6 (still a lot...)
While here, handle a few problems more gracefully:
* allow .Rv and .Ex to work without a prior .Nm
* allow .An to ignore extra arguments
* allow undeclared columns in .Bl -column
Written by kristaps@.
|
|
|
|
|