From 445b12f7ab17bc0449361eeb2f956d5a1a9bcdd6 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 26 Jan 2015 00:57:22 +0000 Subject: Improve (or rather, rewrite) tbl(7) option parsing. * Allow the layout to start after the semicolon on the options line. * Ignore leading commas. * Option arguments cannot contain closing parentheses. * Avoid needless UNSUPP messages. * Better ERROR reporting. * Delete unused "linesize" field in struct tbl_opts. * No need for static buffers. * Garbage collect one almost empty wrapper function. Improved functionality, but minus 40 lines of code. --- read.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index 70fe8240..090f5261 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.115 2015/01/24 01:58:33 schwarze Exp $ */ +/* $Id: read.c,v 1.116 2015/01/26 00:57:22 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -180,6 +180,10 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "unexpected end of equation", /* related to tables */ + "non-alphabetic character in tbl options", + "skipping unknown tbl option", + "missing tbl option argument", + "wrong tbl option argument size", "no table layout cells specified", "no table data cells specified", "ignore data in cell", @@ -218,8 +222,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "input too large", "unsupported control character", "unsupported roff request", - "unsupported table syntax", - "unsupported table option", "unsupported table layout", "ignoring macro in table", }; -- cgit v1.2.3-56-ge451