From a5eda2445906b8e83be96d31aa8fa15f1589934f Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 13 Dec 2007 14:33:56 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1249 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/input.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index db125b1f9e..886564fb95 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -636,21 +636,16 @@ void Input::next_command() void Input::print() { - if (narg < 1) error->all("Illegal print command"); + if (narg != 1) error->all("Illegal print command"); + + // substitute for $ variables (no printing) + + substitute(arg[0],0); - char *str = new char[MAXLINE]; - str[0] = '\0'; - for (int iarg = 0; iarg < narg; iarg++) { - strcat(str,arg[iarg]); - strcat(str," "); - } - if (me == 0) { - if (screen) fprintf(screen,"%s\n",str); - if (logfile) fprintf(logfile,"%s\n",str); + if (screen) fprintf(screen,"%s\n",arg[0]); + if (logfile) fprintf(logfile,"%s\n",arg[0]); } - - delete [] str; } /* ---------------------------------------------------------------------- */