diff options
author | goodale <goodale@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2004-10-29 22:23:51 +0000 |
---|---|---|
committer | goodale <goodale@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2004-10-29 22:23:51 +0000 |
commit | 642a0ae33e8e84c93bb3ec010cf1ec3e5f82612a (patch) | |
tree | c4dc669a46284baa45ea018532c0159134e91eae | |
parent | acab2e3eb9cd8888708dac5dc1dde3189084920a (diff) |
Changed non-standard snprintf to Cactus Util_snprintf for portability.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@216 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | src/CheckpointRecovery.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index 15c0d93..c7589be 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -25,6 +25,8 @@ #include <dirent.h> #endif +#include "util_String.h" + static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusBase_IOUtil_CheckpointRecovery_c) @@ -232,16 +234,16 @@ char *IOUtil_AssembleFilename (const cGH *GH, iteration_postfix[0] = 0; if (called_from == CP_INITIAL_DATA || called_from == CP_EVOLUTION_DATA) { - snprintf (iteration_postfix, sizeof (iteration_postfix), ".it_%d", - (int) GH->cctk_iteration); + Util_snprintf (iteration_postfix, sizeof (iteration_postfix), ".it_%d", + (int) GH->cctk_iteration); } /* If not one unchunked file give a file number */ filenumber_postfix[0] = 0; if (! file_unchunked) { - snprintf (filenumber_postfix, sizeof (filenumber_postfix), ".file_%d", - file_ioproc); + Util_snprintf (filenumber_postfix, sizeof (filenumber_postfix), ".file_%d", + file_ioproc); } if (! (dir && basename && postfix && extension)) @@ -252,8 +254,8 @@ char *IOUtil_AssembleFilename (const cGH *GH, filename = malloc (filenamelen); if (! (filename)) CCTK_VWarn (0, __LINE__, __FILE__,"IOUtil", "File name error"); - snprintf (filename, filenamelen, "%s/%s%s%s%s%s", dir, basename, postfix, - iteration_postfix, filenumber_postfix, extension); + Util_snprintf (filename, filenamelen, "%s/%s%s%s%s%s", dir, basename, postfix, + iteration_postfix, filenumber_postfix, extension); return (filename); } |