version 1.212, 2013/12/23 02:20:09 |
version 1.215, 2013/12/31 18:07:42 |
Line 407 term_fontpop(struct termp *p) |
|
Line 407 term_fontpop(struct termp *p) |
|
void |
void |
term_word(struct termp *p, const char *word) |
term_word(struct termp *p, const char *word) |
{ |
{ |
|
const char nbrsp[2] = { ASCII_NBRSP, 0 }; |
const char *seq, *cp; |
const char *seq, *cp; |
char c; |
char c; |
int sz, uc; |
int sz, uc; |
Line 429 term_word(struct termp *p, const char *word) |
|
Line 430 term_word(struct termp *p, const char *word) |
|
else |
else |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
|
|
p->flags &= ~(TERMP_SENTENCE | TERMP_IGNDELIM); |
p->flags &= ~TERMP_SENTENCE; |
|
|
while ('\0' != *word) { |
while ('\0' != *word) { |
if ('\\' != *word) { |
if ('\\' != *word) { |
Line 438 term_word(struct termp *p, const char *word) |
|
Line 439 term_word(struct termp *p, const char *word) |
|
word++; |
word++; |
continue; |
continue; |
} |
} |
ssz = strcspn(word, "\\"); |
if (TERMP_NBRWORD & p->flags) { |
|
if (' ' == *word) { |
|
encode(p, nbrsp, 1); |
|
word++; |
|
continue; |
|
} |
|
ssz = strcspn(word, "\\ "); |
|
} else |
|
ssz = strcspn(word, "\\"); |
encode(p, word, ssz); |
encode(p, word, ssz); |
word += (int)ssz; |
word += (int)ssz; |
continue; |
continue; |
Line 513 term_word(struct termp *p, const char *word) |
|
Line 522 term_word(struct termp *p, const char *word) |
|
break; |
break; |
} |
} |
} |
} |
|
p->flags &= ~TERMP_NBRWORD; |
} |
} |
|
|
static void |
static void |
Line 649 term_strlen(const struct termp *p, const char *cp) |
|
Line 659 term_strlen(const struct termp *p, const char *cp) |
|
for (i = 0; i < rsz; i++) |
for (i = 0; i < rsz; i++) |
sz += cond_width(p, *cp++, &skip); |
sz += cond_width(p, *cp++, &skip); |
|
|
c = 0; |
|
switch (*cp) { |
switch (*cp) { |
case ('\\'): |
case ('\\'): |
cp++; |
cp++; |