diff --git a/src/unicode.c b/src/unicode.c index a82b37f..b726506 100644 --- a/src/unicode.c +++ b/src/unicode.c @@ -99,8 +99,6 @@ * push the new symbol into the symbol table. */ -#define KMSCON_UCS4_MAXLEN 10 - const tsm_symbol_t tsm_symbol_default = 0; static const char default_u8[] = { 0 }; @@ -243,7 +241,7 @@ const uint32_t *tsm_symbol_get(tsm_symbol_t *sym, size_t *size) tsm_symbol_t tsm_symbol_append(tsm_symbol_t sym, uint32_t ucs4) { - uint32_t buf[KMSCON_UCS4_MAXLEN + 1], nsym, *nval; + uint32_t buf[TSM_UCS4_MAXLEN + 1], nsym, *nval; const uint32_t *ptr; size_t s; tsm_symbol_t rsym; @@ -264,7 +262,7 @@ tsm_symbol_t tsm_symbol_append(tsm_symbol_t sym, uint32_t ucs4) } ptr = table__get(&sym, &s); - if (s >= KMSCON_UCS4_MAXLEN) { + if (s >= TSM_UCS4_MAXLEN) { rsym = sym; goto unlock; } diff --git a/src/unicode.h b/src/unicode.h index 35ffafc..b6efc0b 100644 --- a/src/unicode.h +++ b/src/unicode.h @@ -41,6 +41,7 @@ #define TSM_UCS4_MAX (0x7fffffffUL) #define TSM_UCS4_INVALID (TSM_UCS4_MAX + 1) #define TSM_UCS4_REPLACEMENT (0xfffdUL) +#define TSM_UCS4_MAXLEN 10 /* symbols */