version 1.275, 2018/08/16 13:54:06 |
version 1.277, 2018/12/15 19:30:26 |
Line 477 term_word(struct termp *p, const char *word) |
|
Line 477 term_word(struct termp *p, const char *word) |
|
|
|
word++; |
word++; |
esc = mandoc_escape(&word, &seq, &sz); |
esc = mandoc_escape(&word, &seq, &sz); |
if (ESCAPE_ERROR == esc) |
|
continue; |
|
|
|
switch (esc) { |
switch (esc) { |
case ESCAPE_UNICODE: |
case ESCAPE_UNICODE: |
uc = mchars_num2uc(seq + 1, sz - 1); |
uc = mchars_num2uc(seq + 1, sz - 1); |
Line 500 term_word(struct termp *p, const char *word) |
|
Line 497 term_word(struct termp *p, const char *word) |
|
encode1(p, uc); |
encode1(p, uc); |
} |
} |
continue; |
continue; |
|
case ESCAPE_UNDEF: |
|
uc = *seq; |
|
break; |
case ESCAPE_FONTBOLD: |
case ESCAPE_FONTBOLD: |
term_fontrepl(p, TERMFONT_BOLD); |
term_fontrepl(p, TERMFONT_BOLD); |
continue; |
continue; |
Line 510 term_word(struct termp *p, const char *word) |
|
Line 510 term_word(struct termp *p, const char *word) |
|
term_fontrepl(p, TERMFONT_BI); |
term_fontrepl(p, TERMFONT_BI); |
continue; |
continue; |
case ESCAPE_FONT: |
case ESCAPE_FONT: |
|
case ESCAPE_FONTCW: |
case ESCAPE_FONTROMAN: |
case ESCAPE_FONTROMAN: |
term_fontrepl(p, TERMFONT_NONE); |
term_fontrepl(p, TERMFONT_NONE); |
continue; |
continue; |
Line 586 term_word(struct termp *p, const char *word) |
|
Line 587 term_word(struct termp *p, const char *word) |
|
case ESCAPE_SPECIAL: |
case ESCAPE_SPECIAL: |
uc = mchars_spec2cp(cp, sz); |
uc = mchars_spec2cp(cp, sz); |
break; |
break; |
|
case ESCAPE_UNDEF: |
|
uc = *seq; |
|
break; |
default: |
default: |
uc = -1; |
uc = -1; |
break; |
break; |
Line 844 term_strlen(const struct termp *p, const char *cp) |
|
Line 848 term_strlen(const struct termp *p, const char *cp) |
|
switch (*cp) { |
switch (*cp) { |
case '\\': |
case '\\': |
cp++; |
cp++; |
esc = mandoc_escape(&cp, &seq, &ssz); |
|
if (ESCAPE_ERROR == esc) |
|
continue; |
|
|
|
rhs = NULL; |
rhs = NULL; |
|
esc = mandoc_escape(&cp, &seq, &ssz); |
switch (esc) { |
switch (esc) { |
case ESCAPE_UNICODE: |
case ESCAPE_UNICODE: |
uc = mchars_num2uc(seq + 1, ssz - 1); |
uc = mchars_num2uc(seq + 1, ssz - 1); |
Line 870 term_strlen(const struct termp *p, const char *cp) |
|
Line 870 term_strlen(const struct termp *p, const char *cp) |
|
sz += cond_width(p, uc, &skip); |
sz += cond_width(p, uc, &skip); |
} |
} |
continue; |
continue; |
|
case ESCAPE_UNDEF: |
|
uc = *seq; |
|
break; |
case ESCAPE_DEVICE: |
case ESCAPE_DEVICE: |
if (p->type == TERMTYPE_PDF) { |
if (p->type == TERMTYPE_PDF) { |
rhs = "pdf"; |
rhs = "pdf"; |