--- imach/src/imach.c 2014/06/18 16:43:30 1.151 +++ imach/src/imach.c 2014/06/18 17:54:09 1.152 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.151 2014/06/18 16:43:30 brouard Exp $ +/* $Id: imach.c,v 1.152 2014/06/18 17:54:09 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.152 2014/06/18 17:54:09 brouard + Summary: open browser, use gnuplot on same dir than imach if not found in the path + Revision 1.151 2014/06/18 16:43:30 brouard *** empty log message *** @@ -503,11 +506,11 @@ extern int errno; #define ODIRSEPARATOR '/' #endif -/* $Id: imach.c,v 1.151 2014/06/18 16:43:30 brouard Exp $ */ +/* $Id: imach.c,v 1.152 2014/06/18 17:54:09 brouard Exp $ */ /* $State: Exp $ */ char version[]="Imach version 0.98nT, January 2014,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121)"; -char fullversion[]="$Revision: 1.151 $ $Date: 2014/06/18 16:43:30 $"; +char fullversion[]="$Revision: 1.152 $ $Date: 2014/06/18 17:54:09 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -6672,7 +6675,7 @@ Interval (in months) between two waves: if((outcmd=system(plotcmd)) != 0){ printf("\n Problem with gnuplot command %s\n", plotcmd); printf("\n Trying on same directory\n"); - sprintf(plotcmd,"./gnuplot %s", optionfilegnuplot); + sprintf(plotcmd,"%sgnuplot %s", pathimach, optionfilegnuplot); if((outcmd=system(plotcmd)) != 0) printf("\n Still a problem with gnuplot command %s\n", plotcmd); } @@ -6683,8 +6686,13 @@ Interval (in months) between two waves: scanf("%s",z); /* if (z[0] == 'c') system("./imach"); */ if (z[0] == 'e') { - printf("Starting browser with: %s",optionfilehtm);fflush(stdout); - system(optionfilehtm); +#ifdef OSX + sprintf(pplotcmd, "open %s", optionfilehtm); +#elsedef + sprintf(pplotcmd, "%s", optionfilehtm); +#enddef + printf("Starting browser with: %s",plotcmd);fflush(stdout); + system(plotcmd); } else if (z[0] == 'g') system(plotcmd); else if (z[0] == 'q') exit(0);