From 4f27fd634e6772a8075f9737c0d5e2f9545109fe Mon Sep 17 00:00:00 2001 From: eschnett <> Date: Thu, 22 Mar 2001 17:42:00 +0000 Subject: 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 --- CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc') 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 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include + +#include #include #include @@ -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