aboutsummaryrefslogtreecommitdiff
path: root/src/WriteGF.c
diff options
context:
space:
mode:
authortradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2001-03-26 20:48:39 +0000
committertradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2001-03-26 20:48:39 +0000
commit55e80b4dc1af49f96e59f085f9c00d134d708a52 (patch)
treeee840777bdd6f8a02db9fba844ea41db8dc6ad38 /src/WriteGF.c
parent0a02d46650311ecc08f71dc4751cb41ad9370788 (diff)
Write file information to output files only if IO::out_fileinfo is set.
For testsuite parameter files such information should not be output. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@86 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/WriteGF.c')
-rw-r--r--src/WriteGF.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/WriteGF.c b/src/WriteGF.c
index a0aec07..d5c7d18 100644
--- a/src/WriteGF.c
+++ b/src/WriteGF.c
@@ -241,15 +241,29 @@ void IOBasic_WriteGF (cGH *GH,
IOUtil_AdvertiseFile (GH, filename, &advertised_file);
- CCTK_ParameterFilename (sizeof (buffer), buffer);
- fprintf (file, "%cParameter file %s\n", comment_char, buffer);
- Util_CurrentDate (sizeof (buffer), buffer);
- fprintf (file, "%cCreated %s ", comment_char, buffer);
- Util_CurrentTime (sizeof (buffer), buffer);
- fprintf (file, "%s\n", buffer);
- fprintf (file, "%cx-label time\n", comment_char);
- fprintf (file, "%cy-label %s\n",
- comment_char, advertised_file.varname);
+ if (CCTK_Equals (out_fileinfo, "parameter filename") ||
+ CCTK_Equals (out_fileinfo, "all"))
+ {
+ buffer[0] = 0;
+ CCTK_ParameterFilename (sizeof (buffer), buffer);
+ fprintf (file, "%cParameter file %s\n", comment_char, buffer);
+ }
+ if (CCTK_Equals (out_fileinfo, "creation date") ||
+ CCTK_Equals (out_fileinfo, "all"))
+ {
+ buffer[0] = 0;
+ Util_CurrentDate (sizeof (buffer), buffer);
+ fprintf (file, "%cCreated %s ", comment_char, buffer);
+ Util_CurrentTime (sizeof (buffer), buffer);
+ fprintf (file, "%s\n", buffer);
+ }
+ if (CCTK_Equals (out_fileinfo, "axis labels") ||
+ CCTK_Equals (out_fileinfo, "all"))
+ {
+ fprintf (file, "%cx-label time\n", comment_char);
+ fprintf (file, "%cy-label %s\n",
+ comment_char, advertised_file.varname);
+ }
fprintf (file, "%c%s %s v time\n", comment_char, alias,
reduction_op);