projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bunch of errors fixed.
[u/mdw/catacomb]
/
grand.c
diff --git
a/grand.c
b/grand.c
index
0f9eee5
..
ca0492b
100644
(file)
--- a/
grand.c
+++ b/
grand.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: grand.c,v 1.
1 1999/12/10 23:16:01
mdw Exp $
+ * $Id: grand.c,v 1.
3 2004/04/08 01:36:15
mdw Exp $
*
* Generic interface to random number generators
*
*
* Generic interface to random number generators
*
@@
-27,14
+27,6
@@
* MA 02111-1307, USA.
*/
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: grand.c,v $
- * Revision 1.1 1999/12/10 23:16:01 mdw
- * Generic interface.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <stddef.h>
/*----- Header files ------------------------------------------------------*/
#include <stddef.h>
@@
-126,7
+118,6
@@
uint32 grand_range(grand *r, uint32 l)
*/
z = m - (m % l);
*/
z = m - (m % l);
- m = z / l;
/* --- Generate numbers until something acceptable is found --- *
*
/* --- Generate numbers until something acceptable is found --- *
*
@@
-134,7
+125,7
@@
uint32 grand_range(grand *r, uint32 l)
*/
do x = w(r); while (x >= z);
*/
do x = w(r); while (x >= z);
- return (x
/ m
);
+ return (x
% l
);
}
}
}
}