rearranged printfs
authorhackbard <hackbard>
Fri, 1 Oct 2004 11:21:29 +0000 (11:21 +0000)
committerhackbard <hackbard>
Fri, 1 Oct 2004 11:21:29 +0000 (11:21 +0000)
nlsop.c
random.c

diff --git a/nlsop.c b/nlsop.c
index ca83572..2bec6ec 100644 (file)
--- a/nlsop.c
+++ b/nlsop.c
@@ -1442,6 +1442,9 @@ int main(int argc,char **argv)
   i=(c_step?c_step:0);
   while((i<my_info.steps) && (quit==0) && (escape==0))
   {
+#ifdef MORE_PRINTF
+   if(i%refresh==0) printf("step: %d\n",i);
+#endif
    for(j=0;j<my_info.cpi;j++)
    {
     x_c=get_rand(d3_l.max_x);
@@ -1462,9 +1465,6 @@ int main(int argc,char **argv)
     sprintf(cc_txt,"total c: %d",my_info.cc);
     d3_lattice_draw(&d3_l,x,y,z,25,arg_v,mode,0,NULL,0,NULL,0);
    }
-#endif
-#ifdef MORE_PRINTF
-   if(i%refresh==0) printf("step: %d\n",i);
 #endif
    if(i%resave==0 && strcmp(s_file,"") && resave!=0 && i!=0)
    {
index cb3e900..468a3a5 100644 (file)
--- a/random.c
+++ b/random.c
@@ -56,7 +56,7 @@ u32 get_rand(u32 max)
  if(c_ptr>=b_ptr+BUFSIZE)
  {
 #ifdef MORE_PRINTF
-  printf("getting another %d bytes of random data ...",BUFSIZE);
+  printf("getting another %d bytes of random data ...\n",BUFSIZE);
 #endif
   if(read(rand_fd,b_ptr,BUFSIZE*sizeof(u32))<BUFSIZE*sizeof(u32))
   {
@@ -67,7 +67,7 @@ u32 get_rand(u32 max)
   }
   c_ptr=b_ptr;
 #ifdef MORE_PRINTF
-  printf(" done\n");
+  printf("got it!\n");
 #endif
  }