summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate messages. Have all parse-time messages (in libmdoc,Kristaps Dzonsons2011-03-201-4/+7
| | | | | | | | | libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the time being in libmandoc.h. This requires struct mparse to be passed into the allocation routines instead of mandocmsg and a void pointer. Then, move some of the functionality of the old mmsg() into read.c's mparse_mmsg() (check against wlevel and setting of file_status) and use main.c's mmsg() as simply a printing tool.
* Make lint shut up a little bit.Kristaps Dzonsons2011-03-151-2/+4
|
* Let the line-number of a tbl_span be remembered.Kristaps Dzonsons2011-02-061-8/+9
|
* Since tbl_data() can now produce multiple spans, let parsebuf()Ingo Schwarze2011-01-251-0/+1
| | | | | | | 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@
* Do not skip data after horizontal lines in the layout.Ingo Schwarze2011-01-251-16/+44
| | | | | | | | | | 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@
* Add support for "^" vertical spanners. Unlike GNU tbl, raiseKristaps Dzonsons2011-01-111-1/+5
| | | | | | | 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...
* Clarify what members may be NULL or not in calculating widths. MakeKristaps Dzonsons2011-01-101-2/+3
| | | | | sure signedness is correct. Verify that layouts MUST exit for data cells.
* Make dp->string always consist of a value.Kristaps Dzonsons2011-01-101-1/+2
|
* First, make extra data cells be thrown away. This makes "dp->layout"Kristaps Dzonsons2011-01-101-6/+23
| | | | | | | | | | | | 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.
* When a row of data is being parsed and it's a line or double-lineKristaps Dzonsons2011-01-091-3/+9
| | | | | | | (instead of data), re-use the last "layout" pointer instead of advancing to the next one. This fixes a segfault report by joerg@.
* Fixes: T} can be followed by a delimiter then more data. Make thisKristaps Dzonsons2011-01-071-4/+16
| | | | | | | | | 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-0/+1
|
* Tiny bits in place for tbl horizontal spans. This will wait for the nextKristaps Dzonsons2011-01-071-2/+6
| | | | release to be implemented in full.
* Support `T{' and `T}' data blocks. When a standalone `T{' isKristaps Dzonsons2011-01-041-5/+52
| | | | | | | 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.
* Fix to make horizontal spanners in the layout be properly printed.Kristaps Dzonsons2011-01-041-0/+5
| | | | | | | 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.
* Add some final bits necessary in the upcoming -Tascii tbl stuff.Kristaps Dzonsons2011-01-021-1/+5
|
* Churn to get parts of 'struct tbl' visible from mandoc.h: rename theKristaps Dzonsons2011-01-021-4/+4
| | | | | | | 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.
* Add a warning if a data cell has no layout. Also make -Ttree show thisKristaps Dzonsons2011-01-011-0/+3
| | | | with a little star next to the entry (yeah, this is mostly for testing).
* Add bits for compilation on Mac.Kristaps Dzonsons2011-01-011-0/+1
|
* Make some bit-flags into enums as they should be. Make printing of -TtreeKristaps Dzonsons2011-01-011-8/+10
| | | | tables a little bit smarter.
* Switch on tbl rows being added to the parse stream. Here we go!Kristaps Dzonsons2011-01-011-1/+1
|
* Assign layout cells to parsed data. This follows primarily fromKristaps Dzonsons2010-12-301-0/+31
| | | | tbl.bsd.lv, although it has been reimplemented.
* Move clean-up of parsed tbl nodes into the tbl_clear() function, calledKristaps Dzonsons2010-12-301-5/+11
| | | | once per invocation.
* Initial check-in of table data-row processing. For the time being, thisKristaps Dzonsons2010-12-291-0/+96
parses table data then throws it away immediately. It does not yet try to cross-check data rows against layout or anything. This copied more or less completely from tbl.bsd.lv.