diff options
Diffstat (limited to 'zap/source/any/mem/utf8dec.c')
-rw-r--r-- | zap/source/any/mem/utf8dec.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/zap/source/any/mem/utf8dec.c b/zap/source/any/mem/utf8dec.c index f9a0eac..6f3141a 100644 --- a/zap/source/any/mem/utf8dec.c +++ b/zap/source/any/mem/utf8dec.c @@ -6,40 +6,40 @@ #include <zap/mem.h> -void zap_utf8dec(zap_chr02 * const _dest,zap_chr8 const * const _src) { - zap_chr02 * dest; - zap_chr8 const * src; +void zap_utf8dec(zap_i02 * const _dest,zap_i8 const * const _src) { + zap_i02 * dest; + zap_i8 const * src; for (dest = _dest,src = _src;;++dest) { - zap_chr8 const oct = *src; + zap_i8 const oct = *src; if (oct == 0x0u) { break; } if (oct >= 0xF0u) { /* Four octets. */ - zap_chr02 chr = ((zap_chr02)oct ^ 0xF0u) << 0x12u; + zap_i02 chr = ((zap_i02)oct ^ 0xF0u) << 0x12u; ++src; - chr += ((zap_chr02)*src ^ 0x80u) << 0xCu; + chr += ((zap_i02)*src ^ 0x80u) << 0xCu; ++src; - chr += ((zap_chr02)*src ^ 0x80u) << 0x6u; + chr += ((zap_i02)*src ^ 0x80u) << 0x6u; ++src; - chr += (zap_chr02)*src ^ 0x80u; + chr += (zap_i02)*src ^ 0x80u; ++src; *dest = chr; continue; } if (oct >= 0xE0u) { /* Three octets. */ - zap_chr02 chr = ((zap_chr02)oct ^ 0xE0u) << 0xCu; + zap_i02 chr = ((zap_i02)oct ^ 0xE0u) << 0xCu; ++src; - chr += ((zap_chr02)*src ^ 0x80u) << 0x6u; + chr += ((zap_i02)*src ^ 0x80u) << 0x6u; ++src; - chr += (zap_chr02)*src ^ 0x80u; + chr += (zap_i02)*src ^ 0x80u; ++src; *dest = chr; continue; } if (oct >= 0xC0u) { /* Two octets. */ - zap_chr02 chr = ((zap_chr02)oct ^ 0xC0u) << 0x6u; + zap_i02 chr = ((zap_i02)oct ^ 0xC0u) << 0x6u; ++src; - chr += (zap_chr02)*src ^ 0x80u; + chr += (zap_i02)*src ^ 0x80u; ++src; *dest = chr; continue; |