version 1.185, 2011/04/29 22:18:12 |
version 1.187, 2011/05/14 17:54:42 |
Line 348 term_vspace(struct termp *p) |
|
Line 348 term_vspace(struct termp *p) |
|
static void |
static void |
numbered(struct termp *p, const char *word, size_t len) |
numbered(struct termp *p, const char *word, size_t len) |
{ |
{ |
const char *rhs; |
char c; |
|
|
rhs = mchars_num2char(word, len); |
if ('\0' != (c = mchars_num2char(word, len))) |
if (rhs) |
encode(p, &c, 1); |
encode(p, rhs, 1); |
|
} |
} |
|
|
|
|
Line 533 adjbuf(struct termp *p, size_t sz) |
|
Line 532 adjbuf(struct termp *p, size_t sz) |
|
while (sz >= p->maxcols) |
while (sz >= p->maxcols) |
p->maxcols <<= 2; |
p->maxcols <<= 2; |
|
|
p->buf = mandoc_realloc(p->buf, p->maxcols); |
p->buf = mandoc_realloc(p->buf, sizeof(int) * p->maxcols); |
} |
} |
|
|
|
|
Line 563 encode(struct termp *p, const char *word, size_t sz) |
|
Line 562 encode(struct termp *p, const char *word, size_t sz) |
|
if (TERMFONT_NONE == (f = term_fonttop(p))) { |
if (TERMFONT_NONE == (f = term_fonttop(p))) { |
if (p->col + sz >= p->maxcols) |
if (p->col + sz >= p->maxcols) |
adjbuf(p, p->col + sz); |
adjbuf(p, p->col + sz); |
memcpy(&p->buf[(int)p->col], word, sz); |
for (i = 0; i < (int)sz; i++) |
p->col += sz; |
p->buf[(int)p->col++] = word[i]; |
return; |
return; |
} |
} |
|
|