]> git.sesse.net Git - vlc/commitdiff
Remove i18n_strtod - nobody uses it and it's an ugly hack
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 21 May 2008 18:05:11 +0000 (21:05 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Wed, 21 May 2008 18:05:11 +0000 (21:05 +0300)
include/vlc_charset.h
src/test/i18n_atof.c
src/text/charset.c

index 77678cd7a68fdc3d392bada75c8ad23f41660f56..7899ccfaeb86364b2dd1cc4e0b29cad9724f378b 100644 (file)
@@ -81,7 +81,6 @@ VLC_INTERNAL( bool, vlc_current_charset, ( char ** ) );
 
 VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
 
-VLC_INTERNAL( double, i18n_strtod, ( const char *, char ** ) );
 VLC_INTERNAL( double, i18n_atof, ( const char * ) );
 VLC_EXPORT( double, us_strtod, ( const char *, char ** ) );
 VLC_EXPORT( double, us_atof, ( const char * ) );
index d16b1a41ee745402187259106bb728014dbd8228..7b8f7f6c8f41bff6b1b085aeca7ef3e67eecbea4 100644 (file)
@@ -56,13 +56,6 @@ int main (void)
     assert (us_atof(sharp9) == 999999.);
     assert (us_atof("invalid") == 0.);
 
-    assert ((i18n_strtod(dot9, &end ) == 999999.999999)
-            && (*end == '\0'));
-    assert ((i18n_strtod(comma9, &end ) == 999999.999999)
-            && (*end == '\0'));
-    assert ((i18n_strtod(sharp9, &end ) == 999999.)
-            && (*end == '#'));
-
     assert ((us_strtod(dot9, &end ) == 999999.999999)
             && (*end == '\0'));
     assert ((us_strtod(comma9, &end ) == 999999.)
index 4e265324a1b662ac77ed4d410f5ce47471c8a43f..f7de34c15901a384485053bd1c432ede3a985201 100644 (file)
@@ -377,16 +377,7 @@ char *vlc_fix_readdir( const char *psz_string )
 }
 
 
-/**
- * There are two decimal separators in the computer world-wide locales:
- * dot (which is the american default), and comma (which is used in France,
- * the country with the most VLC developers, among others).
- *
- * i18n_strtod() has the same prototype as ANSI C strtod() but it accepts
- * either decimal separator when deserializing the string to a float number,
- * independant of the local computer setting.
- */
-double i18n_strtod( const char *str, char **end )
+static double i18n_strtod( const char *str, char **end )
 {
     char *end_buf, e;
     double d;