Windows and xslt dll
Linus Torvalds
torvalds at linux-foundation.org
Wed Mar 6 07:20:57 PST 2013
On Wed, Mar 6, 2013 at 5:43 AM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
>
> but since the cylinder volume is stored in milliliters, it would be
> probably better to parse using:
>
> sscanf(buf, "%d.%d", &integral, &fraction)
> cyl.size.mliter = (integral * 1000) + fraction.
This is a bad idea, unless you have a very strong reason to believe
that the fractions are *always* shown with three digits.
It's probably a better idea to just do
setlocale(LC_NUMERIC,"C");
...
setlocale(LC_NUMERIC, "");
around the xslt parsing.
Maybe we should do it around the whole loading and saving thing too,
so that we don't get bitten by this again by mistake...
Linus
More information about the subsurface
mailing list