aboutsummaryrefslogtreecommitdiff
path: root/CarpetAttic
diff options
context:
space:
mode:
authoreschnett <>2001-03-22 17:42:00 +0000
committereschnett <>2001-03-22 17:42:00 +0000
commit68f39ddf2186d84194d7b5f8446b4b2f003a6c11 (patch)
tree5a6ec27e40ef1d942f12ee7ba59fa1f3f3a00913 /CarpetAttic
parenta34f1f5e75afa08c73d09d2d8f614020fac8e951 (diff)
Brought in latest differences from the SGI version. This is work
Brought in latest differences from the SGI version. This is work towards a code that compiles on both architectures. darcs-hash:20010322174200-f6438-23ab5f26cf84d2666312791c6bdb5a0fc1d0390a.gz
Diffstat (limited to 'CarpetAttic')
-rw-r--r--CarpetAttic/CarpetIOFlexIO/schedule.ccl2
-rw-r--r--CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc23
2 files changed, 14 insertions, 11 deletions
diff --git a/CarpetAttic/CarpetIOFlexIO/schedule.ccl b/CarpetAttic/CarpetIOFlexIO/schedule.ccl
index ad6119623..259abe7a0 100644
--- a/CarpetAttic/CarpetIOFlexIO/schedule.ccl
+++ b/CarpetAttic/CarpetIOFlexIO/schedule.ccl
@@ -1,5 +1,5 @@
# Schedule definitions for thorn CarpetIOFlexIO
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/schedule.ccl,v 1.3 2001/03/18 05:20:24 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/schedule.ccl,v 1.4 2001/03/22 18:42:05 eschnett Exp $
schedule CarpetIOFlexIOStartup at STARTUP after IOUtil_Startup
{
diff --git a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
index 2628e236e..e1a6282ca 100644
--- a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
+++ b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc
@@ -1,11 +1,13 @@
-#include <cassert>
-#include <climits>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <fstream>
+#include <alloca.h>
+#include <assert.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+
+#include <fstream>
#include <vector>
#include <AMRwriter.hh>
@@ -31,12 +33,13 @@
#include "ioflexio.hh"
-static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.6 2001/03/19 21:30:09 eschnett Exp $";
+static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.7 2001/03/22 18:42:05 eschnett Exp $";
namespace CarpetIOFlexIO {
+ using namespace std;
using namespace Carpet;
@@ -165,7 +168,7 @@ namespace CarpetIOFlexIO {
}
extension = GetStringParameter ("out3D_extension", extension);
- char filename[strlen(myoutdir)+strlen(alias)+strlen(extension)+100];
+ char* const filename = (char*)alloca(strlen(myoutdir)+strlen(alias)+strlen(extension)+100);
sprintf (filename, "%s/%s%s", myoutdir, alias, extension);
IObase* writer = 0;
@@ -446,7 +449,7 @@ namespace CarpetIOFlexIO {
}
extension = GetStringParameter ("in3D_extension", extension);
- char filename[strlen(myindir)+strlen(alias)+strlen(extension)+100];
+ char* const filename = (char*)alloca(strlen(myindir)+strlen(alias)+strlen(extension)+100);
sprintf (filename, "%s/%s.%s", myindir, alias, extension);
IObase* reader = 0;
@@ -652,7 +655,7 @@ namespace CarpetIOFlexIO {
const int numvars = CCTK_NumVars();
assert (vindex>=0 && vindex<numvars);
- bool flags[numvars];
+ bool* const flags = (bool*)alloca(numvars * sizeof(bool));
for (int i=0; i<numvars; ++i) {
flags[i] = false;