version 1.34, 2015/09/26 00:53:15 |
version 1.35, 2015/10/06 18:30:44 |
|
|
if (outopts->synopsisonly) |
if (outopts->synopsisonly) |
p->synopsisonly = 1; |
p->synopsisonly = 1; |
|
|
return(p); |
return p; |
} |
} |
|
|
void * |
void * |
ascii_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
ascii_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
{ |
{ |
|
|
return(ascii_init(TERMENC_ASCII, mchars, outopts)); |
return ascii_init(TERMENC_ASCII, mchars, outopts); |
} |
} |
|
|
void * |
void * |
utf8_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
utf8_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
{ |
{ |
|
|
return(ascii_init(TERMENC_UTF8, mchars, outopts)); |
return ascii_init(TERMENC_UTF8, mchars, outopts); |
} |
} |
|
|
void * |
void * |
locale_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
locale_alloc(const struct mchars *mchars, const struct manoutput *outopts) |
{ |
{ |
|
|
return(ascii_init(TERMENC_LOCALE, mchars, outopts)); |
return ascii_init(TERMENC_LOCALE, mchars, outopts); |
} |
} |
|
|
static void |
static void |
|
|
ascii_width(const struct termp *p, int c) |
ascii_width(const struct termp *p, int c) |
{ |
{ |
|
|
return(1); |
return 1; |
} |
} |
|
|
void |
void |
|
|
default: |
default: |
abort(); |
abort(); |
} |
} |
return(r > 0.0 ? r + 0.01 : r - 0.01); |
return r > 0.0 ? r + 0.01 : r - 0.01; |
} |
} |
|
|
const char * |
const char * |
|
|
|
|
assert(uc >= 0); |
assert(uc >= 0); |
if ((size_t)uc < sizeof(tab)/sizeof(tab[0])) |
if ((size_t)uc < sizeof(tab)/sizeof(tab[0])) |
return(tab[uc]); |
return tab[uc]; |
return(mchars_uc2str(uc)); |
return mchars_uc2str(uc); |
} |
} |
|
|
static size_t |
static size_t |
|
|
rc = wcwidth(c); |
rc = wcwidth(c); |
if (rc < 0) |
if (rc < 0) |
rc = 0; |
rc = 0; |
return(rc); |
return rc; |
} |
} |
|
|
static void |
static void |