Age | Commit message (Collapse) | Author |
|
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.
|
|
of -Ofragment and -Tman; using input from jmc@ and kristaps@.
|
|
Implement .Rv in -Tman.
Let -man -Tman work a bit like cat(1).
Add the -Ofragment option to -T[x]html.
Minor fixes in -T[x]html.
Lots of apropos(1) and -Tman code cleanup.
|
|
2) Link both that one and mandocdb(8) into the mandoc(1) binary.
3) Install a /usr/bin/mandocdb hardlink and the mandocdb(8) manual.
Do not replace /usr/bin/apropos by a hardlink yet because it is
not ready for production, and ports integration is still missing.
Development will be done in the tree, even the user interfaces
are still subject to change at this point.
Both jmc@ and deraadt@ agree with getting this in.
|
|
implement .Bl -bullet
add more information to the .TH line
escape dots at the beginnings of lines
add trailing newline character at the end of the file
do not misinterpret the ROOT block as .Ap
|
|
specifier that makes it look nicer;
ok schwarze kristaps
|
|
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.
|
|
support .Lb -libdwarf and update .Lb -libelf
after Werner Lemberg committed a patch by Joseph Koshy
|
|
to work both with and without frames and rulers.
Started during BSDCan 2011 in Ottawa, finished during s2k11 in Ljubljana.
ok kristaps@
|
|
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 variables that might be changed;
from kristaps@
|
|
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.
This reduces the groff/mandoc-differences in base by nearly 20%,
from 89k to 72k lines of diffs.
ok kristaps@
|
|
is both preceded and followed by an alphabetic character.
This fixes about a dozen places in base.
|
|
If a string is defined in terms of itself, the REPARSE_LIMIT in read.c
used to break the cycle. This no longer works since all the work
is now done in the function roff_res(), looping indefinitely.
Make this loop finite by arbitrarily limiting the number of times one
string may be expanded; when that limit is reached, leave the remaining
string references unexpanded.
This changes behaviour compared to 1.11.5, where the whole line would
have been dropped. The new behaviour is better because it loses less
information. We don't want to imitate groff-1.20.1 behaviour anyway
because groff aborts parsing of the whole file.
|
|
even a breakable hyphen may be bold or underlined
With this fix, 1.11.7 reduces the groff/mandoc differences in
base by about 10% (100k -> 90k lines of diffs) with respect to 1.11.5.
|
|
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring
regressions are so minor that it's better to get this in
and fix them in the tree
|
|
adding an implementation of the eqn(7) language
by kristaps@
So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.
|
|
to convert mdoc(7) documents to the man(7) language.
This is work in progress and will be developed in tree.
It does already handle the cat(1) manual,
but will hardly handle all your fancy manuals yet.
go ahead kristaps@ jmc@ millert@ deraadt@
|
|
in particular, allow recursing multiple directories and create
multiple databases in one call.
This commit includes some reorganization, and exposing mandoc_strdup
as a utility function in mandoc.h.
written by kristaps@
|
|
a revision number for ISO 8601; in addition, the revision number makes
the text unwieldy when discussing the standard in a casual manner.
therefore change the macro from -8601-4 to simply -8601, which will output
"ISO 8601". i'll get kristaps or ingo to make the change upstream to mandoc.
discussed with/ok millert
|
|
ok kristaps (who will update the mandoc repo)
|
|
with release 1.11.4. Correct this for release.
|
|
generated manuals; this fixes more than 500 manuals in base alone.
As a real fix, .tr will be supported after unlock.
OK kristaps@ to put in the workaround for now
|
|
This will soon be needed for the HISTORY of string(3).
|
|
Will need adjustments to user interface and functionality, and will be
linked into the mandoc(1) binary and hardlinked from /usr/libexec/mandocdb
to /usr/bin/mandoc when ready for general consumption.
The ultimate goal is to call it from OpenBSD::Makewhatis to replace
OpenBSD::Makewhatis::Unformated with enhanced functionality.
|
|
(1) Simply linking the future utilities (mandoc, mandocdb, apropos, whatis)
into a common binary inspecting its process name to find out what it
should do (as suggested by deraadt@) does not require the large code
changes i feared at first, but can be done in a few lines.
(2) As reported by dhill@, we already had the first build system problem
before even enabling this: Building without "make obj", the mandoc binary
name clashes with the new mandoc subdirectory, breaking the build.
Please use "cvs up -dP" when updating!
|
|
and these new utilities will use the mandoc libraries, so prepare
the build system to build the parsing and utility libraries separately
from the main program and formatters. Not yet linked to the build.
No objections from deraadt@ on adding directories for this purpose.
|
|
from kristaps@
|
|
the hash chain or an extra function for checking matches;
from kristaps@
|
|
keep a stack of left margins; this fixes e.g. lynx(1).
While here, clean up some code in .TP HEAD;
it can only have text children, anyway.
From kristaps@.
|
|
- Actually let roff_parse() recognize ".\}" as a cond block end request.
- Do not rewrite "\}" to the zero-width space "\&" because that prevents
recognition of immediately preceding macros; use normal blanks instead.
- To avoid a vertical spacing regression in pod2man(1) manuals,
drop one vertical spacing request just before NAME.
From kristaps@.
|
|
calling the post handler, such that it doesn't clobber specific decisions
made in the post handler.
Fixes a regression related to vertical spacing in nsd-xfer(8).
Patch from kristaps@.
|
|
- mdoc(7): fix an assertion if the first line after .Bd -column
starts with a blank, and some simplifications in mdoc_argv.c
- man(7): literal mode ends at .SH and .SS (bug reported by naddy@)
- allow .RS/.RE blocks to nest (bug reported by dcoppa@ and gsoares@)
- improve vertical spacing of man(7) blocks
- roff(7): clear user-defined strings when starting a new file
- correct ID tags in -T[x]html
|
|
if no link title is provided.
Based on a patch by Tim van der Molen, tweaked by kristaps@.
|
|
|
|
Some predefined strings got changed in -Tascii mode.
With this fix, they change in other output modes, but -Tascii is what matters.
|
|
* Do not pass integers outside the ASCII range to isprint().
* Make sure escaped characters are really printed verbatim
when the escape sequence has no special meaning.
|
|
* Unicode output support (no Unicode input yet, though).
* Refactoring: completely handle predefined strings in roff.c.
- New function mandoc_escape() replaces a2roffdeco() and mandoc_special().
- Start using mandoc_getarg() in mdoc_argv.c.
- Clean up parsing of delimiters in mdoc(7).
* And many minor fixes and lots of cleanup.
|
|
or "POSIX.2", respectively, but not "POSIX". That's closer to Open Group
usage, leads to consistency in our own mandoc, and agrees with what
both mandoc on other BSDs and groff-1.21 do.
ok jmc@; "no objection" millert@; "no concerns" guenther@.
|
|
OK kristaps@.
|
|
Fixing a regression introduced in bsd.lv rev. 1.105.
|
|
The latter got lost due to a regression in bsd.lv rev. 1.130.
|
|
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.
|
|
lots of cleanup and maintenance work by kristaps@.
- move some main.c globals into struct curparse
- move mandoc_*alloc to mandoc.h such that all code can use them
- make mandoc_isdelim available to formatting frontends
- dissolve mdoc_strings.c, move the code where it is used
- make all error reporting functions void, their return values were useless
- and various minor cleanups and fixes
|
|
Bug reported by Tristan dot LeGuern at gmail dot com in fvwm(1).
tweaks and ok kristaps@; earlier version looked good to espie@ as well
|
|
Written by kristaps@.
Sorry, and thanks to jmc@ for noticing so quickly.
|
|
Written by kristaps@.
For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.
|