source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Allow comma-separated options in tbl(7) tables.
@ 2014-11-26 17:51 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-11-26 17:51 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-26 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-26 17:51 mdocml: Allow comma-separated options in tbl(7) tables schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).