source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Accept arbitrary argument delimiters for various roff(7) escape
@ 2014-04-07 17:51 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-04-07 17:51 UTC (permalink / raw)
  To: source

Log Message:
-----------
Accept arbitrary argument delimiters for various roff(7) escape sequences.
Needed for example by the new Perl pod2man(1) preamble.

Modified Files:
--------------
    mdocml:
        mandoc.c

Revision Data
-------------
Index: mandoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -Lmandoc.c -Lmandoc.c -u -p -r1.76 -r1.77
--- mandoc.c
+++ mandoc.c
@@ -179,11 +179,11 @@ mandoc_escape(const char **end, const ch
 	case ('X'):
 		/* FALLTHROUGH */
 	case ('Z'):
-		if ('\'' != **start)
+		if ('\0' == **start)
 			return(ESCAPE_ERROR);
 		gly = ESCAPE_IGNORE;
+		term = **start;
 		*start = ++*end;
-		term = '\'';
 		break;
 
 	/*
@@ -203,11 +203,11 @@ mandoc_escape(const char **end, const ch
 	case ('v'):
 		/* FALLTHROUGH */
 	case ('x'):
-		if ('\'' != **start)
+		if (strchr("\0 %&()*+-./0123456789:<=>", **start))
 			return(ESCAPE_ERROR);
 		gly = ESCAPE_IGNORE;
+		term = **start;
 		*start = ++*end;
-		term = '\'';
 		break;
 
 	/*
--
 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-04-07 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 17:51 mdocml: Accept arbitrary argument delimiters for various roff(7) escape 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).