aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_term.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the vertical spacing around tbl(7) instances in man(7).Ingo Schwarze2012-05-271-3/+7
| | | | | | | | | | | | | | | Groff forces the document author to manually request sufficient spacing after .TE - that is, at least .sp 1v after a table with the "box" option and at least .sp 2v after a table with the "doublebox" option - or else it clobbers the box. I consider that insane, so i'm not imitating groff in that respect. Instead, i add at least as much vertical space as groff, or more where required to avoid clobbering the box. Consequently, output will be identical for input that looks sane with groff, and mandoc will make output look better for input that looks bad with groff. "Please check them in and I'll look into them later!" kristaps@
* Correct width of horizontal spans; relevant in case of centered orIngo Schwarze2012-05-271-4/+12
| | | | | | | | flush right text, for boxes, and when more columns follow the span. Issue found by sthen@ in the net/arp-scan(1) port manual. "Please check them in and I'll look into them later!" kristaps@
* Do not handle vertical lines as additional tbl(7) columns,Ingo Schwarze2012-05-271-60/+28
| | | | | | | | | | | | | | | | instead save their properties with the following column. This simplifies layout parsing and saves a lot of code related to column handling. At output time, print all white space and vertical lines separating columns before printing the following column, and none after printing the preceding column, considerably simplifying white space handling and width calculations. No functional change, but it saves 150 lines of code, and it allows the next patch to tbl_term.c, tbl_literal(). "Please check them in and I'll look into them later!" kristaps@
* Major rewrite of the horizontal spacing of tablesIngo Schwarze2011-09-201-96/+101
| | | | | to work both with and without frames and rulers. ok kristaps@
* Fix copyright email.Kristaps Dzonsons2011-07-171-2/+2
|
* correct horizontal spacing of data cellsIngo Schwarze2011-01-251-8/+11
| | | | | | correct alignment of centered cells adjust horizontal rule width to the new spacing ok kristaps@
* Add support for "^" vertical spanners. Unlike GNU tbl, raiseKristaps Dzonsons2011-01-111-1/+4
| | | | | | | error-class messages when data is being ignored by specifying it in "^" cells (either as-is or in blocks). Also note again that horizontal spanners aren't really supported...
* Make dp->string always consist of a value.Kristaps Dzonsons2011-01-101-15/+13
|
* First, make extra data cells be thrown away. This makes "dp->layout"Kristaps Dzonsons2011-01-101-13/+26
| | | | | | | | | | | | always hold, which cleans up the table stuff a bit. Second, set a "spans" value per data cell consisting of the number of skipped TBL_CELL_SPAN layout cells. Third, make tbl_term.c understand how to skip over spanned sections when iterating over the header queue. What remains is to calculate the widths of spanned cells.
* The numerical column type centres on the *last* decimal point.Kristaps Dzonsons2011-01-081-2/+2
|
* Give the "n" cell type knowledge of its spacing.Kristaps Dzonsons2011-01-081-4/+1
|
* Fixes: T} can be followed by a delimiter then more data. Make thisKristaps Dzonsons2011-01-071-12/+13
| | | | | | | | | work and add documentation for it. Also make tbl_term() not puke if the number of data cells is less than the number of layout cells (which happens from time to time). This still needs work because we should pad out empty cells so that the borders all work out.
* Quiesce lint with some type handling. Does not change anything.Kristaps Dzonsons2011-01-071-9/+12
|
* Stuff tbl_calc() into out.c so that it can be shared by all output modesKristaps Dzonsons2011-01-051-249/+101
| | | | | | | | | | | | | | | | (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.
* Support `T{' and `T}' data blocks. When a standalone `T{' isKristaps Dzonsons2011-01-041-8/+6
| | | | | | | 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.
* Have horizontal spanner not clobber pre-set width.Kristaps Dzonsons2011-01-041-2/+5
|
* Fix spacing for tables to use term_len(). Also make term.c properlyKristaps Dzonsons2011-01-041-10/+10
| | | | recode ASCII_HYPHEN and ASCII_NBRSP before passing back for widths.
* Fix to make horizontal spanners in the layout be properly printed.Kristaps Dzonsons2011-01-041-29/+10
| | | | | | | 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.
* Switch on the `TS' documentation in roff.7. As per off-line discussion,Kristaps Dzonsons2011-01-031-1/+2
| | | | | | | | 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.
* Add in support for number table cells that account for escapes and soKristaps Dzonsons2011-01-031-18/+29
| | | | | on. Note also that -Tps and -Tpdf, with these last two commits, produce more readable output ("less crappy").
* Clean up the tbl top-level printing code and document the parts of it.Kristaps Dzonsons2011-01-031-23/+46
|
* Start using term_strlen() instead of strlen(). tbl_term.c can nowKristaps Dzonsons2011-01-031-34/+39
| | | | | properly handle embedded escapes when calculating its widths. NOTE: this doesn't yet apply to the decimal-point calculation.
* Make width calculations occur within tbl_term.c, not tbl.c. This allowsKristaps Dzonsons2011-01-031-39/+228
| | | | | | | | | | | | | | | | 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.
* Turn on -Tascii tbl printing. The output still has some issues---I'mKristaps Dzonsons2011-01-021-0/+358
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.