From 5b9fac5e713255fd71fe6d4dfb25ad29e2db9413 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 8 Jul 2017 17:52:49 +0000 Subject: 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. --- tbl_data.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tbl_data.c') diff --git a/tbl_data.c b/tbl_data.c index a6b6962e..ae1906ef 100644 --- a/tbl_data.c +++ b/tbl_data.c @@ -1,4 +1,4 @@ -/* $Id: tbl_data.c,v 1.44 2017/07/04 21:08:29 schwarze Exp $ */ +/* $Id: tbl_data.c,v 1.45 2017/07/08 17:52:50 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2015, 2017 Ingo Schwarze @@ -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 * -- cgit v1.2.3-56-ge451