Changeset 6bc9799c8a4d70e2761ae26b7a54c205823782c9
- Timestamp:
- 21/05/08 20:05:11
(7 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1211393111 +0300
- git-parent:
[788907c4acb9441c756c4c232727800a2d4c6714]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1211393111 +0300
- Message:
Remove i18n_strtod - nobody uses it and it's an ugly hack
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0fd1b74 |
r6bc9799 |
|
| 82 | 82 | VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) ); |
|---|
| 83 | 83 | |
|---|
| 84 | | VLC_INTERNAL( double, i18n_strtod, ( const char *, char ** ) ); |
|---|
| 85 | 84 | VLC_INTERNAL( double, i18n_atof, ( const char * ) ); |
|---|
| 86 | 85 | VLC_EXPORT( double, us_strtod, ( const char *, char ** ) ); |
|---|
| r99fab90 |
r6bc9799 |
|
| 57 | 57 | assert (us_atof("invalid") == 0.); |
|---|
| 58 | 58 | |
|---|
| 59 | | assert ((i18n_strtod(dot9, &end ) == 999999.999999) |
|---|
| 60 | | && (*end == '\0')); |
|---|
| 61 | | assert ((i18n_strtod(comma9, &end ) == 999999.999999) |
|---|
| 62 | | && (*end == '\0')); |
|---|
| 63 | | assert ((i18n_strtod(sharp9, &end ) == 999999.) |
|---|
| 64 | | && (*end == '#')); |
|---|
| 65 | | |
|---|
| 66 | 59 | assert ((us_strtod(dot9, &end ) == 999999.999999) |
|---|
| 67 | 60 | && (*end == '\0')); |
|---|
| r449fd28 |
r6bc9799 |
|
| 378 | 378 | |
|---|
| 379 | 379 | |
|---|
| 380 | | /** |
|---|
| 381 | | * There are two decimal separators in the computer world-wide locales: |
|---|
| 382 | | * dot (which is the american default), and comma (which is used in France, |
|---|
| 383 | | * the country with the most VLC developers, among others). |
|---|
| 384 | | * |
|---|
| 385 | | * i18n_strtod() has the same prototype as ANSI C strtod() but it accepts |
|---|
| 386 | | * either decimal separator when deserializing the string to a float number, |
|---|
| 387 | | * independant of the local computer setting. |
|---|
| 388 | | */ |
|---|
| 389 | | double i18n_strtod( const char *str, char **end ) |
|---|
| | 380 | static double i18n_strtod( const char *str, char **end ) |
|---|
| 390 | 381 | { |
|---|
| 391 | 382 | char *end_buf, e; |
|---|