diff options
Diffstat (limited to 'zap/source/any/mem/utf8enc.c')
-rw-r--r-- | zap/source/any/mem/utf8enc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/zap/source/any/mem/utf8enc.c b/zap/source/any/mem/utf8enc.c index 04febb2..ea62d52 100644 --- a/zap/source/any/mem/utf8enc.c +++ b/zap/source/any/mem/utf8enc.c @@ -6,11 +6,11 @@ #include <zap/mem.h> -void zap_utf8enc(zap_chr8 * const _dest,zap_chr02 const * const _src) { - zap_chr8 * dest; - zap_chr02 const * src; +void zap_utf8enc(zap_i8 * const _dest,zap_i02 const * const _src) { + zap_i8 * dest; + zap_i02 const * src; for (dest = _dest,src = _src;;++src) { - zap_chr02 const chr = *src; + zap_i02 const chr = *src; if (chr > 0xFFFFu) { /* Four octets. */ *dest = 0xF0u + (chr >> 0x12u); ++dest; @@ -23,18 +23,18 @@ void zap_utf8enc(zap_chr8 * const _dest,zap_chr02 const * const _src) { continue; } if (chr >= 0x7FFu) { /* Three octets. */ - *dest = 0xE0u + (zap_chr8)(chr >> 0xCu); + *dest = 0xE0u + (zap_i8)(chr >> 0xCu); ++dest; - *dest = 0x80u + (zap_chr8)(chr >> 0x6u & 0x3Fu); + *dest = 0x80u + (zap_i8)(chr >> 0x6u & 0x3Fu); ++dest; - *dest = 0x80u + (zap_chr8)(chr & 0x3Fu); + *dest = 0x80u + (zap_i8)(chr & 0x3Fu); ++dest; continue; } if (chr >= 0x7Fu) { /* Two octets. */ - *dest = 0xC0u + (zap_chr8)(chr >> 0x6u); + *dest = 0xC0u + (zap_i8)(chr >> 0x6u); ++dest; - *dest = 0x80u + (zap_chr8)(chr & 0x3Fu); + *dest = 0x80u + (zap_i8)(chr & 0x3Fu); ++dest; continue; } |