Changeset 70e4895


Ignore:
Timestamp:
Oct 31, 2017, 1:21:02 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
c59bde6
Parents:
fa477f7
Message:

rename rand48 to random, rand48seed to random_seed

Location:
src/libcfa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib

    rfa477f7 r70e4895  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Oct 30 17:30:09 2017
    13 // Update Count     : 242
     12// Last Modified On : Mon Oct 30 22:43:03 2017
     13// Update Count     : 244
    1414//
    1515
     
    213213//---------------------------------------
    214214
    215 void rand48seed( long int s );
    216 char rand48( void );
    217 char rand48( char l, char u );
    218 int rand48( void );
    219 unsigned int rand48( void );
    220 unsigned int rand48( unsigned int u );
    221 unsigned int rand48( unsigned int l, unsigned int u );
    222 long int rand48( void );
    223 unsigned long int rand48( void );
    224 unsigned long int rand48( unsigned long int u );
    225 unsigned long int rand48( unsigned long int l, unsigned long int u );
    226 float rand48( void );
    227 double rand48( void );
    228 float _Complex rand48( void );
    229 double _Complex rand48( void );
    230 long double _Complex rand48( void );
     215void random_seed( long int s );
     216char random( void );
     217char random( char l, char u );
     218int random( void );
     219unsigned int random( void );
     220unsigned int random( unsigned int u );
     221unsigned int random( unsigned int l, unsigned int u );
     222//long int random( void );
     223unsigned long int random( void );
     224unsigned long int random( unsigned long int u );
     225unsigned long int random( unsigned long int l, unsigned long int u );
     226float random( void );
     227double random( void );
     228float _Complex random( void );
     229double _Complex random( void );
     230long double _Complex random( void );
    231231
    232232//---------------------------------------
  • src/libcfa/stdlib.c

    rfa477f7 r70e4895  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Oct 30 17:53:04 2017
    13 // Update Count     : 295
     12// Last Modified On : Mon Oct 30 22:43:02 2017
     13// Update Count     : 297
    1414//
    1515
     
    275275//---------------------------------------
    276276
    277 void rand48seed( long int s ) { srand48( s ); }
    278 char rand48( void ) { return mrand48(); }
    279 char rand48( char l, char u ) { return lrand48() % (u - l) + l; }
    280 int rand48( void ) { return mrand48(); }
    281 unsigned int rand48( void ) { return lrand48(); }
    282 unsigned int rand48( unsigned int u ) { return lrand48() % u; }
    283 unsigned int rand48( unsigned int l, unsigned int u ) { return lrand48() % (u - l) + l; }
    284 long int rand48( void ) { return mrand48(); }
    285 unsigned long int rand48( void ) { return lrand48(); }
    286 unsigned long int rand48( unsigned long int u ) { return lrand48() % u; }
    287 unsigned long int rand48( unsigned long int l, unsigned long int u ) { return lrand48() % (u - l) + l; }
    288 float rand48( void ) { return (float)drand48(); }               // otherwise float uses lrand48
    289 double rand48( void ) { return drand48(); }
    290 float _Complex rand48( void ) { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
    291 double _Complex rand48( void ) { return drand48() + (double _Complex)(drand48() * _Complex_I); }
    292 long double _Complex rand48( void) { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
     277void random_seed( long int s ) { srand48( s ); }
     278char random( void ) { return mrand48(); }
     279char random( char l, char u ) { return lrand48() % (u - l) + l; }
     280int random( void ) { return mrand48(); }
     281unsigned int random( void ) { return lrand48(); }
     282unsigned int random( unsigned int u ) { return lrand48() % u; }
     283unsigned int random( unsigned int l, unsigned int u ) { return lrand48() % (u - l) + l; }
     284//long int random( void ) { return mrand48(); }
     285unsigned long int random( void ) { return lrand48(); }
     286unsigned long int random( unsigned long int u ) { return lrand48() % u; }
     287unsigned long int random( unsigned long int l, unsigned long int u ) { return lrand48() % (u - l) + l; }
     288float random( void ) { return (float)drand48(); }               // otherwise float uses lrand48
     289double random( void ) { return drand48(); }
     290float _Complex random( void ) { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
     291double _Complex random( void ) { return drand48() + (double _Complex)(drand48() * _Complex_I); }
     292long double _Complex random( void) { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
    293293
    294294//---------------------------------------
Note: See TracChangeset for help on using the changeset viewer.