forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6562 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
46b6117703
commit
42f9808cc0
|
@ -406,7 +406,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
|||
strcpy(begin,pattern);
|
||||
strcpy(end,ptr+1);
|
||||
int nbegin = strlen(begin);
|
||||
int maxnum = -1;
|
||||
bigint maxnum = -1;
|
||||
|
||||
struct dirent *ep;
|
||||
DIR *dp = opendir(dirname);
|
||||
|
@ -419,7 +419,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
|||
*ptr = '\0';
|
||||
if (strlen(&ep->d_name[nbegin]) < n) {
|
||||
strcpy(middle,&ep->d_name[nbegin]);
|
||||
if (atoi(middle) > maxnum) maxnum = atoi(middle);
|
||||
if (ATOBIGINT(middle) > maxnum) maxnum = ATOBIGINT(middle);
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
|
@ -430,7 +430,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
|||
|
||||
ptr = strchr(infile,'*');
|
||||
*ptr = '\0';
|
||||
sprintf(outfile,"%s%d%s",infile,maxnum,ptr+1);
|
||||
sprintf(outfile,"%s" BIGINT_FORMAT "%s",infile,maxnum,ptr+1);
|
||||
*ptr = '*';
|
||||
|
||||
// clean up
|
||||
|
|
Loading…
Reference in New Issue