diff options
Diffstat (limited to 'src/Write.c')
-rw-r--r-- | src/Write.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Write.c b/src/Write.c index 1faa4a0..388a37f 100644 --- a/src/Write.c +++ b/src/Write.c @@ -21,7 +21,8 @@ #include "cctk.h" #include "cctk_Parameters.h" -#include "CactusBase/IOUtil/src/ioGH.h" +#include "CactusBase/IOUtil/src/ioutil_AdvertisedFiles.h" +#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h" #include "iobasicGH.h" @@ -32,7 +33,6 @@ void IOBasic_Write (cGH *GH, int index, const char *alias) FILE *file; void *data; char *fname; - ioGH *ioUtilGH; iobasicGH *myGH; char *format_str_real, *format_str_int; struct stat fileinfo; @@ -69,8 +69,7 @@ void IOBasic_Write (cGH *GH, int index, const char *alias) format_str_int = "%e %d\n"; } - /* get the GH extensions for IOUtil and IOBasic */ - ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")]; + /* get the GH extensions for IOBasic */ myGH = (iobasicGH *) GH->extensions [CCTK_GHExtensionHandle ("IOBasic")]; /* build the output filename */ @@ -82,7 +81,7 @@ void IOBasic_Write (cGH *GH, int index, const char *alias) { /* if restart from recovery, all existing files are opened in append mode */ - if (ioUtilGH->recovered) + if (IOUtil_RestartFromRecovery (GH)) openmode = stat (fname, &fileinfo) == 0 ? "a" : "w"; else openmode = "w"; @@ -105,7 +104,7 @@ void IOBasic_Write (cGH *GH, int index, const char *alias) if (*openmode == 'w') { char title_start_char; - IOUtil_AdvertisedFileDesc_t advertised_file; + ioAdvertisedFileDesc advertised_file; if (CCTK_Equals (outScalar_style, "gnuplot")) { |