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

This commit is contained in:
sjplimp
2006-12-19 16:39:30 +00:00
parent 828e342394
commit 5c22269d4e
2 changed files with 32 additions and 24 deletions

View File

@ -789,13 +789,13 @@ void Input::log()
if (logfile) fclose(logfile);
if (strcmp(arg[0],"none") == 0) logfile = NULL;
else {
char fname[128];
if (universe->nworlds == 1) strcpy(fname,arg[0]);
else sprintf(fname,"%s.%d",arg[0],universe->iworld);
logfile = fopen(fname,"w");
// char fname[128];
// if (universe->nworlds == 1) strcpy(fname,arg[0]);
// else sprintf(fname,"%s.%d",arg[0],universe->iworld);
logfile = fopen(arg[0],"w");
if (logfile == NULL) {
char str[128];
sprintf(str,"Cannot open logfile %s",fname);
sprintf(str,"Cannot open logfile %s",arg[0]);
error->one(str);
}
}