[vlc-devel] commit: Remove i18n_strtod - nobody uses it and it's an ugly hack ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 21 20:03:43 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May 21 21:05:11 2008 +0300| [6bc9799c8a4d70e2761ae26b7a54c205823782c9]

Remove i18n_strtod - nobody uses it and it's an ugly hack

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6bc9799c8a4d70e2761ae26b7a54c205823782c9
---

 include/vlc_charset.h |    1 -
 src/test/i18n_atof.c  |    7 -------
 src/text/charset.c    |   11 +----------
 3 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/include/vlc_charset.h b/include/vlc_charset.h
index 77678cd..7899ccf 100644
--- a/include/vlc_charset.h
+++ b/include/vlc_charset.h
@@ -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 * ) );
diff --git a/src/test/i18n_atof.c b/src/test/i18n_atof.c
index d16b1a4..7b8f7f6 100644
--- a/src/test/i18n_atof.c
+++ b/src/test/i18n_atof.c
@@ -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.)
diff --git a/src/text/charset.c b/src/text/charset.c
index 4e26532..f7de34c 100644
--- a/src/text/charset.c
+++ b/src/text/charset.c
@@ -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;




More information about the vlc-devel mailing list