Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib.c

    r627f585 ra797e2b1  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // algorithm.c --
     7// algorithm.c -- 
    88//
    99// Author           : Peter A. Buhr
     
    7878} // posix_memalign
    7979
    80 forall( otype T, ttype Params | { void ?{}(T *, Params); } )
    81 T * new( Params p ) {
    82         return ((T*)malloc()){ p };
    83 }
    84 
    85 forall( dtype T | { void ^?{}(T *); } )
    86 void delete( T * ptr ) {
    87   if ( ptr ) {
    88     ^ptr{};
    89     free( ptr );
    90   }
    91 }
    92 
    9380//---------------------------------------
    9481
     
    154141        if ( sscanf( ptr, "%Lf%Lfi", &re, &im ) == EOF ) {}
    155142        return re + im * _Complex_I;
    156 }
     143}       
    157144
    158145int strto( const char * sptr, char ** eptr, int base ) {
     
    226213//---------------------------------------
    227214
    228 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
    229 [ T, T ] div( T t1, T t2 ) { return [ t1 / t2, t1 % t2 ]; }
     215// forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
     216// [ T, T ] div( T t1, T t2 ) { return [ t1 / t2, t1 % t2 ]; }
    230217
    231218//---------------------------------------
Note: See TracChangeset for help on using the changeset viewer.