<div dir="ltr">I'll have to re-check the strings for the couple ZVision game localization I have, but I don't believe it requires hex or exponents. I'll check this week and get back to you guys.<div><br></div><div><br></div><div>Regards,</div><div>Adrian (RichieSams)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 3:39 PM, Федор <span dir="ltr"><<a href="mailto:fedor_qd@mail.ru" target="_blank">fedor_qd@mail.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> " - It does not respect the current locale and assumes"<br>On Symbian only LC_ALL locale used in C-apps. Changind locale doesn't work by libc design. But dot and comma as decimal separator may used at same time. Add in todo list<br><br>StrtoF - I want write strtoD. My mistake<br><br>" - It does not support hexadecimal numbers. - It does not support having an exponent (power of 10 for decimal numbers and power of 2 for hexadecimal numbers)."<br>If Zvision requred - that will be added.<br><br><br>Fedor Strizhnev<br>Федор Стрижнёв.<br><br><blockquote style="border-left:1px solid #0857a6;margin:10px;padding:0 0 0 10px">
Аўторак, 22 верасня 2015, 20:23 +01:00 ад Thierry Crozat <<a href="mailto:criezy@scummvm.org" target="_blank">criezy@scummvm.org</a>>:<br>
<br>
<div>
<div>
<div>
<div><div>Hi,</div><div><br></div><div>I only had a quick look but your implementation of <span style="font-family:Menlo;font-size:11px">strtof__</span> does not behave in the expected way in several respects:</div><div> - It does not respect the current locale and assumes the decimal point separator is a dot. In some locale, for example in French (and I believe in Russian?) the decimal point separator would bd a coma. To be honest I find it a pain, but C function such as strtof and sscanf respect the current locale.</div><div> - It does not support hexadecimal numbers.</div><div> - It does not support having an exponent (power of 10 for decimal numbers and power of 2 for hexadecimal numbers).</div><div> - You don't handle the "nan", "inf" and "infinity" case either.</div><div><br></div><div>So for example all the followings are not correctly parsed (not even considering the locale issue):</div><div>-1.234e+12</div><div>0x12C4.0Fp-1B2</div><div>NAN</div><div>INF</div><div><br></div><div>The locale, hexadecimal and nan/inf cases are maybe not an issue for ScummVM (?). Not supporting the exponent might be a bigger issue.</div><div>But otherwise it looks like the code would work.</div><div><br></div><div>Thierry</div><div><br></div><br><div><div><div class="h5"><div>On 22 Sep 2015, at 10:42, Федор <<a href="https://e.mail.ru/compose/?mailto=mailto%3afedor_qd@mail.ru" target="_blank">fedor_qd@mail.ru</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">Hi! I need fresh eye on my code.<br> Some times ago I found Symbian sscanf don't parses floating point numbers in strings.<br>I'm using as start point sscanf implementation in tizen port. I try strtod() in libc and find it seems also broken.<br>I write own strod() but it works bad.<br>Error checking missing now.<br>Fedor Strizhnev<br>Федор Стрижнёв.<br><br><br></div></div><span><main.cpp></span>------------------------------------------------------------------------------<span class=""><br>_______________________________________________<br>Scummvm-devel mailing list<br><a href="https://e.mail.ru/compose/?mailto=mailto%3aScummvm%2ddevel@lists.sourceforge.net" target="_blank">Scummvm-devel@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a><br></span></blockquote></div><br></div>
</div>
</div>
</div>
</blockquote>
<br></div>
<br>------------------------------------------------------------------------------<br>
<br>_______________________________________________<br>
Scummvm-devel mailing list<br>
<a href="mailto:Scummvm-devel@lists.sourceforge.net">Scummvm-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a><br>
<br></blockquote></div><br></div>