=================================================================== RCS file: /cvs/mandoc/mandoc.c,v retrieving revision 1.76 retrieving revision 1.78 diff -u -p -r1.76 -r1.78 --- mandoc/mandoc.c 2014/03/23 11:25:26 1.76 +++ mandoc/mandoc.c 2014/04/08 01:37:27 1.78 @@ -1,7 +1,7 @@ -/* $Id: mandoc.c,v 1.76 2014/03/23 11:25:26 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.78 2014/04/08 01:37:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2011, 2012, 2013 Ingo Schwarze + * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -161,29 +161,26 @@ mandoc_escape(const char **end, const char **start, in /* * These escapes are of the form \X'Y', where 'X' is the trigger * and 'Y' is any string. These have opaque sub-strings. + * The \B and \w escapes are handled in roff.c, roff_res(). */ case ('A'): /* FALLTHROUGH */ case ('b'): /* FALLTHROUGH */ - case ('B'): - /* FALLTHROUGH */ case ('D'): /* FALLTHROUGH */ case ('o'): /* FALLTHROUGH */ case ('R'): /* FALLTHROUGH */ - case ('w'): - /* FALLTHROUGH */ case ('X'): /* FALLTHROUGH */ case ('Z'): - if ('\'' != **start) + if ('\0' == **start) return(ESCAPE_ERROR); gly = ESCAPE_IGNORE; + term = **start; *start = ++*end; - term = '\''; break; /* @@ -203,11 +200,11 @@ mandoc_escape(const char **end, const char **start, in case ('v'): /* FALLTHROUGH */ case ('x'): - if ('\'' != **start) + if (strchr("\0 %&()*+-./0123456789:<=>", **start)) return(ESCAPE_ERROR); gly = ESCAPE_IGNORE; + term = **start; *start = ++*end; - term = '\''; break; /*