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