- return d;
-}
-
-/**
- * i18n_atof() has the same prototype as ANSI C atof() but it accepts
- * either decimal separator when deserializing the string to a float number,
- * independant of the local computer setting.
- */
-double i18n_atof( const char *str )
-{
- return i18n_strtod( str, NULL );
-}
-
-
-/**
- * us_strtod() has the same prototype as ANSI C strtod() but it expects
- * a dot as decimal separator regardless of the system locale.
- */
-double us_strtod( const char *str, char **end )
-{
- char dup[strlen( str ) + 1], *ptr;
- double d;
- strcpy( dup, str );
-
- ptr = strchr( dup, ',' );
- if( ptr != NULL )
- *ptr = '\0';
-
- d = strtod( dup, &ptr );
- if( end != NULL )
- *end = (char *)&str[ptr - dup];
-
- return d;