/* $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
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);
}
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);