Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
found by Ulrich Spoerlein <uqs at freebsd> using the clang static analyzer;
"ok, but please document the numbers" kristaps@
|
|
into PostScript and PDF documents behind the user's back.
Joerg Sonnenberger pointed out that almost all software
creating PostScript and PDF documents does so, even on OpenBSD,
but that doesn't make the leakage much better in my book.
According to all standards i could find, this information is optional.
Issue originally reported by deraadt@; "commit!" kristaps@.
|
|
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@
|
|
- Remember the line-number of a tbl_span, and use it in messages.
- Put *_span_alloc() functions right into the *_addspan() ones,
since these are the only places they are called from.
|
|
Original patch from kristaps@, but i fixed a regression regarding .Bk.
|
|
keep flags before they are called.
Without this bugfix, .Bk was ineffective in some cases.
"looks reasonable" kristaps@
|
|
from kristaps@.
|
|
leading whitespace; from kristaps@.
|
|
from kristaps@.
|
|
Convert the first character of the second argument to uppercase.
Append the second argument with a hyphen.
Improves chpass(1), column(1), fstat(1), ...
from kristaps@
|
|
|
|
Don't use it in new manuals, it is inherently non-portable, but we
need it for backward-compatibility with existing manuals, for example
in Xenocara driver pages.
ok kristaps@ matthieu@ jmc@
|
|
ok kristaps@
|
|
generate man(7) or mdoc(7) nodes for all these spans,
not only for the last one.
Restores the horizontal lines in the cpu(4/hppa) tables.
ok kristaps@
|
|
Instead, let one line of input data add two new spans
to the tbl tree during one single call of tbl_data().
Note that this causes the horizontal line to get parsed
into the tbl tree, but not yet used in the output,
which will be fixed next.
Avoids data loss in cpu(4/hppa).
ok kristaps@
|
|
correct alignment of centered cells
adjust horizontal rule width to the new spacing
ok kristaps@
|
|
for now. All of these just cause a bit too much or too little
whitespace, but no serious formatting problems.
|
|
As pointed out by Joerg Sonnenberger, this is useful
because we use mmap(3) and look for '\n' by hand.
"check it in" kristaps@
|
|
End-of-sentence spacing got lost for man(7) after plain text lines.
|
|
Most empty in_line() macros are already removed by the parser,
so there is no need to check again in mdoc_validate.c.
This also downgrades almost all remaining argument count issues
from ERROR to WARNING.
ok kristaps@
|
|
make it clear that you cannot use mandoc to format that page (yet).
Triggered by a report from brad@.
|
|
* .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 Sonnenberger, ok kristaps@.
|
|
Change how -Thtml behaves with tables: use multiple rows, with widths
set by COL, until an external macro is encountered. At this point in
time, close out the table and process the macro. When the first table
row is again re-encountered, re-start the table. This requires a bit of
tracking added to "struct html", but the change is very small and
follows the logic of meta-fonts. This all follows a bug-report by
joerg@.
|
|
* Make out-of-context .fi invocations not cause an error, but just a warning.
* Downgrade -man message about ignored empty paragraph to MANDOC_IGNPAR.
* Avoid syntax tree corruption when removing empty block macros.
Triggered by some reports from brad@.
|
|
arguments. This fixes a long-standing bug reported repeatedly,
in particular by naddy@ and brad@.
Fix by kristaps@, minus one regression caught by my test suite.
|
|
then it will start a new output line;
from kristaps@.
|
|
* horizontal lines do not consume layout lines
* skip excessive data cells
* prepare rendering of spanned cells
* support vertical spans
|
|
Using the new roff_getname() function, this is really simple.
Breaks mandoc of the habit of reporting an error in each pod2man(1) preamble.
Reminded by a report from brad@.
|
|
margin, do not run into an assert(3)ion.
Problem reported by brad@ in gm(1), fix by kristaps@.
|
|
Unify parsing of names given as roff request arguments into a new
function roff_getname(), which is rather different from the parsing
function for normal arguments, mandoc_getarg(), because names cannot
be quoted and cannot contain whitespace or escaped characters.
The new function now throws an ERROR when finding escaped characters
in a name.
"I'm fine with this." kristaps@
|
|
found by lint(1), fixed by kristaps@, no functional change.
|
|
while .Bd -unfilled has 5-character tabs just like normal text;
from kristaps@.
|
|
written by kristaps@, looked over by jmc@.
|
|
* .T} can be followed by a delimiter, then more data.
* Do not limit table column widths (improves terminfo(5)).
* Let numerical cells respect explicitly specified minimum cell widths.
* Let terminal output survive missing data cells.
* Parse and ignore arguments in parentheses on layout cell specifications.
* Move tbl_calc() into out.c such that it can be used by all frontends.
* Give tables an HTML class.
* Some cleanup in tbl -Thtml code.
All code by kristaps@.
|
|
by assert(3)ing valid parser state in the main parsing functions;
from kristaps@.
|
|
Original commit message:
For now, parse and ignore minimal column width specifications.
First step to get terminfo(5) to build.
|
|
there are still a few bugs, but fixing these will be easier in tree.
|
|
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?"
|
|
* Do not segfault on empty .Db, .Rs, .Sm, and .St.
* Let check_count() really throw the requested level, not always ERROR.
* Downgrade most bad argument counts from ERROR to WARNING.
* And some related internal cleanup.
Looks fine to kristaps@.
Note that the macros using eerr_ge1() still need to be checked at a later
time; but as all the others are done, let's use what we already have.
|
|
the remaining ones default to the empty string, not to NULL.
Regression reported and fix tested by kristaps@.
|