summaryrefslogtreecommitdiff
path: root/fluid/proj/mergeback.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/proj/mergeback.cxx')
-rw-r--r--fluid/proj/mergeback.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/fluid/proj/mergeback.cxx b/fluid/proj/mergeback.cxx
index bb7ef5504..2d553aedb 100644
--- a/fluid/proj/mergeback.cxx
+++ b/fluid/proj/mergeback.cxx
@@ -304,7 +304,8 @@ void Mergeback::analyse_code(unsigned long code_crc, unsigned long tag_crc, int
*/
uint32_t Mergeback::decode_trichar32(const char *text) {
uint32_t word = 0;
- for (int i=30; i>=0; i-=3) {
+ int i;
+ for (i =30; i>=0; i-=3) {
char a = *text++;
if (a==0) break;
char b = *text++;
@@ -335,7 +336,8 @@ uint32_t Mergeback::decode_trichar32(const char *text) {
*/
void Mergeback::print_trichar32(FILE *out, uint32_t value) {
static const char *lut[] = { "--", "-~", "~-", "~~", "-=", "=-", "~=", "=~" };
- for (int i=30; i>=0; i-=3) fputs(lut[(value>>i)&7], out);
+ int i;
+ for (i =30; i>=0; i-=3) fputs(lut[(value>>i)&7], out);
}
/**
@@ -365,7 +367,8 @@ bool Mergeback::read_tag(const char *tag, Tag *prev_type, uint16_t *uid, uint32_
if (strncmp(tag, "▼", 3)==0) tag += 3; // E2 96 BC
if (*tag==' ') tag += 1;
uint32_t w1 = decode_trichar32(tag); // Read the first word
- for (int i=0; i<32; i++) if (*tag++ == 0) return false;
+ int i;
+ for (i =0; i<32; i++) if (*tag++ == 0) return false;
uint32_t w2 = decode_trichar32(tag); // Read the second word
// Return the decoded values
*prev_type = static_cast<Tag>((w1>>16) & 0xff);