aboutsummaryrefslogtreecommitdiff
path: root/src/Write.c
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2001-12-28 21:40:11 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2001-12-28 21:40:11 +0000
commit84e2701f56f2edb18e5f231ab82d2ef6b7026abe (patch)
treeb1dbe7b1bcafd900c89aa7023a94b78f1384e76b /src/Write.c
parent7c000ad32564b357b1dbe66da09e5eb663f904ab (diff)
Fixed return codes of I/O methods.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@76 0888f3d4-9f52-45d2-93bc-d00801ff5e46
Diffstat (limited to 'src/Write.c')
-rw-r--r--src/Write.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Write.c b/src/Write.c
index 7a2ee35..56b4bc5 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -49,10 +49,14 @@ CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Write_c)
@vtype const char *
@vio unused
@endvar
+
+ @returntype int
+ @returndesc
+ 0 for success, or<BR>
+ -1 if variable has no storage assigned
+ @endreturndesc
@@*/
-void IOStreamedHDF5_Write (const cGH *GH,
- int vindex,
- const char *alias)
+int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias)
{
DECLARE_CCTK_PARAMETERS
int old_ioproc;
@@ -75,7 +79,7 @@ void IOStreamedHDF5_Write (const cGH *GH,
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"No IOStreamedHDF5 output for '%s' (no storage)", fullname);
free (fullname);
- return;
+ return (-1);
}
/* Get the handles for IO and IOStreamedHDF5 extensions */
@@ -140,4 +144,6 @@ void IOStreamedHDF5_Write (const cGH *GH,
ioUtilGH->ioproc = old_ioproc;
ioUtilGH->nioprocs = old_nioprocs;
ioUtilGH->ioproc_every = old_ioproc_every;
+
+ return (0);
}