2011-05-17 19:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/harbour.hbx
* src/rtl/hbrandom.c
+ HB_RAND32() -> <32-bit random number>
; TOFIX: random numbers are broken under mingw 4.5.2, only high 16bits are random.
in all HB_RAND*() functions
This commit is contained in:
@@ -16,6 +16,14 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-05-17 19:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/harbour.hbx
|
||||
* src/rtl/hbrandom.c
|
||||
+ HB_RAND32() -> <32-bit random number>
|
||||
|
||||
; TOFIX: random numbers are broken under mingw 4.5.2, only high 16bits are random.
|
||||
in all HB_RAND*() functions
|
||||
|
||||
2011-05-17 17:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! escape fn passed to upx
|
||||
|
||||
@@ -691,6 +691,7 @@ DYNAMIC HB_PROCESSVALUE
|
||||
DYNAMIC HB_PROGNAME
|
||||
DYNAMIC HB_PS
|
||||
DYNAMIC HB_PVALUE
|
||||
DYNAMIC HB_RAND32
|
||||
DYNAMIC HB_RANDOM
|
||||
DYNAMIC HB_RANDOMINT
|
||||
DYNAMIC HB_RANDOMSEED
|
||||
|
||||
@@ -118,6 +118,11 @@ HB_FUNC( HB_RANDOMINT )
|
||||
}
|
||||
}
|
||||
|
||||
HB_FUNC( HB_RAND32 ) /* returns an integer between 0 and 0xFFFFFFFF (inclusive) */
|
||||
{
|
||||
hb_retnint( ( HB_MAXINT ) ( hb_random_num() * ( HB_MAXINT ) HB_U32_MAX ) );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_RANDOMSEED )
|
||||
{
|
||||
srand( HB_ISNUM( 1 ) ? ( unsigned ) hb_parni( 1 ) : ( unsigned ) hb_dateMilliSeconds() );
|
||||
|
||||
Reference in New Issue
Block a user