version 1.94, 2015/10/06 18:32:19 |
version 1.95, 2015/10/12 00:08:15 |
Line 93 mandoc_escape(const char **end, const char **start, in |
|
Line 93 mandoc_escape(const char **end, const char **start, in |
|
* Escapes taking no arguments at all. |
* Escapes taking no arguments at all. |
*/ |
*/ |
case 'd': |
case 'd': |
/* FALLTHROUGH */ |
|
case 'u': |
case 'u': |
/* FALLTHROUGH */ |
|
case ',': |
case ',': |
/* FALLTHROUGH */ |
|
case '/': |
case '/': |
return ESCAPE_IGNORE; |
return ESCAPE_IGNORE; |
|
|
Line 115 mandoc_escape(const char **end, const char **start, in |
|
Line 112 mandoc_escape(const char **end, const char **start, in |
|
* 'X' is the trigger. These have opaque sub-strings. |
* 'X' is the trigger. These have opaque sub-strings. |
*/ |
*/ |
case 'F': |
case 'F': |
/* FALLTHROUGH */ |
|
case 'g': |
case 'g': |
/* FALLTHROUGH */ |
|
case 'k': |
case 'k': |
/* FALLTHROUGH */ |
|
case 'M': |
case 'M': |
/* FALLTHROUGH */ |
|
case 'm': |
case 'm': |
/* FALLTHROUGH */ |
|
case 'n': |
case 'n': |
/* FALLTHROUGH */ |
|
case 'V': |
case 'V': |
/* FALLTHROUGH */ |
|
case 'Y': |
case 'Y': |
gly = ESCAPE_IGNORE; |
gly = ESCAPE_IGNORE; |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
Line 155 mandoc_escape(const char **end, const char **start, in |
|
Line 145 mandoc_escape(const char **end, const char **start, in |
|
* The \B and \w escapes are handled in roff.c, roff_res(). |
* The \B and \w escapes are handled in roff.c, roff_res(). |
*/ |
*/ |
case 'A': |
case 'A': |
/* FALLTHROUGH */ |
|
case 'b': |
case 'b': |
/* FALLTHROUGH */ |
|
case 'D': |
case 'D': |
/* FALLTHROUGH */ |
|
case 'R': |
case 'R': |
/* FALLTHROUGH */ |
|
case 'X': |
case 'X': |
/* FALLTHROUGH */ |
|
case 'Z': |
case 'Z': |
gly = ESCAPE_IGNORE; |
gly = ESCAPE_IGNORE; |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
Line 181 mandoc_escape(const char **end, const char **start, in |
|
Line 166 mandoc_escape(const char **end, const char **start, in |
|
* and 'N' resolves to a numerical expression. |
* and 'N' resolves to a numerical expression. |
*/ |
*/ |
case 'h': |
case 'h': |
/* FALLTHROUGH */ |
|
case 'H': |
case 'H': |
/* FALLTHROUGH */ |
|
case 'L': |
case 'L': |
/* FALLTHROUGH */ |
|
case 'l': |
case 'l': |
/* FALLTHROUGH */ |
|
case 'S': |
case 'S': |
/* FALLTHROUGH */ |
|
case 'v': |
case 'v': |
/* FALLTHROUGH */ |
|
case 'x': |
case 'x': |
if (strchr(" %&()*+-./0123456789:<=>", **start)) { |
if (strchr(" %&()*+-./0123456789:<=>", **start)) { |
if ('\0' != **start) |
if ('\0' != **start) |
Line 247 mandoc_escape(const char **end, const char **start, in |
|
Line 226 mandoc_escape(const char **end, const char **start, in |
|
term = '\''; |
term = '\''; |
break; |
break; |
case '3': |
case '3': |
/* FALLTHROUGH */ |
|
case '2': |
case '2': |
/* FALLTHROUGH */ |
|
case '1': |
case '1': |
*sz = (*end)[-1] == 's' && |
*sz = (*end)[-1] == 's' && |
isdigit((unsigned char)(*end)[1]) ? 2 : 1; |
isdigit((unsigned char)(*end)[1]) ? 2 : 1; |
Line 325 mandoc_escape(const char **end, const char **start, in |
|
Line 302 mandoc_escape(const char **end, const char **start, in |
|
|
|
switch (**start) { |
switch (**start) { |
case '3': |
case '3': |
/* FALLTHROUGH */ |
|
case 'B': |
case 'B': |
gly = ESCAPE_FONTBOLD; |
gly = ESCAPE_FONTBOLD; |
break; |
break; |
case '2': |
case '2': |
/* FALLTHROUGH */ |
|
case 'I': |
case 'I': |
gly = ESCAPE_FONTITALIC; |
gly = ESCAPE_FONTITALIC; |
break; |
break; |
Line 338 mandoc_escape(const char **end, const char **start, in |
|
Line 313 mandoc_escape(const char **end, const char **start, in |
|
gly = ESCAPE_FONTPREV; |
gly = ESCAPE_FONTPREV; |
break; |
break; |
case '1': |
case '1': |
/* FALLTHROUGH */ |
|
case 'R': |
case 'R': |
gly = ESCAPE_FONTROMAN; |
gly = ESCAPE_FONTROMAN; |
break; |
break; |
Line 563 mandoc_eos(const char *p, size_t sz) |
|
Line 537 mandoc_eos(const char *p, size_t sz) |
|
for (q = p + (int)sz - 1; q >= p; q--) { |
for (q = p + (int)sz - 1; q >= p; q--) { |
switch (*q) { |
switch (*q) { |
case '\"': |
case '\"': |
/* FALLTHROUGH */ |
|
case '\'': |
case '\'': |
/* FALLTHROUGH */ |
|
case ']': |
case ']': |
/* FALLTHROUGH */ |
|
case ')': |
case ')': |
if (0 == found) |
if (0 == found) |
enclosed = 1; |
enclosed = 1; |
break; |
break; |
case '.': |
case '.': |
/* FALLTHROUGH */ |
|
case '!': |
case '!': |
/* FALLTHROUGH */ |
|
case '?': |
case '?': |
found = 1; |
found = 1; |
break; |
break; |