source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Allow comma-separated options in tbl(7) tables.
Date: Wed, 26 Nov 2014 12:51:55 -0500 (EST)	[thread overview]
Message-ID: <17029289856927212331.enqueue@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2014-11-26 17:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17029289856927212331.enqueue@fantadrom.bsd.lv \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).