| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
mandoc also now warns (so does tbl(1)) if a horizontal spanner is
specified along with data.
While here, fix up some documentation and uncomment the tbl reference.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for front-ends to make decisions about widths, not the back-end.
To pull this off, first make each tbl_head contain a unique index value
(0 <= index < total tbl_head elements) and remove the tbl_calc() routine
from the back-end.
Then, when encountering the first tbl_span in the front-end, dynamically
create an array of configurations (termp_tbl) keyed on each tbl_head's
unique index value. Construct the decimals and widths at this time,
then continue parsing as before.
The termp_tbl and indexes are required because we pass a const tbl AST
into the front-end.
|
| |
|
|
|
|
|
|
|
| |
existing 'struct tbl' as 'struct tbl_node', then move all option stuff
into a 'struct tbl' in mandoc.h.
This conflicted with a structure in chars.c, which was renamed.
|
|
|
|
| |
with a little star next to the entry (yeah, this is mostly for testing).
|
|
|
|
|
|
|
|
|
|
| |
layout for each row, including vertical spacers. One grabs the tbl_head
for a row and iterates through each entry, plugging data from the
tbl_span into the header as appropriate.
This is pulled in more or less verbatim from tbl.bsd.lv. In fact, this
is verbatim except that lists macros are made into hard-coded lists (for
compatibility, as long-ago noted by joerg@).
|
|
|
|
| |
tables a little bit smarter.
|
|
|
|
|
|
| |
Add bits to remember tbl's invocation point.
Add ERROR class message if no data's in the table.
|
|
|
|
| |
roff.h interface.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
completely with the BSD.lv code due to performance issues and flat-out
errors.
Performance issues: functions called per character. Ugly.
Flat-out errors: disallowing "reserved" tokens as arguments to those
options accepting arguments.
Also added are two mandoc.h error codes for general tbl syntax errors
and for bad options.
|
|
|
|
|
|
|
| |
although technically-speaking a lost macro is an error (e.g.,
MANDOCERR_MACRO), casting out some extra whitespace (note, IGNPAR only
happens in conditions where whitespace already exists!) is hardly an
error matter.
|
|
|
|
|
|
|
| |
Remove `Pp' or `Lp' if it is the FIRST or LAST child of an `Sh' or `Sh' body.
Make "skipping paragraph" be an error, not a warning, as information (an
invoked macro) is ignored.
|
|
|
|
|
|
| |
For now, use the simplest conceivable approach, like groff does:
Just a fixed, ugly input stack limit.
"check it in" kristaps@
|
|
|
|
| |
except for the tbl one which will be the focus of later study.
|
|
|
|
|
| |
schwarze@, but without the -T[x]html handling, which structurally does
not work. Also add man.7 documentation (not in original patch).
|
|
|
|
| |
ending of scopes and drop stray scope-endings.
|
|
|
|
| |
NOARGV warnings. From patch by schwarze@.
|
| |
|
|
|
|
|
|
|
| |
making sure output doesn't add a superfluous newline with the nested displays.
Also add a COMPATIBILITY note.
Rename a macro (DATESIZ) to be in line with OpenBSD (DATESIZE).
|
|
|
|
| |
schwarze@ and joerg@ for his comments!
|
|
|
|
| |
Made `rm' be an error (again, OpenBSD...).
|
|
|
|
|
|
|
|
|
| |
Remove MANDOCERR_BADLIB (not used).
Moved `St' handling from mdoc_action.c into mdoc_validate.c.
Moved relevant MDOC_LITERAL macros (`Dl', `Bd' subtypes) from
mdoc_action.c into mdoc_validate.c.
|
|
|
|
| |
Making IGNARGV be an ERROR, not a WARNING, as information is lost.
|
|
|
|
| |
While I'm add it, properly document all structures in these files.
|
|
|
|
|
| |
slow process of logically splitting formatting frontend and parser backend
without pollution.
|
|
|
|
| |
specified).
|
|
|
|
|
|
|
|
|
|
| |
report an ERROR: We can still render the page by just closing
the open scope, but it is likely that information will be missing
or document structure mangled.
Before, man(7) only reported a WARNING (which is dangerous because
we cannot be sure rendering is correct) and mdoc(7) ran into FATAL
(which is too drastic, there is no reason not to show what we have).
"looks good" kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.
|
|
|
|
|
|
|
|
|
| |
specifically say that this is not allowed, and were it allowed, output
would be inconsistent across output media (-Tps will puke,
non-your-charset terminals will puke, etc.).
With this done, simplify check_text() to only check escapes and for
tabs. Add in a new tab warning, too.
|
|
|
|
| |
been in the first place (mandoc.h contains system-wide declarations).
|
| |
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
sure where this came about. Added regression tests to convince myself
that this is so. Also consolidated COMPATIBILITY notes regarding `Bd'.
Added COMPATIBILITY note to the effect that old groff pukes on `Bd
-compact -ragged' (regression test will fail on old groff).
|
|
|
|
|
|
|
|
|
|
|
| |
only calculated once in mdoc_validate.c.
Noted that `Bd -file xxx' is not supported: it now raises a fatal
warning. This is noted in mdoc.7.
Empty `Bd' now defaults to LIST_ragged, which is not quite what groff
does, but close enough (gross just throws away the `Bd' and gets upset
when it encounters an `Ed').
|
|
|
|
|
|
|
|
|
|
| |
relieves having to repeat running over the argument list in
mdoc_action.c and mdoc_validate.c.
Default to LIST_item for type-less lists (groff technically doesn't do
this: it just ignores the `It' lines altogether).
Make MANDOC_LISTTYPE be a recoverable error.
|
| |
|
|
|
|
|
|
|
|
| |
list).
Reverted MANDOC_COLUMNS to be a bad-bad syntax error: we don't, and
apparently never have, allowed mixing of -column syntaxes. This would
have segfaulted if encountered.
|
|
|
|
|
|
|
| |
Breakable hyphens are cued in the back-ends (with ASCII_HYPH) and acted
upon in term.c or ignored in html.c.
Also cleaned up XML decl printing (no need for extra vars).
|
|
|
|
|
| |
MANDOCERR_BODYLOST is not intended to be fatal;
required to unbreak the OpenBSD build
|
|
|
|
|
|
|
|
|
|
|
| |
stringified in main.c.
Allow `An' to handle an argument and child (with a warning).
Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a
warning).
Allow inconsistent column syntax to only raise a warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.ig ig
asdf
.ig
fdsa
..
or
.ig if
asdf
.if n \
foo
for a laugh. It all works. Lots of regression tests supporting this
and documentation for the same.
|
|
|
|
|
| |
Check against some strange `.if' constructs I missed.
Added initial roff.7 manual.
|
|
|
|
| |
Initial warning/error messages in place (still experimental).
|
|
with unified ones.
Add initial roff pre-processor shim, a compiler sitting outside of the other compilers that processes pure roff instructions.
|