Ignore:
Timestamp:
Oct 30, 2017, 6:18:06 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:
9f865d1
Parents:
bd7f401
Message:

add more unsigned int rand48 routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib.c

    rbd7f401 rbfc0f40  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 23 20:30:44 2017
    13 // Update Count     : 292
     12// Last Modified On : Mon Oct 30 17:53:04 2017
     13// Update Count     : 295
    1414//
    1515
     
    277277void rand48seed( long int s ) { srand48( s ); }
    278278char rand48( void ) { return mrand48(); }
     279char rand48( char l, char u ) { return lrand48() % (u - l) + l; }
    279280int rand48( void ) { return mrand48(); }
    280281unsigned int rand48( void ) { return lrand48(); }
     282unsigned int rand48( unsigned int u ) { return lrand48() % u; }
     283unsigned int rand48( unsigned int l, unsigned int u ) { return lrand48() % (u - l) + l; }
    281284long int rand48( void ) { return mrand48(); }
    282285unsigned long int rand48( void ) { return lrand48(); }
     286unsigned long int rand48( unsigned long int u ) { return lrand48() % u; }
     287unsigned long int rand48( unsigned long int l, unsigned long int u ) { return lrand48() % (u - l) + l; }
    283288float rand48( void ) { return (float)drand48(); }               // otherwise float uses lrand48
    284289double rand48( void ) { return drand48(); }
Note: See TracChangeset for help on using the changeset viewer.