diff --git a/moo/lib/moo-cmn.h b/moo/lib/moo-cmn.h index 95a49b8..11b89e9 100644 --- a/moo/lib/moo-cmn.h +++ b/moo/lib/moo-cmn.h @@ -345,6 +345,9 @@ typedef struct moo_bcs_t moo_bcs_t; # define MOO_SIZEOF_OOCH_T MOO_SIZEOF_BCH_T #endif +/* the maximum number of bch charaters to represent a single uch character */ +#define MOO_BCSIZE_MAX 6 + /* ========================================================================= * TIME-RELATED TYPES * =========================================================================*/ diff --git a/moo/lib/utl.c b/moo/lib/utl.c index f900827..1887ed0 100644 --- a/moo/lib/utl.c +++ b/moo/lib/utl.c @@ -26,8 +26,6 @@ #include "moo-prv.h" -#define MOO_BCLEN_MAX 6 - /* some naming conventions * bchars, uchars -> pointer and length * bcstr, ucstr -> null-terminated string pointer @@ -576,7 +574,7 @@ static MOO_INLINE int ucsn_to_bcsn_with_cmgr ( } else { - moo_bch_t bcsbuf[MOO_BCLEN_MAX]; + moo_bch_t bcsbuf[MOO_BCSIZE_MAX]; moo_oow_t mlen = 0; while (p < end) @@ -658,7 +656,7 @@ static int ucs_to_bcs_with_cmgr ( } else { - moo_bch_t bcsbuf[MOO_BCLEN_MAX]; + moo_bch_t bcsbuf[MOO_BCSIZE_MAX]; moo_oow_t mlen = 0; while (*p != '\0')