From 645d0e48bdcfee0f55080d8d0158f1cbc7b14cc2 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Mon, 12 Mar 2018 10:04:22 +0000 Subject: [PATCH] renamed MOO_BCLEN_MAX to MOO_BCSIZE_MAX --- moo/lib/moo-cmn.h | 3 +++ moo/lib/utl.c | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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')