]> git.street.me.uk Git - andy/viking.git/commit - .gitignore
SF Bugs#106: Fix incorrect location on opening .vik file saved in different locale.
authorRob Norris <rw_norris@hotmail.com>
Tue, 27 May 2014 21:45:50 +0000 (22:45 +0100)
committerRob Norris <rw_norris@hotmail.com>
Tue, 27 May 2014 21:45:50 +0000 (22:45 +0100)
commit81687a7388bf16d84d85987c97d029dc5e0c61a0
tree4b1d4631b53a86e59d5891eef4abe87e05cebc95
parent9d524951010b1ec1cd7577747f37ec138a38be79
SF Bugs#106: Fix incorrect location on opening .vik file saved in different locale.

Enable reading in of decimal values that may contain either '.' or ',' as the separator.
Need to use modified version of strtod() since the standard C library does not support reading in values from a different locale.

Ideally Viking shouldn't have saved these values into the file in a locale dependent manner,
but for a few values this is the case (ever since the first public release of Viking).
Thus to maintain backwards compatibility need to handle standard variations of the decimal separator.

Selected strtod() from the Sanos project for it's simplicity
(compared to 'David M. Gay' version: http://www.netlib.org/fp/dtoa.c - which may handle extremes of precision better - but such values aren't encountered in Viking)
.gitignore
src/Makefile.am
src/file.c
src/misc/strtod.c
src/misc/strtod.h [new file with mode: 0644]