aboutsummaryrefslogtreecommitdiff
path: root/CarpetAttic
diff options
context:
space:
mode:
authorschnetter <>2004-02-07 15:34:00 +0000
committerschnetter <>2004-02-07 15:34:00 +0000
commitc94e08337c9c95ed338365aba0db878fa9d5d52f (patch)
treecd5470cf03b6c283d1417b5880d5ba4b1522d73f /CarpetAttic
parente21d4bb19e80e547e89f36030d2e2b72314900f6 (diff)
FlexIO string attributes seem to need space for the trailing nul character.
darcs-hash:20040207153417-07bb3-d093562a97823a3daff6d01c62b947f27d7acfe9.gz
Diffstat (limited to 'CarpetAttic')
-rw-r--r--CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
index 207fd3f49..4529c1fb8 100644
--- a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
+++ b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
@@ -15,7 +15,7 @@
#include "cctk_Parameters.h"
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.40 2004/02/07 16:21:56 schnetter Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.41 2004/02/07 16:34:17 schnetter Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOFlexIO_ioflexio_cc);
}
@@ -353,7 +353,19 @@ namespace CarpetIOFlexIO {
WriteAttribute (writer, "group_groupname", groupname);
free (groupname);
}
- WriteAttribute (writer, "group_grouptype", grouptype);
+ switch (grouptype) {
+ case CCTK_GF:
+ WriteAttribute (writer, "group_grouptype", "GF");
+ break;
+ case CCTK_ARRAY:
+ WriteAttribute (writer, "group_grouptype", "ARRAY");
+ break;
+ case CCTK_SCALAR:
+ WriteAttribute (writer, "group_grouptype", "SCALAR");
+ break;
+ default:
+ assert (0);
+ }
WriteAttribute (writer, "group_dim", CCTK_GroupDimI(group));
WriteAttribute (writer, "group_timelevel", tl);
WriteAttribute (writer, "group_numtimelevels", CCTK_NumTimeLevelsI(group));
@@ -871,7 +883,7 @@ namespace CarpetIOFlexIO {
void WriteAttribute (IObase* writer, const char* name, const char * values)
{
- WriteAttribute (writer, name, values, strlen(values));
+ WriteAttribute (writer, name, values, strlen(values) + 1);
}
void WriteAttribute (IObase* writer, const char* name,