projects
/
physik
/
nlsop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e418c21
)
more printfs
author
hackbard
<hackbard>
Thu, 30 Sep 2004 18:01:38 +0000
(18:01 +0000)
committer
hackbard
<hackbard>
Thu, 30 Sep 2004 18:01:38 +0000
(18:01 +0000)
random.c
patch
|
blob
|
history
diff --git
a/random.c
b/random.c
index
30a7fab
..
cb3e900
100644
(file)
--- a/
random.c
+++ b/
random.c
@@
-55,6
+55,9
@@
u32 get_rand(u32 max)
{
if(c_ptr>=b_ptr+BUFSIZE)
{
+#ifdef MORE_PRINTF
+ printf("getting another %d bytes of random data ...",BUFSIZE);
+#endif
if(read(rand_fd,b_ptr,BUFSIZE*sizeof(u32))<BUFSIZE*sizeof(u32))
{
/* -> assume random file, end reached */
@@
-63,6
+66,9
@@
u32 get_rand(u32 max)
read(rand_fd,b_ptr,BUFSIZE*sizeof(u32));
}
c_ptr=b_ptr;
+#ifdef MORE_PRINTF
+ printf(" done\n");
+#endif
}
return((u32)(*(c_ptr++)*(max*1.0/((long long unsigned int)URAND_MAX+1))));