Diff for /imach/src/imach.c between versions 1.157 and 1.158

version 1.157, 2014/08/27 16:26:55 version 1.158, 2014/08/27 17:11:51
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     Revision 1.158  2014/08/27 17:11:51  brouard
     *** empty log message ***
   
   Revision 1.157  2014/08/27 16:26:55  brouard    Revision 1.157  2014/08/27 16:26:55  brouard
   Summary: Preparing windows Visual studio version    Summary: Preparing windows Visual studio version
   Author: Brouard    Author: Brouard
Line 6696  Interval (in months) between two waves: Line 6699  Interval (in months) between two waves:
   sprintf(plotcmd,"\"%sgnuplot.exe\"",pathimach);    sprintf(plotcmd,"\"%sgnuplot.exe\"",pathimach);
 #endif  #endif
   if(!stat(plotcmd,&info)){    if(!stat(plotcmd,&info)){
     printf("Error or gnuplot program not found: %s\n",plotcmd);fflush(stdout);      printf("Error or gnuplot program not found: '%s'\n",plotcmd);fflush(stdout);
     if(!stat(getenv("GNUPLOTBIN"),&info)){      if(!stat(getenv("GNUPLOTBIN"),&info)){
       printf("Error or gnuplot program not found: %s Environment GNUPLOTBIN not set.\n",plotcmd);fflush(stdout);        printf("Error or gnuplot program not found: '%s' Environment GNUPLOTBIN not set.\n",plotcmd);fflush(stdout);
     }else      }else
       strcpy(pplotcmd,plotcmd);        strcpy(pplotcmd,plotcmd);
 #ifdef __unix  #ifdef __unix
     strcpy(plotcmd,GNUPLOTPROGRAM);      strcpy(plotcmd,GNUPLOTPROGRAM);
     if(!stat(plotcmd,&info)){      if(!stat(plotcmd,&info)){
       printf("Error gnuplot program not found: %s\n",plotcmd);fflush(stdout);        printf("Error gnuplot program not found: '%s'\n",plotcmd);fflush(stdout);
     }else      }else
       strcpy(pplotcmd,plotcmd);        strcpy(pplotcmd,plotcmd);
 #endif  #endif
Line 6712  Interval (in months) between two waves: Line 6715  Interval (in months) between two waves:
     strcpy(pplotcmd,plotcmd);      strcpy(pplotcmd,plotcmd);
       
   sprintf(plotcmd,"%s %s",pplotcmd, optionfilegnuplot);    sprintf(plotcmd,"%s %s",pplotcmd, optionfilegnuplot);
   printf("Starting graphs with: %s\n",plotcmd);fflush(stdout);    printf("Starting graphs with: '%s'\n",plotcmd);fflush(stdout);
   
   if((outcmd=system(plotcmd)) != 0){    if((outcmd=system(plotcmd)) != 0){
     printf("gnuplot command might not be in your path: %s, err=%d\n", plotcmd, outcmd);      printf("gnuplot command might not be in your path: '%s', err=%d\n", plotcmd, outcmd);
     printf("\n Trying if gnuplot resides on the same directory that IMaCh\n");      printf("\n Trying if gnuplot resides on the same directory that IMaCh\n");
     sprintf(plotcmd,"%sgnuplot %s", pathimach, optionfilegnuplot);      sprintf(plotcmd,"%sgnuplot %s", pathimach, optionfilegnuplot);
     if((outcmd=system(plotcmd)) != 0)      if((outcmd=system(plotcmd)) != 0)
       printf("\n Still a problem with gnuplot command %s, err=%d\n", plotcmd, outcmd);        printf("\n Still a problem with gnuplot command %s, err=%d\n", plotcmd, outcmd);
   }    }
   printf(" Successul, please wait...");    printf(" Successful, please wait...");
   while (z[0] != 'q') {    while (z[0] != 'q') {
     /* chdir(path); */      /* chdir(path); */
     printf("\nType e to edit results with your browser, g to graph again and q for exit: ");      printf("\nType e to edit results with your browser, g to graph again and q for exit: ");
     scanf("%s",z);      scanf("%s",z);
 /*     if (z[0] == 'c') system("./imach"); */  /*     if (z[0] == 'c') system("./imach"); */
     if (z[0] == 'e') {      if (z[0] == 'e') {
 #ifdef _APPLE_  #ifdef __APPLE__
       sprintf(pplotcmd, "open %s", optionfilehtm);        sprintf(pplotcmd, "open %s", optionfilehtm);
 #elif __linux  #elif __linux
       sprintf(pplotcmd, "xdg-open %s", optionfilehtm);        sprintf(pplotcmd, "xdg-open %s", optionfilehtm);

Removed from v.1.157  
changed lines
  Added in v.1.158


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