[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] SetSeed and HAVE_LIBGMP
From: |
Joseph Heled |
Subject: |
[Bug-gnubg] SetSeed and HAVE_LIBGMP |
Date: |
Thu, 09 Jan 2003 08:48:15 +1300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202 |
line 135 (the '#if HAVE_LIBGMP') seem to imply that if you have this
library, you can't set the seed for other random number generators?
Can someone explain this to me?
-Joseph
from line 125 in set.c
------------------------------------------------
static void
SetSeed ( const rng rngx, char *sz ) {
if( rngx == RNG_MANUAL || rngx == RNG_RANDOM_DOT_ORG ) {
outputl( _("You can't set a seed "
"if you're using manual dice generation or
random.org") );
return;
}
if( *sz ) {
#if HAVE_LIBGMP
if( InitRNGSeedLong( sz, rngx ) )
outputl( _("You must specify a vaid seed -- try `help set "
"seed'.") );
else
outputf( _("Seed set to %s.\n"), sz );
#else
int n;
n = ParseNumber( &sz );
if( n < 0 ) {
outputl( _("You must specify a vaid seed -- try `help set seed'.")
);
return;
}
InitRNGSeed( n, rngx );
outputf( _("Seed set to %d.\n"), n );
#endif
} else
outputl( InitRNG( NULL, TRUE, rngx ) ?
_("Seed initialised from system random data.") :
_("Seed initialised by system clock.") );
}
- [Bug-gnubg] SetSeed and HAVE_LIBGMP,
Joseph Heled <=