Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.cfa

    rb5e725a rf8729be  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 14 18:22:36 2023
    13 // Update Count     : 642
     12// Last Modified On : Thu Feb 16 16:31:34 2023
     13// Update Count     : 633
    1414//
    1515
     
    6565//---------------------------------------
    6666
    67 forall( T | { T strto( const char sptr[], char * eptr[], int ); } )
    68 T convert( const char sptr[] ) {
    69         char * eptr;
    70         errno = 0;                                                                                      // reset
    71         T val = strto( sptr, &eptr, 10 );                                       // attempt conversion
    72         if ( errno == ERANGE ) throw ExceptionInst( out_of_range );
    73         if ( eptr == sptr ||                                                            // conversion failed, no characters generated
    74                  *eptr != '\0' ) throw ExceptionInst( invalid_argument ); // not at end of str ?
    75         return val;
    76 } // convert
    77 
    78 float _Complex strto( const char sptr[], char * eptr[] ) {
     67float _Complex strto( const char sptr[], char ** eptr ) {
    7968        float re, im;
    8069        char * eeptr;
     
    8776} // strto
    8877
    89 double _Complex strto( const char sptr[], char * eptr[] ) {
     78double _Complex strto( const char sptr[], char ** eptr ) {
    9079        double re, im;
    9180        char * eeptr;
     
    9887} // strto
    9988
    100 long double _Complex strto( const char sptr[], char * eptr[] ) {
     89long double _Complex strto( const char sptr[], char ** eptr ) {
    10190        long double re, im;
    10291        char * eeptr;
Note: See TracChangeset for help on using the changeset viewer.