Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/gmp.hfa

    rd1a9ff5 rff2a33e  
    1010// Created On       : Tue Apr 19 08:43:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Feb  7 22:10:30 2020
    13 // Update Count     : 29
     12// Last Modified On : Sat Jul 13 15:25:05 2019
     13// Update Count     : 27
    1414//
    1515
     
    3131        void ?{}( Int & this, signed long int init ) { mpz_init_set_si( this.mpz, init ); }
    3232        void ?{}( Int & this, unsigned long int init ) { mpz_init_set_ui( this.mpz, init ); }
    33         void ?{}( Int & this, const char val[] ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
     33        void ?{}( Int & this, const char * val ) { if ( mpz_init_set_str( this.mpz, val, 0 ) ) abort(); }
    3434        void ^?{}( Int & this ) { mpz_clear( this.mpz ); }
    3535
     
    3737        Int ?`mp( signed long int init ) { return (Int){ init }; }
    3838        Int ?`mp( unsigned long int init ) { return (Int){ init }; }
    39         Int ?`mp( const char init[] ) { return (Int){ init }; }
     39        Int ?`mp( const char * init ) { return (Int){ init }; }
    4040
    4141        // assignment
     
    4343        Int ?=?( Int & lhs, long int rhs ) { mpz_set_si( lhs.mpz, rhs ); return lhs; }
    4444        Int ?=?( Int & lhs, unsigned long int rhs ) { mpz_set_ui( lhs.mpz, rhs ); return lhs; }
    45         Int ?=?( Int & lhs, const char rhs[] ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
     45        Int ?=?( Int & lhs, const char * rhs ) { if ( mpz_set_str( lhs.mpz, rhs, 0 ) ) { abort | "invalid string conversion"; } return lhs; }
    4646
    4747        char ?=?( char & lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); lhs = val; return lhs; }
     
    265265        forall( dtype ostype | ostream( ostype ) ) {
    266266                ostype & ?|?( ostype & os, Int mp ) {
    267                         if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) );
     267                        if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
    268268                        gmp_printf( "%Zd", mp.mpz );
    269269                        sepOn( os );
Note: See TracChangeset for help on using the changeset viewer.