From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 9d3452fd; for ; Wed, 26 Nov 2014 12:51:55 -0500 (EST) Date: Wed, 26 Nov 2014 12:51:55 -0500 (EST) Message-Id: <17029289856927212331.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Allow comma-separated options in tbl(7) tables. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Allow comma-separated options in tbl(7) tables. Provides better groff compatibility. >From bentley@. Modified Files: -------------- mdocml: tbl.7 tbl_opts.c Revision Data ------------- Index: tbl.7 =================================================================== RCS file: /home/cvs/mdocml/mdocml/tbl.7,v retrieving revision 1.20 retrieving revision 1.21 diff -Ltbl.7 -Ltbl.7 -u -p -r1.20 -r1.21 --- tbl.7 +++ 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 Index: tbl_opts.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/tbl_opts.c,v retrieving revision 1.14 retrieving revision 1.15 diff -Ltbl_opts.c -Ltbl_opts.c -u -p -r1.14 -r1.15 --- tbl_opts.c +++ 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)++; /* -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv