renamed inconsistent function names
This commit is contained in:
parent
93ffbc0d55
commit
ffa6a4e26a
@ -70,6 +70,8 @@
|
|||||||
|
|
||||||
#undef PUT_OOCH
|
#undef PUT_OOCH
|
||||||
#undef PUT_OOCS
|
#undef PUT_OOCS
|
||||||
|
#undef PUT_BYTE_IN_HEX
|
||||||
|
#undef BYTE_PRINTABLE
|
||||||
|
|
||||||
#define PUT_OOCH(c,n) do { \
|
#define PUT_OOCH(c,n) do { \
|
||||||
if (n > 0) { \
|
if (n > 0) { \
|
||||||
@ -97,7 +99,7 @@
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* TODO: redefine this */
|
/* TODO: redefine this */
|
||||||
#define BYTE_PRINTABLE(x) ((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || (x == ' '))
|
#define BYTE_PRINTABLE(x) ((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || (x >= '0' && x <= '9') || (x == ' '))
|
||||||
|
|
||||||
static int fmtoutv (moo_t* moo, const fmtchar_t* fmt, moo_fmtout_data_t* data, va_list ap, moo_outbfmt_t outbfmt)
|
static int fmtoutv (moo_t* moo, const fmtchar_t* fmt, moo_fmtout_data_t* data, va_list ap, moo_outbfmt_t outbfmt)
|
||||||
{
|
{
|
||||||
|
@ -448,15 +448,15 @@ MOO_EXPORT int moo_ucwidth (
|
|||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(MOO_OOCH_IS_UCH)
|
#if defined(MOO_OOCH_IS_UCH)
|
||||||
# define moo_conv_oocs_to_bcs_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr) moo_conv_ucs_to_bcs_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr)
|
# define moo_conv_oocstr_to_bcstr_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr) moo_conv_ucstr_to_bcstr_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr)
|
||||||
# define moo_conv_oochars_to_bchars_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr) moo_conv_uchars_to_bchars_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr)
|
# define moo_conv_oochars_to_bchars_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr) moo_conv_uchars_to_bchars_with_cmgr(oocs,oocslen,bcs,bcslen,cmgr)
|
||||||
#else
|
#else
|
||||||
# define moo_conv_oocs_to_ucs_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr) moo_conv_bcs_to_ucs_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr,0)
|
# define moo_conv_oocstr_to_ucstr_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr) moo_conv_bcstr_to_ucstr_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr,0)
|
||||||
# define moo_conv_oochars_to_uchars_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr) moo_conv_bchars_to_uchars_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr,0)
|
# define moo_conv_oochars_to_uchars_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr) moo_conv_bchars_to_uchars_with_cmgr(oocs,oocslen,ucs,ucslen,cmgr,0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
MOO_EXPORT int moo_conv_bcs_to_ucs_with_cmgr (
|
MOO_EXPORT int moo_conv_bcstr_to_ucstr_with_cmgr (
|
||||||
const moo_bch_t* bcs,
|
const moo_bch_t* bcs,
|
||||||
moo_oow_t* bcslen,
|
moo_oow_t* bcslen,
|
||||||
moo_uch_t* ucs,
|
moo_uch_t* ucs,
|
||||||
@ -474,7 +474,7 @@ MOO_EXPORT int moo_conv_bchars_to_uchars_with_cmgr (
|
|||||||
int all
|
int all
|
||||||
);
|
);
|
||||||
|
|
||||||
MOO_EXPORT int moo_conv_ucs_to_bcs_with_cmgr (
|
MOO_EXPORT int moo_conv_ucstr_to_bcstr_with_cmgr (
|
||||||
const moo_uch_t* ucs,
|
const moo_uch_t* ucs,
|
||||||
moo_oow_t* ucslen,
|
moo_oow_t* ucslen,
|
||||||
moo_bch_t* bcs,
|
moo_bch_t* bcs,
|
||||||
|
@ -698,7 +698,7 @@ MOO_INLINE int moo_conv_bchars_to_uchars_with_cmgr (
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOO_INLINE int moo_conv_bcs_to_ucs_with_cmgr (
|
MOO_INLINE int moo_conv_bcstr_to_ucstr_with_cmgr (
|
||||||
const moo_bch_t* bcs, moo_oow_t* bcslen,
|
const moo_bch_t* bcs, moo_oow_t* bcslen,
|
||||||
moo_uch_t* ucs, moo_oow_t* ucslen, moo_cmgr_t* cmgr, int all)
|
moo_uch_t* ucs, moo_oow_t* ucslen, moo_cmgr_t* cmgr, int all)
|
||||||
{
|
{
|
||||||
@ -790,7 +790,7 @@ MOO_INLINE int moo_conv_uchars_to_bchars_with_cmgr (
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOO_INLINE int moo_conv_ucs_to_bcs_with_cmgr (
|
MOO_INLINE int moo_conv_ucstr_to_bcstr_with_cmgr (
|
||||||
const moo_uch_t* ucs, moo_oow_t* ucslen,
|
const moo_uch_t* ucs, moo_oow_t* ucslen,
|
||||||
moo_bch_t* bcs, moo_oow_t* bcslen, moo_cmgr_t* cmgr)
|
moo_bch_t* bcs, moo_oow_t* bcslen, moo_cmgr_t* cmgr)
|
||||||
{
|
{
|
||||||
@ -899,13 +899,13 @@ int moo_conv_uchars_to_utf8 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t*
|
|||||||
int moo_conv_utf8_to_ucstr (const moo_bch_t* bcs, moo_oow_t* bcslen, moo_uch_t* ucs, moo_oow_t* ucslen)
|
int moo_conv_utf8_to_ucstr (const moo_bch_t* bcs, moo_oow_t* bcslen, moo_uch_t* ucs, moo_oow_t* ucslen)
|
||||||
{
|
{
|
||||||
/* null-terminated. */
|
/* null-terminated. */
|
||||||
return moo_conv_bcs_to_ucs_with_cmgr(bcs, bcslen, ucs, ucslen, &utf8_cmgr, 0);
|
return moo_conv_bcstr_to_ucstr_with_cmgr(bcs, bcslen, ucs, ucslen, &utf8_cmgr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int moo_conv_ucstr_to_utf8 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t* bcs, moo_oow_t* bcslen)
|
int moo_conv_ucstr_to_utf8 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t* bcs, moo_oow_t* bcslen)
|
||||||
{
|
{
|
||||||
/* null-terminated */
|
/* null-terminated */
|
||||||
return moo_conv_ucs_to_bcs_with_cmgr(ucs, ucslen, bcs, bcslen, &utf8_cmgr);
|
return moo_conv_ucstr_to_bcstr_with_cmgr(ucs, ucslen, bcs, bcslen, &utf8_cmgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
@ -936,13 +936,13 @@ int moo_conv_uchars_to_utf16 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t
|
|||||||
int moo_conv_utf16_to_ucstr (const moo_bch_t* bcs, moo_oow_t* bcslen, moo_uch_t* ucs, moo_oow_t* ucslen)
|
int moo_conv_utf16_to_ucstr (const moo_bch_t* bcs, moo_oow_t* bcslen, moo_uch_t* ucs, moo_oow_t* ucslen)
|
||||||
{
|
{
|
||||||
/* null-terminated. */
|
/* null-terminated. */
|
||||||
return moo_conv_bcs_to_ucs_with_cmgr(bcs, bcslen, ucs, ucslen, &utf16_cmgr, 0);
|
return moo_conv_bcstr_to_ucstr_with_cmgr(bcs, bcslen, ucs, ucslen, &utf16_cmgr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int moo_conv_ucstr_to_utf16 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t* bcs, moo_oow_t* bcslen)
|
int moo_conv_ucstr_to_utf16 (const moo_uch_t* ucs, moo_oow_t* ucslen, moo_bch_t* bcs, moo_oow_t* bcslen)
|
||||||
{
|
{
|
||||||
/* null-terminated */
|
/* null-terminated */
|
||||||
return moo_conv_ucs_to_bcs_with_cmgr(ucs, ucslen, bcs, bcslen, &utf16_cmgr);
|
return moo_conv_ucstr_to_bcstr_with_cmgr(ucs, ucslen, bcs, bcslen, &utf16_cmgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
@ -983,7 +983,7 @@ int moo_convbtoucstr (moo_t* moo, const moo_bch_t* bcs, moo_oow_t* bcslen, moo_u
|
|||||||
/* null-terminated. */
|
/* null-terminated. */
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
n = moo_conv_bcs_to_ucs_with_cmgr(bcs, bcslen, ucs, ucslen, moo->cmgr, 0);
|
n = moo_conv_bcstr_to_ucstr_with_cmgr(bcs, bcslen, ucs, ucslen, moo->cmgr, 0);
|
||||||
|
|
||||||
if (n <= -1)
|
if (n <= -1)
|
||||||
{
|
{
|
||||||
@ -998,7 +998,7 @@ int moo_convutobcstr (moo_t* moo, const moo_uch_t* ucs, moo_oow_t* ucslen, moo_b
|
|||||||
/* null-terminated */
|
/* null-terminated */
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
n = moo_conv_ucs_to_bcs_with_cmgr(ucs, ucslen, bcs, bcslen, moo->cmgr);
|
n = moo_conv_ucstr_to_bcstr_with_cmgr(ucs, ucslen, bcs, bcslen, moo->cmgr);
|
||||||
|
|
||||||
if (n <= -1)
|
if (n <= -1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user