From: N. Brouard Date: Wed, 18 Jun 2014 17:54:09 +0000 (+0000) Subject: Summary: open browser, use gnuplot on same dir than imach if not found in the path X-Git-Tag: imach-099s7~434 X-Git-Url: https://henry.ined.fr/git/?a=commitdiff_plain;h=7b2bf46dece5fa0389c3ac25a3dbe0fed765eced;p=.git Summary: open browser, use gnuplot on same dir than imach if not found in the path --- diff --git a/src/imach.c b/src/imach.c index cc37d16..79a21b8 100644 --- a/src/imach.c +++ b/src/imach.c @@ -1,6 +1,9 @@ /* $Id$ $State$ $Log$ + Revision 1.151 2014/06/18 16:43:30 brouard + *** empty log message *** + Revision 1.150 2014/06/18 16:42:35 brouard Summary: If gnuplot is not in the path try on same directory than imach binary (OSX) Author: brouard @@ -6669,7 +6672,7 @@ Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf
\n",\ 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); } @@ -6680,8 +6683,13 @@ Interval (in months) between two waves: Min=%d Max=%d Mean=%.2lf
\n",\ 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);