Revert SEED handling and comment orocessing. It broke database compilation.
[open-adventure.git] / misc.c
diff --git a/misc.c b/misc.c
index 320d002a753a6384c768ad5dd42d25809cade628..b87c76913f6aab68b500979b20adce84fb05d443 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -757,14 +757,11 @@ long TSTBIT;
 
 
 #define TSTBIT(MASK,BIT) fTSTBIT(MASK,BIT)
-#undef RNDVOC
 
 void set_seed_from_time(void)
 {
   /* Use the current system time to get seed the ISO rand() function, from which we get a seed for the LCG. */
-  struct timespec ts;
-  clock_gettime(CLOCK_REALTIME, &ts);
-  srand(ts.tv_nsec);
+  srand(time(NULL));
   lcgstate.x = (unsigned long) rand() % lcgstate.m;
 }
 
@@ -783,6 +780,7 @@ long randrange(long range)
   return(result);
 }
 
+#undef RNDVOC
 long fRNDVOC(long CHAR, long FORCE) {
 long DIV, I, J, RNDVOC;