summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-08 17:52:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-08 17:52:49 +0000
commit093b704b943e58cc16bd6065cc571372f7059b56 (patch)
treeb258d28e058a17b345ca4067b1922e772bf9b217 /tbl_data.c
parenta7d3439bd1214fd20650366b5177cb87d787982d (diff)
downloadmandoc-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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tbl_data.c b/tbl_data.c
index 32a169d7..01bc62d2 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -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 *