]> henry.ined.fr Git - .git/commitdiff
(Module): On windows (cygwin) function asctime_r doesn't
authorN. Brouard <brouard@ined.fr>
Wed, 25 Jun 2003 16:30:45 +0000 (16:30 +0000)
committerN. Brouard <brouard@ined.fr>
Wed, 25 Jun 2003 16:30:45 +0000 (16:30 +0000)
exist so I changed back to asctime which exists.

src/imach.c

index 01c8bbb5fc70501110b9d6cb6a6176611de67d0e..a7a4fde74c28b664fb73b0c2d4add8f5c127adef 100644 (file)
@@ -1,6 +1,13 @@
 /* $Id$
   $State$
   $Log$
+  Revision 1.91  2003/06/25 15:30:29  brouard
+  * imach.c (Repository): Duplicated warning errors corrected.
+  (Repository): Elapsed time after each iteration is now output. It
+  helps to forecast when convergence will be reached. Elapsed time
+  is stamped in powell.  We created a new html file for the graphs
+  concerning matrix of covariance. It has extension -cov.htm.
+
   Revision 1.90  2003/06/24 12:34:15  brouard
   (Module): Some bugs corrected for windows. Also, when
   mle=-1 a template is output in file "or"mypar.txt with the design
@@ -771,7 +778,8 @@ void powell(double p[], double **xi, int n, double ftol, int *iter, double *fret
     fprintf(ficrespow,"\n");fflush(ficrespow);
     if(*iter <=3){
       tm = *localtime(&curr_time.tv_sec);
-      asctime_r(&tm,strcurr);
+      strcpy(strcurr,asctime(&tmf));
+/*       asctime_r(&tm,strcurr); */
       forecast_time=curr_time;
       itmp = strlen(strcurr);
       if(strcurr[itmp-1]=='\n')
@@ -781,8 +789,8 @@ void powell(double p[], double **xi, int n, double ftol, int *iter, double *fret
       for(niterf=10;niterf<=30;niterf+=10){
        forecast_time.tv_sec=curr_time.tv_sec+(niterf-*iter)*(curr_time.tv_sec-last_time.tv_sec);
        tmf = *localtime(&forecast_time.tv_sec);
-       asctime_r(&tmf,strfor);
-/*     strcpy(strfor,asctime(&tmf)); */
+/*     asctime_r(&tmf,strfor); */
+       strcpy(strfor,asctime(&tmf));
        itmp = strlen(strfor);
        if(strfor[itmp-1]=='\n')
        strfor[itmp-1]='\0';