summaryrefslogtreecommitdiffstats
path: root/tbl_term.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright email.Kristaps Dzonsons2011-07-171-1/+1
|
* correct horizontal spacing of data cellsIngo Schwarze2011-01-251-7/+10
| | | | | | 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-0/+3
| | | | | | | 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-14/+12
|
* First, make extra data cells be thrown away. This makes "dp->layout"Kristaps Dzonsons2011-01-101-12/+25
| | | | | | | | | | | | 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-1/+1
|
* Give the "n" cell type knowledge of its spacing.Kristaps Dzonsons2011-01-081-3/+0
|
* Fixes: T} can be followed by a delimiter then more data. Make thisKristaps Dzonsons2011-01-071-11/+12
| | | | | | | | | 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-8/+11
|
* Stuff tbl_calc() into out.c so that it can be shared by all output modesKristaps Dzonsons2011-01-051-248/+100
| | | | | | | | | | | | | | | | (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-7/+5
| | | | | | | 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-1/+4
|
* Fix spacing for tables to use term_len(). Also make term.c properlyKristaps Dzonsons2011-01-041-9/+9
| | | | 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-28/+9
| | | | | | | 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-0/+1
| | | | | | | | 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-17/+28
| | | | | 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-22/+45
|
* Start using term_strlen() instead of strlen(). tbl_term.c can nowKristaps Dzonsons2011-01-031-33/+38
| | | | | 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-38/+227
| | | | | | | | | | | | | | | | 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.