summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tbl.71
-rw-r--r--tbl_opts.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/tbl.7 b/tbl.7
index 986ed674..99b50f20 100644
--- a/tbl.7
+++ b/tbl.7
@@ -135,6 +135,7 @@ in the case of
.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
diff --git a/tbl_opts.c b/tbl_opts.c
index 86e0ed15..e13b349a 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -182,7 +182,7 @@ again: /*
*
* 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:]+ [)]
@@ -213,7 +213,7 @@ again: /*
buf[i] = '\0';
- while (isspace((unsigned char)p[*pos]))
+ while (isspace((unsigned char)p[*pos]) || p[*pos] == ',')
(*pos)++;
/*