Diff for /imach/src/imach.c between versions 1.8 and 1.10

version 1.8, 2001/05/02 17:54:31 version 1.10, 2001/05/09 14:25:42
Line 1304  jmean=0.; Line 1304  jmean=0.;
         dh[mi][i]=1;          dh[mi][i]=1;
       else{        else{
         if (s[mw[mi+1][i]][i] > nlstate) {          if (s[mw[mi+1][i]][i] > nlstate) {
             if (agedc[i] < 2*AGESUP) {
           j= rint(agedc[i]*12-agev[mw[mi][i]][i]*12);            j= rint(agedc[i]*12-agev[mw[mi][i]][i]*12);
           /*if ((j<0) || (j>28)) printf("j=%d num=%d ",j,i);*/  
           if(j==0) j=1;  /* Survives at least one month after exam */            if(j==0) j=1;  /* Survives at least one month after exam */
           k=k+1;            k=k+1;
           if (j >= jmax) jmax=j;            if (j >= jmax) jmax=j;
           else if (j <= jmin)jmin=j;            else if (j <= jmin)jmin=j;
           sum=sum+j;            sum=sum+j;
             if (j<0) printf("j=%d num=%d ",j,i);
             }
         }          }
         else{          else{
           j= rint( (agev[mw[mi+1][i]][i]*12 - agev[mw[mi][i]][i]*12));            j= rint( (agev[mw[mi+1][i]][i]*12 - agev[mw[mi][i]][i]*12));
           /*if ((j<0) || (j>28)) printf("j=%d num=%d ",j,i);*/  
           k=k+1;            k=k+1;
           if (j >= jmax) jmax=j;            if (j >= jmax) jmax=j;
           else if (j <= jmin)jmin=j;            else if (j <= jmin)jmin=j;
Line 1651  int main() Line 1652  int main()
   int *indx;    int *indx;
   char line[MAXLINE], linepar[MAXLINE];    char line[MAXLINE], linepar[MAXLINE];
   char title[MAXLINE];    char title[MAXLINE];
   char optionfile[FILENAMELENGTH], datafile[FILENAMELENGTH],  filerespl[FILENAMELENGTH];    char optionfile[FILENAMELENGTH], datafile[FILENAMELENGTH],  filerespl[FILENAMELENGTH], optionfilehtm[FILENAMELENGTH];
   char fileres[FILENAMELENGTH], filerespij[FILENAMELENGTH], filereso[FILENAMELENGTH];    char fileres[FILENAMELENGTH], filerespij[FILENAMELENGTH], filereso[FILENAMELENGTH];
   char filerest[FILENAMELENGTH];    char filerest[FILENAMELENGTH];
   char fileregp[FILENAMELENGTH];    char fileregp[FILENAMELENGTH];
Line 1676  int main() Line 1677  int main()
   double ***eij, ***vareij;    double ***eij, ***vareij;
   double **varpl; /* Variances of prevalence limits by age */    double **varpl; /* Variances of prevalence limits by age */
   double *epj, vepp;    double *epj, vepp;
   char version[80]="Imach version 62c, May 1999, INED-EUROREVES ";    char version[80]="Imach version 64b, May 2001, INED-EUROREVES ";
   char *alph[]={"a","a","b","c","d","e"}, str[4];    char *alph[]={"a","a","b","c","d","e"}, str[4];
   
   char z[1]="c", occ;    char z[1]="c", occ;
Line 1689  int main() Line 1690  int main()
   gettimeofday(&start_time, (struct timezone*)0); */ /* at first time */    gettimeofday(&start_time, (struct timezone*)0); */ /* at first time */
   
   
   printf("\nIMACH, Version 0.64a");    printf("\nIMACH, Version 0.64b");
   printf("\nEnter the parameter file name: ");    printf("\nEnter the parameter file name: ");
   
 #ifdef windows  #ifdef windows
Line 2374  chdir(path); Line 2375  chdir(path);
   fprintf(ficparo,"agemin=%.0f agemax=%.0f bage=%.0f fage=%.0f\n",agemin,agemax,bage,fage);    fprintf(ficparo,"agemin=%.0f agemax=%.0f bage=%.0f fage=%.0f\n",agemin,agemax,bage,fage);
 /*--------- index.htm --------*/  /*--------- index.htm --------*/
   
   if((fichtm=fopen("index.htm","w"))==NULL)    {    strcpy(optionfilehtm,optionfile);
     printf("Problem with index.htm \n");goto end;    strcat(optionfilehtm,".htm");
     if((fichtm=fopen(optionfilehtm,"w"))==NULL)    {
       printf("Problem with %s \n",optionfilehtm);goto end;
   }    }
   
  fprintf(fichtm,"<body><ul> <font size=\"6\">Imach, Version 0.64a </font> <hr size=\"2\" color=\"#EC5E5E\">   fprintf(fichtm,"<body><ul> <font size=\"6\">Imach, Version 0.64b </font> <hr size=\"2\" color=\"#EC5E5E\">
 Titre=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>  Titre=%s <br>Datafile=%s Firstpass=%d Lastpass=%d Stepm=%d Weight=%d Model=%s<br>
 Total number of observations=%d <br>  Total number of observations=%d <br>
 Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf<br>  Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf<br>
Line 2678  strcpy(fileresvpl,"vpl"); Line 2681  strcpy(fileresvpl,"vpl");
     if (z[0] == 'c') system("./imach");      if (z[0] == 'c') system("./imach");
     else if (z[0] == 'e') {      else if (z[0] == 'e') {
       chdir(path);        chdir(path);
       system("index.htm");        system(optionfilehtm);
     }      }
     else if (z[0] == 'q') exit(0);      else if (z[0] == 'q') exit(0);
   }    }

Removed from v.1.8  
changed lines
  Added in v.1.10


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>