remove class member name clashes. Pointers contains infile so we rename other uses to inpfile
This commit is contained in:
@ -580,32 +580,32 @@ void ReadRestart::command(int narg, char **arg)
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
infile contains a "*"
|
||||
search for all files which match the infile pattern
|
||||
inpfile contains a "*"
|
||||
search for all files which match the inpfile pattern
|
||||
replace "*" with latest timestep value to create outfile name
|
||||
search dir referenced by initial pathname of file
|
||||
if infile also contains "%", use "base" when searching directory
|
||||
if inpfile also contains "%", use "base" when searching directory
|
||||
only called by proc 0
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ReadRestart::file_search(char *infile, char *outfile)
|
||||
void ReadRestart::file_search(char *inpfile, char *outfile)
|
||||
{
|
||||
char *ptr;
|
||||
|
||||
// separate infile into dir + filename
|
||||
// separate inpfile into dir + filename
|
||||
|
||||
char *dirname = new char[strlen(infile) + 1];
|
||||
char *filename = new char[strlen(infile) + 1];
|
||||
char *dirname = new char[strlen(inpfile) + 1];
|
||||
char *filename = new char[strlen(inpfile) + 1];
|
||||
|
||||
if (strchr(infile,'/')) {
|
||||
ptr = strrchr(infile,'/');
|
||||
if (strchr(inpfile,'/')) {
|
||||
ptr = strrchr(inpfile,'/');
|
||||
*ptr = '\0';
|
||||
strcpy(dirname,infile);
|
||||
strcpy(dirname,inpfile);
|
||||
strcpy(filename,ptr+1);
|
||||
*ptr = '/';
|
||||
} else {
|
||||
strcpy(dirname,"./");
|
||||
strcpy(filename,infile);
|
||||
strcpy(filename,inpfile);
|
||||
}
|
||||
|
||||
// if filename contains "%" replace "%" with "base"
|
||||
@ -651,11 +651,11 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
||||
if (maxnum < 0) error->one(FLERR,"Found no restart file matching pattern");
|
||||
|
||||
// create outfile with maxint substituted for "*"
|
||||
// use original infile, not pattern, since need to retain "%" in filename
|
||||
// use original inpfile, not pattern, since need to retain "%" in filename
|
||||
|
||||
ptr = strchr(infile,'*');
|
||||
ptr = strchr(inpfile,'*');
|
||||
*ptr = '\0';
|
||||
sprintf(outfile,"%s" BIGINT_FORMAT "%s",infile,maxnum,ptr+1);
|
||||
sprintf(outfile,"%s" BIGINT_FORMAT "%s",inpfile,maxnum,ptr+1);
|
||||
*ptr = '*';
|
||||
|
||||
// clean up
|
||||
|
||||
Reference in New Issue
Block a user