Unverified Commit 826a14f5 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add workaround for handline include files

# Conflicts:
#	src/input.h
parent c79044c3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ Input::Input(LAMMPS *lmp, int argc, char **argv) : Pointers(lmp)

  echo_screen = 0;
  echo_log = 1;
  eof_return = 0;

  label_active = 0;
  labelstr = NULL;
@@ -206,6 +207,7 @@ void Input::file()
    MPI_Bcast(&n,1,MPI_INT,0,world);
    if (n == 0) {
      if (label_active) error->all(FLERR,"Label wasn't found in input script");
      if (eof_return) break;
      if (me == 0) {
        if (infile != stdin) {
          fclose(infile);
@@ -1057,6 +1059,11 @@ void Input::include()
      error->one(FLERR,str);
    }
    infiles[nfile++] = infile;
    eof_return = 1;
    file();
    eof_return = 0;
    nfile--;
    infile = infiles[nfile-1];
  }
}