| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
anticipate doing much more than this for the coming release.
Also, remove "base" part of struct html (not used anywhere) and put some
comments in struct html.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(isn't now, but will need to be, used by -T[x]html also). Necessitated
a lot of churn in getting tbl_calc* code out of tbl_term.c and into
out.c, including renaming some structures and so on. The abstraction is
in having a pointer to a wrapper function for calculating string widths.
The char devices use term_strlen and term_len; the others will probably
just use strlen().
While at it, remove some superfluous assertions in the tbl code. This
allows all tbl manuals to clear.
Lastly, set the right-margin to be the maximum margin for each table
span. This allows big, complicated tbl-pages like terminfo to be
displayed. They're ugly, but they work.
|
| |
|
| |
|
|
|
|
|
| |
For now, parse and ignore minimal column width specifications.
First step to get terminfo(5) to build.
|
| |
|
|
|
|
| |
Added cross-links to tbl.7 from other manuals.
|
|
|
|
|
|
|
| |
encountered as a line's last data cell, move into TBL_PART_CDATA mode
whilst leaving the cell's designation as TBL_DATA_NONE. When new data
arrives that's not a standalone `T}', append it to the cell contends.
Close out and warn appropriately.
|
| |
|
|
|
|
| |
recode ASCII_HYPHEN and ASCII_NBRSP before passing back for widths.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
the up-coming version, although we're not quite there yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument parsing (in man_argv.c, man_args()), both having different bugs,
to use one common macro argument parser (in mandoc.c, mandoc_getarg()),
because from the point of view of roff, man macros are just roff macros,
hence their arguments are parsed in exactly the same way.
While doing so, fix these bugs:
* Escaped blanks (i.e. those preceded by an odd number of backslashes)
were mishandled as argument separators in unquoted arguments to
user-defined roff macros.
* Unescaped blanks preceded by an even number of backslashes were not
recognized as argument separators in unquoted arguments to man macros.
* Escaped backslashes (i.e. pairs of backslashes) were not reduced
to single backslashes both in unquoted and quoted arguments both
to user-defined roff macros and to man macros.
* Escaped quotes (i.e. pairs of quotes inside quoted arguments) were
not reduced to single quotes in man macros.
OK kristaps@
Note that mdoc macro argument parsing is yet another beast for no good
reason and is probably afflicted by similar bugs. But i don't attempt
to fix that right now because it is intricately entangled with lots of
unrelated high-level mdoc(7) functionality, like delimiter handling and
column list phrase handling. Disentagling that would waste too much
time now.
|
| |
|
|
|
|
|
|
|
|
| |
this may be moved to tbl.7, but for the time being, keep it in the
document as it's developed.
Also note that my handling of horizontal rules in layouts needs some
work.
|
| |
|
|
|
|
|
| |
on. Note also that -Tps and -Tpdf, with these last two commits, produce
more readable output ("less crappy").
|
| |
|
|
|
|
|
| |
properly handle embedded escapes when calculating its widths. NOTE:
this doesn't yet apply to the decimal-point calculation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
failure (this had caused some segfaults with the new assert() call in
MAN_HALT and MDOC_HALT).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
functions assert() if they're called after MDOC_HALT is set.
This makes more sense than returning 0 because this return value is used
for parse errors, not programme-flow errors, and it's inconsistent to
use the same value for both. Plus, prior to this, I'd return 0 without
printing an error message, which would cause failure to go unreported to
the operator.
|
|
|
|
| |
header stuff.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
from tbl.bsd.lv. This is more or less verbatim, less queue macros and also
a check for NULL layout.
This concludes the back-end parsing for a little while, as the front-end
display may now be configured.
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Add forgotten assignment of span to -man's TBL nodes.
|
| |
|
|
|
|
|
|
|
| |
external-facing function man_addspan() (this required shuffling around
the descope routine) and hooks elsewhere.
Also fixed mdoc.c's post-validation of tables.
|
| |
|
|
|
|
|
|
| |
external-facing function mdoc_addspan(), then various bits to prohibit
printing and scanning (this requires some if's to be converted into
switch's).
|
| |
|
|
|
|
| |
roff.h interface.
|
|
|
|
| |
This completes the parsing phase of the new tbl implementation.
|