]> www.hackdaworld.org Git - physik/nlsop.git/commitdiff
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 ca83572cdfcea830f02b4b51a2e44dd1455bee20..2bec6ec342e2a53f260725d54f5d86fb5068f31f 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))
   {
   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);
    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);
    }
     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)
    {
 #endif
    if(i%resave==0 && strcmp(s_file,"") && resave!=0 && i!=0)
    {
index cb3e900eb0d11be2133940e679669807a7095a47..468a3a5d877cd329801d2546048dd572a14e9bd0 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
  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))
   {
 #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
   }
   c_ptr=b_ptr;
 #ifdef MORE_PRINTF
-  printf(" done\n");
+  printf("got it!\n");
 #endif
  }
 
 #endif
  }