summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* If the first character of free-form text is whitespace, then a newlineKristaps Dzonsons2011-01-129-10/+42
| | | | shall precede outputted text (surprise!).
* Note that "^" needs an empty cell, while "s" does not.Kristaps Dzonsons2011-01-111-0/+2
|
* Add support for "^" vertical spanners. Unlike GNU tbl, raiseKristaps Dzonsons2011-01-116-7/+40
| | | | | | | 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...
* Don't let `in' creep past the right margin.Kristaps Dzonsons2011-01-111-0/+5
| | | | From an assertion noted by Brad (at comstyle).
* Refactoring in preparation for .rm support:Ingo Schwarze2011-01-113-38/+47
| | | | | | | | | | Unify parsing of names given as roff request arguments into a new function roff_getname(), which is rather different from the parsing function for normal arguments, mandoc_getarg(), because names cannot be quoted and cannot contain whitespace or escaped characters. The new function now throws an ERROR when finding escaped characters in a name. "I'm fine with this." kristaps@
* Clarify what members may be NULL or not in calculating widths. MakeKristaps Dzonsons2011-01-104-23/+27
| | | | | sure signedness is correct. Verify that layouts MUST exit for data cells.
* Make dp->string always consist of a value.Kristaps Dzonsons2011-01-102-15/+14
|
* First, make extra data cells be thrown away. This makes "dp->layout"Kristaps Dzonsons2011-01-108-33/+83
| | | | | | | | | | | | 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.
* some minor issues reported by brad@Ingo Schwarze2011-01-101-0/+15
|
* 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@.
* Remove lots of issues that have been resolved,Ingo Schwarze2011-01-091-22/+15
| | | | and rephrase some that have been partially resolved.
* Add some unsigned char casts for tolower() usageJoerg Sonnenberger2011-01-092-4/+4
|
* Note that we support the "a" key.Kristaps Dzonsons2011-01-081-2/+1
|
* The numerical column type centres on the *last* decimal point.Kristaps Dzonsons2011-01-083-3/+3
|
* Give the "n" cell type knowledge of its spacing.Kristaps Dzonsons2011-01-083-17/+16
|
* Meh, 2010->2011. Changed the live index.html file so as not to confuseKristaps Dzonsons2011-01-072-2/+2
| | | | people (although the tagged 1.10.9 release will show 2010).
* Oops: get rid of stray whitespace.VERSION.1.10.9Kristaps Dzonsons2011-01-071-1/+1
|
* Fixes: T} can be followed by a delimiter then more data. Make thisKristaps Dzonsons2011-01-074-16/+46
| | | | | | | | | 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-075-17/+20
|
* Version bits. Here we go...Kristaps Dzonsons2011-01-072-41/+41
|
* Tiny bits in place for tbl horizontal spans. This will wait for the nextKristaps Dzonsons2011-01-072-3/+24
| | | | release to be implemented in full.
* Make -literal displays only have 8-character displays. From aKristaps Dzonsons2011-01-062-6/+3
| | | | low-hanging TODO added by schwarze@ on 15/08/10.
* Remove delims from struct tbl (not used anywhere and never will be).Kristaps Dzonsons2011-01-062-3/+2
|
* Clean-up www page a bit.Kristaps Dzonsons2011-01-061-11/+12
|
* Restructured tbl_html() function so that we always clean up our columns.Kristaps Dzonsons2011-01-061-39/+42
|
* Make -T[x]html for tables structure cells with a width. I don'tKristaps Dzonsons2011-01-062-10/+55
| | | | | | | 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.
* Tweaks to tbl.7 from Jason McIntyre.Kristaps Dzonsons2011-01-051-8/+8
|
* Stuff tbl_calc() into out.c so that it can be shared by all output modesKristaps Dzonsons2011-01-054-263/+328
| | | | | | | | | | | | | | | | (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.
* Give tables an HTML class.Kristaps Dzonsons2011-01-052-5/+16
|
* Tweak some language in tbl.7.Kristaps Dzonsons2011-01-051-12/+19
|
* Merge from OpenBSD (similar to my original fix committed on Oct 15, 2010):Ingo Schwarze2011-01-041-0/+2
| | | | | For now, parse and ignore minimal column width specifications. First step to get terminfo(5) to build.
* Add tbl.7 to DOCUMENTATION. Removed old NEWS items.Kristaps Dzonsons2011-01-041-133/+17
|
* Moved table stuff from roff.7 into the new tbl.7 (suggested by Jason McIntyre).Kristaps Dzonsons2011-01-046-212/+335
| | | | Added cross-links to tbl.7 from other manuals.
* Support `T{' and `T}' data blocks. When a standalone `T{' isKristaps Dzonsons2011-01-048-15/+78
| | | | | | | 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-043-13/+20
| | | | 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-045-49/+65
| | | | | | | 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.
* Protect tbl nodes from getting a post call.Kristaps Dzonsons2011-01-041-3/+10
|
* Add skeleton for -T[x]html tbl stuff. Also start to put in some bits aboutKristaps Dzonsons2011-01-046-5/+94
| | | | the up-coming version, although we're not quite there yet.
* Multiple man(7) .IP and .TP fixes started during p2k10:Ingo Schwarze2011-01-042-36/+33
| | | | | | | | | | | | | | | | | | | | | 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?"
* Partial cleanup of argument count validation in mdoc(7):Ingo Schwarze2011-01-033-67/+71
| | | | | | | | | | | | * 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.
* Calling a macro with fewer arguments than it is defined with is OK;Ingo Schwarze2011-01-031-1/+1
| | | | | the remaining ones default to the empty string, not to NULL. Regression reported and fix tested by kristaps@.
* Unify roff macro argument parsing (in roff.c, roff_userdef()) and man macroIngo Schwarze2011-01-034-113/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove TODO for tbl.Kristaps Dzonsons2011-01-031-2/+0
|
* Switch on the `TS' documentation in roff.7. As per off-line discussion,Kristaps Dzonsons2011-01-032-126/+175
| | | | | | | | 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.
* For tbl: -man documents print an extra space before `TS' blocks.Kristaps Dzonsons2011-01-031-0/+2
|
* 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-036-215/+239
| | | | | | | | | | | | | | | | 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.