version 1.62, 2015/10/06 18:30:43 |
version 1.63, 2015/10/12 00:07:27 |
|
|
* 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; |
|
|
|
|
* '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 */ |
|
|
* 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 */ |
|
|
* 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) |
|
|
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; |
|
|
|
|
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; |
|
|
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; |
|
|
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; |