git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4867 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2010-09-27 17:33:53 +00:00
parent d798541772
commit b57959fe8a
1 changed files with 10 additions and 7 deletions

View File

@ -623,14 +623,17 @@ void Input::jump()
}
if (me == 0) {
if (infile != stdin) fclose(infile);
infile = fopen(arg[0],"r");
if (infile == NULL) {
char str[128];
sprintf(str,"Cannot open input script %s",arg[0]);
error->one(str);
if (strcmp(arg[0],"SELF") == 0) rewind(infile);
else {
if (infile != stdin) fclose(infile);
infile = fopen(arg[0],"r");
if (infile == NULL) {
char str[128];
sprintf(str,"Cannot open input script %s",arg[0]);
error->one(str);
}
infiles[nfile-1] = infile;
}
infiles[nfile-1] = infile;
}
if (narg == 2) {