From 6bc9799c8a4d70e2761ae26b7a54c205823782c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 21 May 2008 21:05:11 +0300 Subject: [PATCH] Remove i18n_strtod - nobody uses it and it's an ugly hack --- include/vlc_charset.h | 1 - src/test/i18n_atof.c | 7 ------- src/text/charset.c | 11 +---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/include/vlc_charset.h b/include/vlc_charset.h index 77678cd7a6..7899ccfaeb 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 d16b1a41ee..7b8f7f6c8f 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 4e265324a1..f7de34c159 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; -- 2.39.5