Commit f5d76abc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added function cdiIterator_inqFiletype().

parent f7968bdd
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.1
* Version 1.9.5 released
2018-07-19 Florian Prill
* Added function cdiIterator_inqFiletype()
2018-07-10 Uwe Schulzweida
* Added global option CDI_read_cell_corners
......
......@@ -27538,7 +27538,9 @@ else
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <uuid.h>
$ac_includes_default
#include <uuid.h>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
......@@ -27694,13 +27696,15 @@ ac_link="./libtool --mode=link --tag=CC $ac_link"
CPPFLAGS="${CPPFLAGS+$CPPFLAGS }$OSSP_UUID_C_INCLUDE"
for ac_header in uuid.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "#include <uuid.h>
$ac_includes_default
"
if test "x$ac_cv_header_uuid_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UUID_H 1
_ACEOF
ac_fn_c_check_decl "$LINENO" "uuid_create" "ac_cv_have_decl_uuid_create" "$ac_includes_default
#include <uuid.h>
ac_fn_c_check_decl "$LINENO" "uuid_create" "ac_cv_have_decl_uuid_create" "#include <uuid.h>
$ac_includes_default
"
if test "x$ac_cv_have_decl_uuid_create" = xyes; then :
ac_have_decl=1
......@@ -27712,8 +27716,8 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_UUID_CREATE $ac_have_decl
_ACEOF
if test $ac_have_decl = 1; then :
ac_fn_c_check_decl "$LINENO" "UUID_MAKE_V5" "ac_cv_have_decl_UUID_MAKE_V5" "$ac_includes_default
#include <uuid.h>
ac_fn_c_check_decl "$LINENO" "UUID_MAKE_V5" "ac_cv_have_decl_UUID_MAKE_V5" "#include <uuid.h>
$ac_includes_default
"
if test "x$ac_cv_have_decl_UUID_MAKE_V5" = xyes; then :
ac_have_decl=1
......@@ -27742,8 +27746,9 @@ done
 
CPPFLAGS=$acx_save_CPPFLAGS
fi
else
have_ossp_uuid_c_bindings=no
elif have_ossp_uuid_c_bindings=no; then :
#include <uuid.h>
$ac_includes_default
fi
# check for DCE uuid_create if util-linux and OSSP variants cannot be found
if test x"$enable_dce_uuid" != xno -a x"$have_util_linux_uuid_c_bindings$have_ossp_uuid_c_bindings" = xnono; then :
......@@ -455,6 +455,7 @@ int cdiIterator_inqTileCount(CdiIterator *me, int *outTileCount, int *outTileAtt
CdiParam cdiIterator_inqParam(CdiIterator *me);
void cdiIterator_inqParamParts(CdiIterator *me, int *outDiscipline, int *outCategory, int *outNumber); //Some FORTRAN compilers produce wrong code for the cdiIterator_inqParam()-wrapper, rendering it unusable from FORTRAN. This function is the workaround.
int cdiIterator_inqDatatype(CdiIterator *me);
int cdiIterator_inqFiletype(CdiIterator *me);
int cdiIterator_inqTsteptype(CdiIterator *me);
char *cdiIterator_inqVariableName(CdiIterator *me); //The caller is responsible to Free() the returned buffer.
int cdiIterator_inqGridId(CdiIterator *me); //The returned id is only valid until the next call to cdiIteratorNextField().
......
! This file was automatically generated, don't edit!
!
! Fortran interface for CDI library version 1.9.5rc1
! Fortran interface for CDI library version 1.9.5
!
! Author:
! -------
! Uwe Schulzweida, MPI-MET, Hamburg, May 2018
! Uwe Schulzweida, MPI-MET, Hamburg, July 2018
!
INTEGER CDI_MAX_NAME
......@@ -35,6 +35,8 @@
PARAMETER (CDI_NOERR = 0)
INTEGER CDI_EEOF
PARAMETER (CDI_EEOF = -1)
INTEGER CDI_ETMOF
PARAMETER (CDI_ETMOF = -9)
INTEGER CDI_ESYSTEM
PARAMETER (CDI_ESYSTEM = -10)
INTEGER CDI_EINVAL
......
......@@ -902,6 +902,24 @@ int cdiIterator_inqDatatype(CdiIterator* me)
return me->datatype;
}
/*
@Function cdiIterator_inqFiletype
@Title Get the filetype of the current field
@Prototype int cdiIterator_inqFiletype(CdiIterator* iterator)
@Parameter
@item iterator The iterator to operate on.
@Result The filetype that is used to store this field on disk.
@Description
Simple metadata inspection function.
*/
int cdiIterator_inqFiletype(CdiIterator* me)
{
return me->filetype;
}
/*
@Function cdiIterator_inqTsteptype
@Title Get the timestep type
......
......@@ -15,7 +15,7 @@
#endif
//#include "config.h"
#define VERSION "1.9.5rc1"
#define VERSION "1.9.5"
typedef struct
{
size_t naline;
......
! >>> Warning: This is a generated file. If you modify it, you get what you deserve. <<<
!
! Generated by "../interfaces/f2003/bindGen.rb" from input file "../src/cdi.h".
! Generated by "../../../interfaces/f2003/bindGen.rb" from input file "../../../src/cdi.h".
module mo_cdi
use iso_c_binding
......@@ -33,6 +33,7 @@ module mo_cdi
integer(c_int), public, parameter :: CDI_BOTH = 3
integer(c_int), public, parameter :: CDI_NOERR = 0
integer(c_int), public, parameter :: CDI_EEOF = -1
integer(c_int), public, parameter :: CDI_ETMOF = -9
integer(c_int), public, parameter :: CDI_ESYSTEM = -10
integer(c_int), public, parameter :: CDI_EINVAL = -20
integer(c_int), public, parameter :: CDI_EISDIR = -21
......@@ -309,6 +310,7 @@ module mo_cdi
public :: cdiIterator_inqParam
public :: cdiIterator_inqParamParts
public :: cdiIterator_inqDatatype
public :: cdiIterator_inqFiletype
public :: cdiIterator_inqTsteptype
public :: cdiIterator_inqVariableName
public :: cdiIterator_inqGridId
......@@ -3661,6 +3663,20 @@ contains
f_result = lib_cdiIterator_inqDatatype(me_dummy%ptr)
end function cdiIterator_inqDatatype
function cdiIterator_inqFiletype(me_dummy) result(f_result)
integer(c_int) :: f_result
type(t_CdiIterator), intent(in) :: me_dummy
interface
function lib_cdiIterator_inqFiletype(me_dummy) bind(c, name =&
& 'cdiIterator_inqFiletype') result(c_result)
import c_int, c_ptr
integer(c_int) :: c_result
type(c_ptr), value :: me_dummy
end function lib_cdiIterator_inqFiletype
end interface
f_result = lib_cdiIterator_inqFiletype(me_dummy%ptr)
end function cdiIterator_inqFiletype
function cdiIterator_inqTsteptype(me_dummy) result(f_result)
integer(c_int) :: f_result
type(t_CdiIterator), intent(in) :: me_dummy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment