diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-08 17:52:49 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-08 17:52:49 +0000 |
commit | 093b704b943e58cc16bd6065cc571372f7059b56 (patch) | |
tree | b258d28e058a17b345ca4067b1922e772bf9b217 /tbl_data.c | |
parent | a7d3439bd1214fd20650366b5177cb87d787982d (diff) | |
download | mandoc-093b704b943e58cc16bd6065cc571372f7059b56.tar.gz |
Simplify by creating struct roff_node syntax tree nodes for tbl(7)
right from roff_parseln() rather than delegating to read.c,
similar to what i just did for eqn(7).
The interface function roff_span() becomes obsolete and is deleted,
the former interface function roff_addtbl() becomes static,
the interface functions tbl_read() and tbl_cdata() become void,
and minus twelve linus of code.
No functional change.
Diffstat (limited to 'tbl_data.c')
-rw-r--r-- | tbl_data.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -128,7 +128,7 @@ getdata(struct tbl_node *tbl, struct tbl_span *dp, tbl->parse, ln, sv, dat->string); } -int +void tbl_cdata(struct tbl_node *tbl, int ln, const char *p, int pos) { struct tbl_dat *dat; @@ -143,10 +143,10 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p, int pos) pos++; while (p[pos] != '\0') getdata(tbl, tbl->last_span, ln, p, &pos); - return 1; + return; } else if (p[pos] == '\0') { tbl->part = TBL_PART_DATA; - return 1; + return; } /* Fallthrough: T} is part of a word. */ @@ -166,8 +166,6 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p, int pos) if (dat->layout->pos == TBL_CELL_DOWN) mandoc_msg(MANDOCERR_TBLDATA_SPAN, tbl->parse, ln, pos, dat->string); - - return 0; } static struct tbl_span * |