+ switch (**start) {
+ case '3':
+ /* FALLTHROUGH */
+ case 'B':
+ gly = ESCAPE_FONTBOLD;
+ break;
+ case '2':
+ /* FALLTHROUGH */
+ case 'I':
+ gly = ESCAPE_FONTITALIC;
+ break;
+ case 'P':
+ gly = ESCAPE_FONTPREV;
+ break;
+ case '1':
+ /* FALLTHROUGH */
+ case 'R':
+ gly = ESCAPE_FONTROMAN;
+ break;
+ }
+ break;
+ case ESCAPE_SPECIAL:
+ if (1 == *sz && 'c' == **start)
+ gly = ESCAPE_NOSPACE;
+ /*
+ * Unicode escapes are defined in groff as \[uXXXX]
+ * to \[u10FFFF], where the contained value must be
+ * a valid Unicode codepoint. Here, however, only
+ * check the length and the validity of all digits.
+ */
+ else if (*sz > 4 && *sz < 8 && **start == 'u' &&
+ (int)strspn(*start + 1, "0123456789ABCDEFabcdef")
+ + 1 == *sz)
+ gly = ESCAPE_UNICODE;
+ break;
+ default:
+ break;