From 8b260490a374c014cc038c0166a183eb2170c85c Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 16 Jul 1999 16:26:18 +0000 Subject: Filled in CactusDefaultOutputVarAsByMethod(). Added fortran binding for CCTK_OutputVarAsByMethod(). ), git-svn-id: http://svn.cactuscode.org/flesh/trunk@719 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/IO/IOMethods.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'src/IO') diff --git a/src/IO/IOMethods.c b/src/IO/IOMethods.c index 9f2b2770..e8ec3fcf 100644 --- a/src/IO/IOMethods.c +++ b/src/IO/IOMethods.c @@ -16,6 +16,7 @@ #include "IOMethods.h" #include "Groups.h" #include "StoreHandledData.h" +#include "FortranString.h" #include "IO.h" static char *rcsid = "$Header$"; @@ -467,6 +468,9 @@ int CactusDefaultOutputGH(cGH *GH) @returntype int @returndesc + -1 = No such IO method found + 0 = success + @endreturndesc @endreturndesc @version $Header$ @@ -474,14 +478,34 @@ int CactusDefaultOutputGH(cGH *GH) @@*/ int CactusDefaultOutputVarAsByMethod(cGH *GH, - const char *var, - const char *methodname, - const char *alias) + const char *var, + const char *methodname, + const char *alias) { - printf("In default method CactusDefaultOutputVarAsByMethod\n"); + struct IOMethod *method = NULL; + + CCTK_GetHandle (IOMethods, methodname, (void **) &method); + if (! method) + { + return -1; + } + + method->OutputVarAs(GH, var, alias); + return 0; } +void FMODIFIER FORTRAN_NAME (CCTK_OutputVarAsByMethod) + (cGH *GH, int *ierror, THREE_FORTSTRINGS_ARGS) +{ + THREE_FORTSTRINGS_CREATE(var, methodname, alias); + + *ierror = CactusDefaultOutputVarAsByMethod (GH, var, methodname, alias); + + free (var); + free (methodname); + free (alias); +} /************************************************************************ -- cgit v1.2.3