summaryrefslogtreecommitdiff
path: root/src/IO
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2009-12-05 04:00:06 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2009-12-05 04:00:06 +0000
commit44ab1cbc5d0982f4a16ffd664d67a4a7df4ff218 (patch)
tree7e8b652f8ce5cfc73f1a7d052b9bb7584fe24948 /src/IO
parent801506ebbf50a6e2a4455ef4908baa314347240f (diff)
Rename routine CCTK_IOMethod to CCTK_IOMethodName, since it returns
the name of the I/O method, not an IOMethod structure. Add a new routine CCTK_IOMethod which returns a pointer to the IOMethod structure describing the I/O method. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4588 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/IO')
-rw-r--r--src/IO/IOMethods.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/IO/IOMethods.c b/src/IO/IOMethods.c
index 6f8d17e3..f18c84da 100644
--- a/src/IO/IOMethods.c
+++ b/src/IO/IOMethods.c
@@ -547,7 +547,7 @@ const char *CCTK_IOMethodImplementation (int handle)
/*@@
- @routine CCTK_IOMethod
+ @routine CCTK_IOMethodName
@date Thu Dec 27 2001
@author Gabrielle Allen
@desc
@@ -561,10 +561,10 @@ const char *CCTK_IOMethodImplementation (int handle)
@returntype const char *
@returndesc
- IO Method
+ Name of this I/O method
@endreturndesc
@@*/
-const char *CCTK_IOMethod (int handle)
+const char *CCTK_IOMethodName (int handle)
{
struct IOMethod *method;
@@ -574,6 +574,34 @@ const char *CCTK_IOMethod (int handle)
}
+ /*@@
+ @routine CCTK_IOMethod
+ @date 2008-09-05
+ @author Erik Schnetter
+ @desc
+ Provide the IO Method
+ @enddesc
+ @var handle
+ @vdesc handle of I/O method
+ @vtype int
+ @vio in
+ @endvar
+
+ @returntype const struct IOMethod *
+ @returndesc
+ IO method descriptor
+ @endreturndesc
+@@*/
+const struct IOMethod *CCTK_IOMethod (int handle)
+{
+ const struct IOMethod *method;
+
+ method = (const struct IOMethod *) Util_GetHandledData (IOMethods, handle);
+
+ return method;
+}
+
+
/********************************************************************
********************* Local Routines *************************
********************************************************************/