Changeset cb63940a0b567471603b667c391770309ad15c31

Show
Ignore:
Timestamp:
05/24/08 11:06:24 (4 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1211619984 +0300
git-parent:

[2b617e77c1f838066916c4a46de7c0e99b38105c]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1211619984 +0300
Message:

Inline atoll and atof

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_fixups.h

    r2b617e7 rcb63940  
    7171#endif 
    7272 
    73 #ifndef HAVE_ATOF 
    74 # define atof vlc_atof 
     73#ifndef HAVE_STRTOF 
     74# define strtof( a, b ) ((float)strtod (a, b)) 
    7575#endif 
    7676 
    77 #ifndef HAVE_STRTOF 
    78 # ifdef HAVE_STRTOD 
    79 #  define strtof( a, b ) ((float)strtod (a, b)) 
    80 # endif 
    81 #endif 
    82  
    83 #ifndef HAVE_ATOLL 
    84 # define atoll vlc_atoll 
     77#ifndef HAVE_ATOF 
     78# define atof( str ) (strtod ((str), (char **)NULL, 10)) 
    8579#endif 
    8680 
    8781#ifndef HAVE_STRTOLL 
    8882# define strtoll vlc_strtoll 
     83#endif 
     84 
     85#ifndef HAVE_ATOLL 
     86# define atoll( str ) (strtoll ((str), (char **)NULL, 10)) 
    8987#endif 
    9088 
  • src/extras/libc.c

    r2b617e7 rcb63940  
    227227 
    228228/***************************************************************************** 
    229  * atof: convert a string to a double. 
    230  *****************************************************************************/ 
    231 #if !defined( HAVE_ATOF ) 
    232 double vlc_atof( const char *nptr ) 
    233 { 
    234     double f_result; 
    235     wchar_t *psz_tmp = NULL; 
    236     int i_len = strlen( nptr ) + 1; 
    237  
    238     psz_tmp = malloc( i_len * sizeof(wchar_t) ); 
    239     if( !psz_tmp ) 
    240         return NULL; 
    241     MultiByteToWideChar( CP_ACP, 0, nptr, -1, psz_tmp, i_len ); 
    242     f_result = wcstod( psz_tmp, NULL ); 
    243     free( psz_tmp ); 
    244  
    245     return f_result; 
    246 } 
    247 #endif 
    248  
    249 /***************************************************************************** 
    250229 * strtoll: convert a string to a 64 bits int. 
    251230 *****************************************************************************/ 
     
    319298#endif 
    320299 
    321 /***************************************************************************** 
    322  * atoll: convert a string to a 64 bits int. 
    323  *****************************************************************************/ 
    324 #if !defined( HAVE_ATOLL ) 
    325 int64_t vlc_atoll( const char *nptr ) 
    326 { 
    327     return strtoll( nptr, (char **)NULL, 10 ); 
    328 } 
    329 #endif 
    330  
    331300/** 
    332301 * Copy a string to a sized buffer. The result is always nul-terminated 
  • src/libvlccore.sym

    r2b617e7 rcb63940  
    372372vlc_alphasort 
    373373vlc_asprintf 
    374 vlc_atof 
    375 vlc_atoll 
    376374vlc_b64_decode 
    377375vlc_b64_decode_binary