X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fgsm-coding.c;h=52f0105919cef22f1483a8e72c94271511e8d672;hp=26c1e67189f43025f239b30b46b75d09d3c3a6c4;hb=43f66b7662ed5c83d1cfefb84b122499b08675c3;hpb=81b1712d54efa46b3148a5beb42d32d7632ef30c diff --git a/common/gsm-coding.c b/common/gsm-coding.c index 26c1e67..52f0105 100644 --- a/common/gsm-coding.c +++ b/common/gsm-coding.c @@ -17,10 +17,10 @@ #include "gsm-coding.h" #ifdef WIN32 - #include + #include #else #include "devices/device.h" -#endif +#endif /* Coding functions */ #define NUMBER_OF_7_BIT_ALPHABET_ELEMENTS 128 @@ -335,7 +335,7 @@ static bool EncodeWithUTF8Alphabet(u8 mychar, u8 *ret1, u8 *ret2) { u8 mychar1,mychar2,mychar3,mychar4; - int j=0; + int j=0; mychar1=((EncodeWithUnicodeAlphabet(mychar)>>8)&0xff); mychar2=EncodeWithUnicodeAlphabet(mychar)&0xff; @@ -345,9 +345,9 @@ bool EncodeWithUTF8Alphabet(u8 mychar, u8 *ret1, u8 *ret2) while (true) { if (mychar3==mychar1) { if (mychar4+64>=mychar2) { - *ret1=j+0xc2; - *ret2=0x80+(mychar2-mychar4); - return true; + *ret1=j+0xc2; + *ret2=0x80+(mychar2-mychar4); + return true; } } if (mychar4==192) { @@ -382,7 +382,7 @@ void DecodeWithUTF8Alphabet(u8 mychar3, u8 mychar4, u8 *ret) } mychar2=mychar2+(mychar4-0x80); wc = mychar2 | (mychar1 << 8); - *ret=DecodeWithUnicodeAlphabet(wc); + *ret=DecodeWithUnicodeAlphabet(wc); j=-1; }