Provides better groff compatibility.
From bentley@.
-.\" $Id: tbl.7,v 1.20 2014/10/14 02:16:06 schwarze Exp $
+.\" $Id: tbl.7,v 1.21 2014/11/26 17:51:55 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 14 2014 $
+.Dd $Mdocdate: November 26 2014 $
.Ss Options
The first line of a table consists of space-separated option keys and
modifiers terminated by a semicolon.
.Ss Options
The first line of a table consists of space-separated option keys and
modifiers terminated by a semicolon.
+For GNU compatibility, option keys can also be separated by commas.
If the first line does not have a terminating semicolon, it is assumed
that no options are specified and instead a
.Sx Layout
If the first line does not have a terminating semicolon, it is assumed
that no options are specified and instead a
.Sx Layout
-/* $Id: tbl_opts.c,v 1.14 2014/08/10 23:54:41 schwarze Exp $ */
+/* $Id: tbl_opts.c,v 1.15 2014/11/26 17:51:55 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
*
* options ::= option_list [:space:]* [;][\n]
* option_list ::= option option_tail
*
* options ::= option_list [:space:]* [;][\n]
* option_list ::= option option_tail
- * option_tail ::= [:space:]+ option_list |
+ * option_tail ::= [,:space:]+ option_list |
* ::= epsilon
* option ::= [:alpha:]+ args
* args ::= [:space:]* [(] [:alpha:]+ [)]
* ::= epsilon
* option ::= [:alpha:]+ args
* args ::= [:space:]* [(] [:alpha:]+ [)]
- while (isspace((unsigned char)p[*pos]))
+ while (isspace((unsigned char)p[*pos]) || p[*pos] == ',')