aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-03-26 20:53:18 +0000
committertradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-03-26 20:53:18 +0000
commitb1227adab84e3e75b582815a81a329efbfc11f7e (patch)
treedfc3beea748b2b90397bf7f3a9e085d9d84cea42
parente56b7a5a165aa6b47c221517a62e1562eae12cb0 (diff)
Write file information to output files only if IO::out_fileinfo is set.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@22 7842ec3a-9562-4be5-9c5b-06ba18f2b668
-rw-r--r--src/DumpUtils.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c
index e5803c8..1a97f00 100644
--- a/src/DumpUtils.c
+++ b/src/DumpUtils.c
@@ -435,17 +435,25 @@ void IOHDF5Util_DumpGHExtensions (cGH *GH,
/* add the parameter filename and the creation date
as file identification attributes */
- buffer[0] = 0;
- CCTK_ParameterFilename (sizeof (buffer), buffer);
- WRITE_ATTRIBUTE ("parameter file", buffer, group,
- myGH->scalar_dataspace, 0, myGH->IOHDF5_STRING);
- buffer[0] = 0;
- Util_CurrentDate (sizeof (buffer), buffer);
- value = strlen (buffer) + 1;
- buffer[value-1] = ' ';
- Util_CurrentTime (sizeof (buffer) - value, buffer + value);
- WRITE_ATTRIBUTE ("creation date", buffer, group,
- myGH->scalar_dataspace, 0, myGH->IOHDF5_STRING);
+ if (CCTK_Equals (out_fileinfo, "parameter filename") ||
+ CCTK_Equals (out_fileinfo, "all"))
+ {
+ buffer[0] = 0;
+ CCTK_ParameterFilename (sizeof (buffer), buffer);
+ WRITE_ATTRIBUTE ("parameter file", buffer, group,
+ myGH->scalar_dataspace, 0, myGH->IOHDF5_STRING);
+ }
+ if (CCTK_Equals (out_fileinfo, "creation date") ||
+ CCTK_Equals (out_fileinfo, "all"))
+ {
+ buffer[0] = 0;
+ Util_CurrentDate (sizeof (buffer), buffer);
+ value = strlen (buffer) + 1;
+ buffer[value-1] = ' ';
+ Util_CurrentTime (sizeof (buffer) - value, buffer + value);
+ WRITE_ATTRIBUTE ("creation date", buffer, group,
+ myGH->scalar_dataspace, 0, myGH->IOHDF5_STRING);
+ }
IOHDF5_ERROR (H5Gclose (group));
}