version 1.51, 2015/10/13 22:59:54 |
version 1.54, 2016/07/31 09:29:13 |
Line 88 ascii_init(enum termenc enc, const struct manoutput *o |
|
Line 88 ascii_init(enum termenc enc, const struct manoutput *o |
|
|
|
#if HAVE_WCHAR |
#if HAVE_WCHAR |
if (TERMENC_ASCII != enc) { |
if (TERMENC_ASCII != enc) { |
|
|
|
/* |
|
* Do not change any of this to LC_ALL. It might break |
|
* the formatting by subtly changing the behaviour of |
|
* various functions, for example strftime(3). As a |
|
* worst case, it might even cause buffer overflows. |
|
*/ |
|
|
v = TERMENC_LOCALE == enc ? |
v = TERMENC_LOCALE == enc ? |
setlocale(LC_ALL, "") : |
setlocale(LC_CTYPE, "") : |
setlocale(LC_CTYPE, "en_US.UTF-8"); |
setlocale(LC_CTYPE, UTF8_LOCALE); |
if (NULL != v && MB_CUR_MAX > 1) { |
if (NULL != v && MB_CUR_MAX > 1) { |
p->enc = enc; |
p->enc = enc; |
p->advance = locale_advance; |
p->advance = locale_advance; |
Line 155 ascii_setwidth(struct termp *p, int iop, int width) |
|
Line 163 ascii_setwidth(struct termp *p, int iop, int width) |
|
} |
} |
|
|
void |
void |
ascii_sepline(void *arg) |
terminal_sepline(void *arg) |
{ |
{ |
struct termp *p; |
struct termp *p; |
size_t i; |
size_t i; |
|
|
p = (struct termp *)arg; |
p = (struct termp *)arg; |
p->line += 3; |
(*p->endline)(p); |
putchar('\n'); |
|
for (i = 0; i < p->defrmargin; i++) |
for (i = 0; i < p->defrmargin; i++) |
putchar('-'); |
(*p->letter)(p, '-'); |
putchar('\n'); |
(*p->endline)(p); |
putchar('\n'); |
(*p->endline)(p); |
} |
} |
|
|
static size_t |
static size_t |