diff options
author | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2001-08-01 13:03:12 +0000 |
---|---|---|
committer | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2001-08-01 13:03:12 +0000 |
commit | 770d915a294c3e8904d052720a96ffed0fdaf803 (patch) | |
tree | 649b8e62b4f0e3e0fc8ec06841c06dd0693c5860 | |
parent | 0833afd8e46075973bacc3e55b3b3f4a92be39b4 (diff) |
Fixed compiler warnings about a parameter named 'basename' which shadows
a global symbol of the same name.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@128 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | src/CheckpointRecovery.c | 52 | ||||
-rw-r--r-- | src/ioutil_CheckpointRecovery.h | 4 |
2 files changed, 28 insertions, 28 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index 87087e8..cba3106 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -149,8 +149,8 @@ int IOUtil_RegisterRecover (const char *name, @vtype cGH * @vio in @endvar - @var basename - @vdesc basename of the file(s) to recover from + @var basefilename + @vdesc basefilename of the file(s) to recover from @vtype const char * @vio in @endvar @@ -178,7 +178,7 @@ int IOUtil_RegisterRecover (const char *name, @endvar @@*/ void IOUtil_PrepareFilename (cGH *GH, - const char *basename, + const char *basefilename, char *fname, int called_from, int file_ioproc, @@ -201,7 +201,7 @@ void IOUtil_PrepareFilename (cGH *GH, case CP_RECOVER_DATA: case CP_RECOVER_PARAMETERS: case FILEREADER_DATA: - sprintf (fname, "%s/%s", recovery_dir, basename ? basename:recover_file); + sprintf (fname, "%s/%s", recovery_dir, basefilename ? basefilename:recover_file); break; default: @@ -257,8 +257,8 @@ void IOUtil_PrepareFilename (cGH *GH, @vtype cGH * @vio in @endvar - @var basename - @vdesc basename of the file(s) to recover from + @var basefilename + @vdesc basefilename of the file(s) to recover from @vtype const char * @vio in @endvar @@ -271,7 +271,7 @@ void IOUtil_PrepareFilename (cGH *GH, @endvar @@*/ static int IOUtil_RecoverFromFile (cGH *GH, - const char *basename, + const char *basefilename, int called_from) { int handle; @@ -288,7 +288,7 @@ static int IOUtil_RecoverFromFile (cGH *GH, Util_GetHandledData (RecoverFunctions, handle); if (recoverFn) { - retval = recoverFn (GH, basename, called_from); + retval = recoverFn (GH, basefilename, called_from); if (retval >= 0) { break; @@ -376,7 +376,7 @@ void IOUtil_RecoverVarsFromDatafiles (cGH *GH, { DECLARE_CCTK_PARAMETERS ioGH *myGH; - char *basename, *delim, delim_char; + char *basefilename, *delim, delim_char; myGH = (ioGH *) CCTK_GHExtension (GH, "IO"); @@ -393,43 +393,43 @@ void IOUtil_RecoverVarsFromDatafiles (cGH *GH, } /* duplicate the filename list and parse it */ - basename = strdup (in_files); - while (basename) + basefilename = strdup (in_files); + while (basefilename) { /* skip leading spaces */ - while (isspace ((int) *basename)) + while (isspace ((int) *basefilename)) { - basename++; + basefilename++; } - if (! *basename) + if (! *basefilename) { break; } /* find delimiter for current filename and cut there */ - for (delim = basename + 1; ! isspace ((int) *delim) && *delim; delim++); + for (delim = basefilename + 1; ! isspace ((int) *delim) && *delim; delim++); delim_char = *delim; *delim = 0; if (verbose) { CCTK_VInfo (CCTK_THORNSTRING, "Reading variables from data file '%s'", - basename); + basefilename); } - if (IOUtil_RecoverFromFile (GH, basename, FILEREADER_DATA) < 0) + if (IOUtil_RecoverFromFile (GH, basefilename, FILEREADER_DATA) < 0) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Failed to read variables from data file '%s'", basename); + "Failed to read variables from data file '%s'", basefilename); } *delim = delim_char; - basename = delim; + basefilename = delim; } - if (basename) + if (basefilename) { - free (basename - strlen (in_files)); + free (basefilename - strlen (in_files)); } if (myGH->do_inVars) @@ -496,7 +496,7 @@ void IOUtil_RecoverIDFromDatafiles (cGH *GH) @endvar @@*/ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, - const char *basename, + const char *basefilename, int called_from), const char *fileExtension, const char *fileType) @@ -518,7 +518,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, if (verbose) { CCTK_VInfo (CCTK_THORNSTRING, "Searching for %s checkpoint files " - "with basename '%s' in directory '%s'", + "with basefilename '%s' in directory '%s'", recover_file, recovery_dir); } @@ -537,7 +537,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, if (nRecoverFiles <= 0) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "No %s checkpoint files with basename '%s' found in " + "No %s checkpoint files with basefilename '%s' found in " "recovery directory '%s'", fileType, recover_file, recovery_dir); } @@ -579,7 +579,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, "Could not recover parameters from %s checkpoint file(s) " - "with basename '%s' in recovery directory '%s'", + "with basefilename '%s' in recovery directory '%s'", fileType, recover_file, recovery_dir); } return (retval); @@ -834,7 +834,7 @@ static int IOUtil_RecoverFileSelect (struct dirent *entry) } /* Cut the file name after the iteration number field - because we only need the basename later on. */ + because we only need the basefilename later on. */ *p = 0; return (1); diff --git a/src/ioutil_CheckpointRecovery.h b/src/ioutil_CheckpointRecovery.h index 2328928..4340fda 100644 --- a/src/ioutil_CheckpointRecovery.h +++ b/src/ioutil_CheckpointRecovery.h @@ -32,7 +32,7 @@ enum {CP_INITIAL_DATA, CP_EVOLUTION_DATA, CP_RECOVER_PARAMETERS, /* create a checkpoint filename */ void IOUtil_PrepareFilename (cGH *GH, - const char *basename, + const char *basefilename, char *fname, int called_from, int ioproc, @@ -49,7 +49,7 @@ void IOUtil_RecoverVarsFromDatafiles (cGH *GH, /* generic recovery routine called by other IO thorns */ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, - const char *basename, + const char *basefilename, int called_from), const char *fileExtension, const char *fileType); |