--- imach/src/imach.c 2018/02/21 07:58:13 1.280 +++ imach/src/imach.c 2018/02/27 19:25:23 1.281 @@ -1,6 +1,9 @@ -/* $Id: imach.c,v 1.280 2018/02/21 07:58:13 brouard Exp $ +/* $Id: imach.c,v 1.281 2018/02/27 19:25:23 brouard Exp $ $State: Exp $ $Log: imach.c,v $ + Revision 1.281 2018/02/27 19:25:23 brouard + Summary: Adding second argument for quitting + Revision 1.280 2018/02/21 07:58:13 brouard Summary: 0.99r15 @@ -1045,12 +1048,12 @@ typedef struct { #define ODIRSEPARATOR '\\' #endif -/* $Id: imach.c,v 1.280 2018/02/21 07:58:13 brouard Exp $ */ +/* $Id: imach.c,v 1.281 2018/02/27 19:25:23 brouard Exp $ */ /* $State: Exp $ */ #include "version.h" char version[]=__IMACH_VERSION__; char copyright[]="February 2016,INED-EUROREVES-Institut de longevite-Japan Society for the Promotion of Science (Grant-in-Aid for Scientific Research 25293121), Intel Software 2015-2018"; -char fullversion[]="$Revision: 1.280 $ $Date: 2018/02/21 07:58:13 $"; +char fullversion[]="$Revision: 1.281 $ $Date: 2018/02/27 19:25:23 $"; char strstart[80]; char optionfilext[10], optionfilefiname[FILENAMELENGTH]; int erreur=0, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ @@ -10795,8 +10798,13 @@ int main(int argc, char *argv[]) if(pathr[0] == '\0') break; /* Dirty */ } } + else if (argc<=2){ + strcpy(pathtot,argv[1]); + } else{ strcpy(pathtot,argv[1]); + strcpy(z,argv[2]); + printf("\nargv[2]=%s z=%c\n",argv[2],z[0]); } /*if(getcwd(pathcd, MAXLINE)!= NULL)printf ("Error pathcd\n");*/ /*cygwin_split_path(pathtot,path,optionfile); @@ -10874,8 +10882,6 @@ int main(int argc, char *argv[]) exit(70); } - - strcpy(filereso,"o"); strcat(filereso,fileresu); if((ficparo=fopen(filereso,"w"))==NULL) { /* opened on subdirectory */ @@ -12661,6 +12667,8 @@ Please run with mle=-1 to get a correct fclose(ficlog); /*------ End -----------*/ + +/* Executes gnuplot */ printf("Before Current directory %s!\n",pathcd); #ifdef WIN32