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

This commit is contained in:
sjplimp 2007-12-13 14:33:56 +00:00
parent 40df8fdf8b
commit a5eda24459
1 changed files with 7 additions and 12 deletions

View File

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