From 44ab1cbc5d0982f4a16ffd664d67a4a7df4ff218 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sat, 5 Dec 2009 04:00:06 +0000 Subject: 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 --- src/IO/IOMethods.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'src/IO') 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 ************************* ********************************************************************/ -- cgit v1.2.3