#pragma warning( disable: 4001 4201 4214 4514 ) #include // needed for ULONG and CriticalSection support #pragma warning( disable: 4001 4201 4214 4514 ) ///////////////////////////////////////////////////////////////////////////// // // // randpeak.h -- Exported interface for randpeak.c // // // // While this header is targeted for Win32, the code // // in randpeak.c is portable provided the following: // // // // ULONG is an unsigned 32-bit data type // // and BOOL is an integral boolean type // // // // Two's complement wraparound (mod 2^32) // // occurs on addition and multiplication // // where result is greater than (2^32-1) // // // // If _MT or MULTITHREADED is defined, the // // definition and support of critical // // section primitives: // // // // CRITICAL_SECTION data type // // InitializeCriticalSection function // // EnterCriticalSection function // // LeaveCriticalSection function // // // // Author: Tom McGuire (tommcg), 03/29/94 // // // // (C) Copyright 1994, Microsoft Corporation // // // ///////////////////////////////////////////////////////////////////////////// #if ( defined( _MT ) && ! defined( MULTITHREADED )) #define MULTITHREADED 1 // compile multi-threaded support #endif ULONG BitReverse32( ULONG ulNumber ); // 31:0 -> 0:31 void SeedRandom32( ULONG ulSeed ); // must call first, non-reentrant ULONG Random32( void ); // linear distribution 0