summaryrefslogtreecommitdiff
path: root/src/charset/encodings
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 23:26:03 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 23:26:03 +0000
commit305940a1a9430c381d04dc181f61123fa80ab74f (patch)
tree7607a648ddfe085db6a719ac45ae97b5aa18b058 /src/charset/encodings
parent50e64e8710e3af657ad97053e16435c284dc80e2 (diff)
downloadlibparserutils-305940a1a9430c381d04dc181f61123fa80ab74f.tar.gz
libparserutils-305940a1a9430c381d04dc181f61123fa80ab74f.tar.bz2
C89
svn path=/trunk/libparserutils/; revision=5839
Diffstat (limited to 'src/charset/encodings')
-rw-r--r--src/charset/encodings/utf8impl.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/charset/encodings/utf8impl.h b/src/charset/encodings/utf8impl.h
index b1721c7..45707aa 100644
--- a/src/charset/encodings/utf8impl.h
+++ b/src/charset/encodings/utf8impl.h
@@ -35,6 +35,7 @@ extern const uint8_t numContinuations[256];
do { \
uint32_t c, min; \
uint8_t n; \
+ uint8_t i; \
\
error = PARSERUTILS_OK; \
\
@@ -83,7 +84,7 @@ do { \
break; \
} \
\
- for (uint8_t i = 1; i < n; i++) { \
+ for (i = 1; i < n; i++) { \
uint32_t t = s[i]; \
\
if ((t & 0xC0) != 0x80) { \
@@ -157,8 +158,9 @@ do { \
\
if (l == 1) { \
buf[0] = (uint8_t) ucs4; \
- } else { \
- for (uint8_t i = l; i > 1; i--) { \
+ } else { \
+ uint8_t i; \
+ for (i = l; i > 1; i--) { \
buf[i - 1] = 0x80 | (ucs4 & 0x3F); \
ucs4 >>= 6; \
} \