Don't define Rand() if isaac64 is used
This commit is contained in:
+1
-3
@@ -182,9 +182,7 @@ extern void FDECL(interject, (int));
|
||||
#define USE_STDARG
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# define RANDOM
|
||||
# ifdef RANDOM
|
||||
# define Rand() random()
|
||||
|
||||
+1
-3
@@ -78,9 +78,7 @@
|
||||
#include <time.h>
|
||||
|
||||
/* the high quality random number routines */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# ifdef RANDOM
|
||||
# define Rand() random()
|
||||
# else
|
||||
|
||||
+1
-3
@@ -237,9 +237,7 @@
|
||||
#endif
|
||||
|
||||
/* the high quality random number routines */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# ifdef RANDOM
|
||||
# define Rand() random()
|
||||
# else
|
||||
|
||||
+1
-3
@@ -348,9 +348,7 @@
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
/* the high quality random number routines */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# if defined(BSD) || defined(LINUX) || defined(ULTRIX) || defined(CYGWIN32) \
|
||||
|| defined(RANDOM) || defined(__APPLE__)
|
||||
# define Rand() random()
|
||||
|
||||
+1
-3
@@ -243,9 +243,7 @@ typedef __mode_t mode_t;
|
||||
#define rindex strrchr
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# if defined(RANDOM)
|
||||
# define Rand() random()
|
||||
/* VMS V7 adds these entry points to DECC$SHR; stick with the nethack-supplied
|
||||
|
||||
+1
-3
@@ -143,9 +143,7 @@
|
||||
#define USE_STDARG
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
#ifdef USE_ISAAC64
|
||||
#define Rand() rn2(RAND_MAX)
|
||||
#else
|
||||
#ifndef USE_ISAAC64
|
||||
# ifdef RANDOM
|
||||
# define Rand() random()
|
||||
# else
|
||||
|
||||
+3
-3
@@ -125,12 +125,12 @@ boolean exclude_cookie;
|
||||
case 2: /*(might let a bogus input arg sneak thru)*/
|
||||
case 1:
|
||||
beginning = (long) true_rumor_start;
|
||||
tidbit = Rand() % true_rumor_size;
|
||||
tidbit = rn2(true_rumor_size);
|
||||
break;
|
||||
case 0: /* once here, 0 => false rather than "either"*/
|
||||
case -1:
|
||||
beginning = (long) false_rumor_start;
|
||||
tidbit = Rand() % false_rumor_size;
|
||||
tidbit = rn2(false_rumor_size);
|
||||
break;
|
||||
default:
|
||||
impossible("strange truth value for rumor");
|
||||
@@ -305,7 +305,7 @@ char *buf;
|
||||
(void) dlb_fseek(fh, 0L, SEEK_END);
|
||||
endtxt = dlb_ftell(fh);
|
||||
sizetxt = endtxt - starttxt;
|
||||
tidbit = Rand() % sizetxt;
|
||||
tidbit = rn2(sizetxt);
|
||||
|
||||
(void) dlb_fseek(fh, starttxt + tidbit, SEEK_SET);
|
||||
(void) dlb_fgets(line, sizeof line, fh);
|
||||
|
||||
Reference in New Issue
Block a user