Commit 34c7f114 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix passing of (un)signed char integers via F2003 interface.

* Also cleans up minor issues.
parent 839176c1
...@@ -209,7 +209,7 @@ def printParams(fParams, indent) ...@@ -209,7 +209,7 @@ def printParams(fParams, indent)
value = 'value' value = 'value'
end end
typeinfo = [value,intent,dimension].select {|s| ! s.nil?}.join(',') typeinfo = [value,intent,dimension].select {|s| ! s.nil?}.join(', ')
out << " #{indent}#{ftype}" out << " #{indent}#{ftype}"
out << (paramType == 'c_ptr' ? '' : "(kind=#{paramType})") out << (paramType == 'c_ptr' ? '' : "(kind=#{paramType})")
out << ", #{typeinfo} :: #{param}\n" out << ", #{typeinfo} :: #{param}\n"
...@@ -219,15 +219,15 @@ end ...@@ -219,15 +219,15 @@ end
# creates the actual binding within the module for the given c function # creates the actual binding within the module for the given c function
# unsupported types of function a ignored, see RESTRICTIONS (top) for details # unsupported types of function a ignored, see RESTRICTIONS (top) for details
def genInterface(cFuncname, returnType, returnPointer, paramList) def genInterface(cFuncname, returnType, returnPointer, paramList, debug)
# do not create interfaces for unsuppoerted function # do not create interfaces for unsupported functions
if isBadFunction( returnType, returnPointer, paramList) if isBadFunction( returnType, returnPointer, paramList)
warn "parameterlist of '#{cFuncname}' is not supported -> function ignored." warn "parameterlist of '#{cFuncname}' is not supported -> function ignored."
return ['',''] return ['','']
end end
return ['', ''] if (cFuncname[0,1] == '_') return ['', ''] if (cFuncname[0,1] == '_')
# the void argument type can be left out: if 'void' occures in the # the void argument type can be left out: if 'void' occurs in the
# parameterlist (which is only the case, if it is the only parameter # parameterlist (which is only the case, if it is the only parameter
# information), it is simply removed and a empty paramter list is left. # information), it is simply removed and a empty paramter list is left.
paramList = [[],[]] if paramList.flatten == [ 'void' ] or paramList.flatten.empty? paramList = [[],[]] if paramList.flatten == [ 'void' ] or paramList.flatten.empty?
...@@ -246,6 +246,15 @@ def genInterface(cFuncname, returnType, returnPointer, paramList) ...@@ -246,6 +246,15 @@ def genInterface(cFuncname, returnType, returnPointer, paramList)
# collect information for setting the correct fortran type for each parameter # collect information for setting the correct fortran type for each parameter
paramsWithTypes = paramList.collect {|paramInfo| paramsWithTypes = paramList.collect {|paramInfo|
ctype, param = paramInfo[-2,2] ctype, param = paramInfo[-2,2]
integral_type = /^(:?char|int|long|short)$/.match(ctype);
if (integral_type)
while (/^(:?un)?signed/.match(paramInfo[-3]))
ctype = paramInfo[-3] << ' ' << ctype
paramInfo.delete_at(-3)
paramInfo[-2] = ctype
pp [paramInfo] if debug
end
end
ptr_match = /^\*(\w+)$/.match(param) ptr_match = /^\*(\w+)$/.match(param)
if (/^(:?const)? *void$/.match(ctype) and ptr_match) if (/^(:?const)? *void$/.match(ctype) and ptr_match)
param = ptr_match[1] param = ptr_match[1]
...@@ -465,7 +474,7 @@ end.parse! ...@@ -465,7 +474,7 @@ end.parse!
funcdecls.each {| funcName, returnType, returnPointer, paramList| funcdecls.each {| funcName, returnType, returnPointer, paramList|
pp [funcName, returnType, returnPointer, paramList] if debug pp [funcName, returnType, returnPointer, paramList] if debug
interface, makepublic, isWrapper = genInterface(funcName,returnType, returnPointer, paramList) interface, makepublic, isWrapper = genInterface(funcName,returnType, returnPointer, paramList, debug)
if isWrapper if isWrapper
subroutines << interface subroutines << interface
else else
......
...@@ -452,7 +452,7 @@ module mo_cdi ...@@ -452,7 +452,7 @@ module mo_cdi
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
real(kind=c_double), intent(in),dimension(*) :: data_vec real(kind=c_double), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteVar end subroutine streamWriteVar
end interface end interface
...@@ -461,7 +461,7 @@ module mo_cdi ...@@ -461,7 +461,7 @@ module mo_cdi
import :: c_int,c_float import :: c_int,c_float
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
real(kind=c_float), intent(in),dimension(*) :: data_vec real(kind=c_float), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteVarF end subroutine streamWriteVarF
end interface end interface
...@@ -470,7 +470,7 @@ module mo_cdi ...@@ -470,7 +470,7 @@ module mo_cdi
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
real(kind=c_double), intent(out),dimension(*) :: data_vec real(kind=c_double), intent(out), dimension(*) :: data_vec
integer(kind=c_int), intent(out) :: nmiss integer(kind=c_int), intent(out) :: nmiss
end subroutine streamReadVar end subroutine streamReadVar
end interface end interface
...@@ -479,7 +479,7 @@ module mo_cdi ...@@ -479,7 +479,7 @@ module mo_cdi
import :: c_int,c_float import :: c_int,c_float
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
real(kind=c_float), intent(out),dimension(*) :: data_vec real(kind=c_float), intent(out), dimension(*) :: data_vec
integer(kind=c_int), intent(out) :: nmiss integer(kind=c_int), intent(out) :: nmiss
end subroutine streamReadVarF end subroutine streamReadVarF
end interface end interface
...@@ -489,7 +489,7 @@ module mo_cdi ...@@ -489,7 +489,7 @@ module mo_cdi
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
integer(kind=c_int), value :: levelID integer(kind=c_int), value :: levelID
real(kind=c_double), intent(in),dimension(*) :: data_vec real(kind=c_double), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteVarSlice end subroutine streamWriteVarSlice
end interface end interface
...@@ -499,7 +499,7 @@ module mo_cdi ...@@ -499,7 +499,7 @@ module mo_cdi
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
integer(kind=c_int), value :: levelID integer(kind=c_int), value :: levelID
real(kind=c_float), intent(in),dimension(*) :: data_vec real(kind=c_float), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteVarSliceF end subroutine streamWriteVarSliceF
end interface end interface
...@@ -509,7 +509,7 @@ module mo_cdi ...@@ -509,7 +509,7 @@ module mo_cdi
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
integer(kind=c_int), value :: levelID integer(kind=c_int), value :: levelID
real(kind=c_double), intent(out),dimension(*) :: data_vec real(kind=c_double), intent(out), dimension(*) :: data_vec
integer(kind=c_int), intent(out) :: nmiss integer(kind=c_int), intent(out) :: nmiss
end subroutine streamReadVarSlice end subroutine streamReadVarSlice
end interface end interface
...@@ -519,7 +519,7 @@ module mo_cdi ...@@ -519,7 +519,7 @@ module mo_cdi
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
integer(kind=c_int), value :: levelID integer(kind=c_int), value :: levelID
real(kind=c_float), intent(out),dimension(*) :: data_vec real(kind=c_float), intent(out), dimension(*) :: data_vec
integer(kind=c_int), intent(out) :: nmiss integer(kind=c_int), intent(out) :: nmiss
end subroutine streamReadVarSliceF end subroutine streamReadVarSliceF
end interface end interface
...@@ -543,7 +543,7 @@ module mo_cdi ...@@ -543,7 +543,7 @@ module mo_cdi
subroutine streamWriteRecord(streamID,data_vec,nmiss) bind(c,name='streamWriteRecord') subroutine streamWriteRecord(streamID,data_vec,nmiss) bind(c,name='streamWriteRecord')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
real(kind=c_double), intent(in),dimension(*) :: data_vec real(kind=c_double), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteRecord end subroutine streamWriteRecord
end interface end interface
...@@ -551,7 +551,7 @@ module mo_cdi ...@@ -551,7 +551,7 @@ module mo_cdi
subroutine streamWriteRecordF(streamID,data_vec,nmiss) bind(c,name='streamWriteRecordF') subroutine streamWriteRecordF(streamID,data_vec,nmiss) bind(c,name='streamWriteRecordF')
import :: c_int,c_float import :: c_int,c_float
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
real(kind=c_float), intent(in),dimension(*) :: data_vec real(kind=c_float), intent(in), dimension(*) :: data_vec
integer(kind=c_int), value :: nmiss integer(kind=c_int), value :: nmiss
end subroutine streamWriteRecordF end subroutine streamWriteRecordF
end interface end interface
...@@ -559,7 +559,7 @@ module mo_cdi ...@@ -559,7 +559,7 @@ module mo_cdi
subroutine streamReadRecord(streamID,data_vec,nmiss) bind(c,name='streamReadRecord') subroutine streamReadRecord(streamID,data_vec,nmiss) bind(c,name='streamReadRecord')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: streamID integer(kind=c_int), value :: streamID
real(kind=c_double), intent(out),dimension(*) :: data_vec real(kind=c_double), intent(out), dimension(*) :: data_vec
integer(kind=c_int), intent(out) :: nmiss integer(kind=c_int), intent(out) :: nmiss
end subroutine streamReadRecord end subroutine streamReadRecord
end interface end interface
...@@ -1435,7 +1435,7 @@ module mo_cdi ...@@ -1435,7 +1435,7 @@ module mo_cdi
character(kind=c_char), dimension(*) :: name character(kind=c_char), dimension(*) :: name
integer(kind=c_int), value :: type integer(kind=c_int), value :: type
integer(kind=c_int), value :: len integer(kind=c_int), value :: len
integer(kind=c_int), intent(in),dimension(*) :: ip_vec integer(kind=c_int), intent(in), dimension(*) :: ip_vec
integer(kind=c_int) :: vlistDefAttInt integer(kind=c_int) :: vlistDefAttInt
end function vlistDefAttInt end function vlistDefAttInt
end interface end interface
...@@ -1447,7 +1447,7 @@ module mo_cdi ...@@ -1447,7 +1447,7 @@ module mo_cdi
character(kind=c_char), dimension(*) :: name character(kind=c_char), dimension(*) :: name
integer(kind=c_int), value :: type integer(kind=c_int), value :: type
integer(kind=c_int), value :: len integer(kind=c_int), value :: len
real(kind=c_double), intent(in),dimension(*) :: dp_vec real(kind=c_double), intent(in), dimension(*) :: dp_vec
integer(kind=c_int) :: vlistDefAttFlt integer(kind=c_int) :: vlistDefAttFlt
end function vlistDefAttFlt end function vlistDefAttFlt
end interface end interface
...@@ -1469,7 +1469,7 @@ module mo_cdi ...@@ -1469,7 +1469,7 @@ module mo_cdi
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
character(kind=c_char), dimension(*) :: name character(kind=c_char), dimension(*) :: name
integer(kind=c_int), value :: mlen integer(kind=c_int), value :: mlen
integer(kind=c_int), intent(out),dimension(*) :: ip_vec integer(kind=c_int), intent(out), dimension(*) :: ip_vec
integer(kind=c_int) :: vlistInqAttInt integer(kind=c_int) :: vlistInqAttInt
end function vlistInqAttInt end function vlistInqAttInt
end interface end interface
...@@ -1480,7 +1480,7 @@ module mo_cdi ...@@ -1480,7 +1480,7 @@ module mo_cdi
integer(kind=c_int), value :: varID integer(kind=c_int), value :: varID
character(kind=c_char), dimension(*) :: name character(kind=c_char), dimension(*) :: name
integer(kind=c_int), value :: mlen integer(kind=c_int), value :: mlen
real(kind=c_double), intent(out),dimension(*) :: dp_vec real(kind=c_double), intent(out), dimension(*) :: dp_vec
integer(kind=c_int) :: vlistInqAttFlt integer(kind=c_int) :: vlistInqAttFlt
end function vlistInqAttFlt end function vlistInqAttFlt
end interface end interface
...@@ -1512,14 +1512,14 @@ module mo_cdi ...@@ -1512,14 +1512,14 @@ module mo_cdi
subroutine gridDefMaskGME(gridID,mask_vec) bind(c,name='gridDefMaskGME') subroutine gridDefMaskGME(gridID,mask_vec) bind(c,name='gridDefMaskGME')
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), intent(in),dimension(*) :: mask_vec integer(kind=c_int), intent(in), dimension(*) :: mask_vec
end subroutine gridDefMaskGME end subroutine gridDefMaskGME
end interface end interface
interface interface
function gridInqMaskGME(gridID,mask_vec) bind(c,name='gridInqMaskGME') function gridInqMaskGME(gridID,mask_vec) bind(c,name='gridInqMaskGME')
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), intent(out),dimension(*) :: mask_vec integer(kind=c_int), intent(out), dimension(*) :: mask_vec
integer(kind=c_int) :: gridInqMaskGME integer(kind=c_int) :: gridInqMaskGME
end function gridInqMaskGME end function gridInqMaskGME
end interface end interface
...@@ -1527,14 +1527,14 @@ module mo_cdi ...@@ -1527,14 +1527,14 @@ module mo_cdi
subroutine gridDefMask(gridID,mask_vec) bind(c,name='gridDefMask') subroutine gridDefMask(gridID,mask_vec) bind(c,name='gridDefMask')
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), intent(in),dimension(*) :: mask_vec integer(kind=c_int), intent(in), dimension(*) :: mask_vec
end subroutine gridDefMask end subroutine gridDefMask
end interface end interface
interface interface
function gridInqMask(gridID,mask_vec) bind(c,name='gridInqMask') function gridInqMask(gridID,mask_vec) bind(c,name='gridInqMask')
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), intent(out),dimension(*) :: mask_vec integer(kind=c_int), intent(out), dimension(*) :: mask_vec
integer(kind=c_int) :: gridInqMask integer(kind=c_int) :: gridInqMask
end function gridInqMask end function gridInqMask
end interface end interface
...@@ -1626,14 +1626,14 @@ module mo_cdi ...@@ -1626,14 +1626,14 @@ module mo_cdi
subroutine gridDefXvals(gridID,xvals_vec) bind(c,name='gridDefXvals') subroutine gridDefXvals(gridID,xvals_vec) bind(c,name='gridDefXvals')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(in),dimension(*) :: xvals_vec real(kind=c_double), intent(in), dimension(*) :: xvals_vec
end subroutine gridDefXvals end subroutine gridDefXvals
end interface end interface
interface interface
function gridInqXvals(gridID,xvals_vec) bind(c,name='gridInqXvals') function gridInqXvals(gridID,xvals_vec) bind(c,name='gridInqXvals')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(out),dimension(*) :: xvals_vec real(kind=c_double), intent(out), dimension(*) :: xvals_vec
integer(kind=c_int) :: gridInqXvals integer(kind=c_int) :: gridInqXvals
end function gridInqXvals end function gridInqXvals
end interface end interface
...@@ -1641,14 +1641,14 @@ module mo_cdi ...@@ -1641,14 +1641,14 @@ module mo_cdi
subroutine gridDefYvals(gridID,yvals_vec) bind(c,name='gridDefYvals') subroutine gridDefYvals(gridID,yvals_vec) bind(c,name='gridDefYvals')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(in),dimension(*) :: yvals_vec real(kind=c_double), intent(in), dimension(*) :: yvals_vec
end subroutine gridDefYvals end subroutine gridDefYvals
end interface end interface
interface interface
function gridInqYvals(gridID,yvals_vec) bind(c,name='gridInqYvals') function gridInqYvals(gridID,yvals_vec) bind(c,name='gridInqYvals')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(out),dimension(*) :: yvals_vec real(kind=c_double), intent(out), dimension(*) :: yvals_vec
integer(kind=c_int) :: gridInqYvals integer(kind=c_int) :: gridInqYvals
end function gridInqYvals end function gridInqYvals
end interface end interface
...@@ -1965,16 +1965,16 @@ module mo_cdi ...@@ -1965,16 +1965,16 @@ module mo_cdi
end interface end interface
interface interface
subroutine gridDefUUID(gridID,uuid) bind(c,name='gridDefUUID') subroutine gridDefUUID(gridID,uuid) bind(c,name='gridDefUUID')
import :: c_int,c_char import :: c_int,c_signed_char
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
character(kind=c_char), dimension(16) :: uuid integer(kind=c_signed_char), intent(in), dimension(16) :: uuid
end subroutine gridDefUUID end subroutine gridDefUUID
end interface end interface
interface interface
subroutine gridInqUUID(gridID,uuid) bind(c,name='gridInqUUID') subroutine gridInqUUID(gridID,uuid) bind(c,name='gridInqUUID')
import :: c_int,c_char import :: c_int,c_signed_char
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
character(kind=c_char), dimension(16) :: uuid integer(kind=c_signed_char), intent(out), dimension(16) :: uuid
end subroutine gridInqUUID end subroutine gridInqUUID
end interface end interface
interface interface
...@@ -2051,14 +2051,14 @@ module mo_cdi ...@@ -2051,14 +2051,14 @@ module mo_cdi
subroutine gridDefArea(gridID,area_vec) bind(c,name='gridDefArea') subroutine gridDefArea(gridID,area_vec) bind(c,name='gridDefArea')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(in),dimension(*) :: area_vec real(kind=c_double), intent(in), dimension(*) :: area_vec
end subroutine gridDefArea end subroutine gridDefArea
end interface end interface
interface interface
subroutine gridInqArea(gridID,area_vec) bind(c,name='gridInqArea') subroutine gridInqArea(gridID,area_vec) bind(c,name='gridInqArea')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(out),dimension(*) :: area_vec real(kind=c_double), intent(out), dimension(*) :: area_vec
end subroutine gridInqArea end subroutine gridInqArea
end interface end interface
interface interface
...@@ -2086,14 +2086,14 @@ module mo_cdi ...@@ -2086,14 +2086,14 @@ module mo_cdi
subroutine gridDefXbounds(gridID,xbounds_vec) bind(c,name='gridDefXbounds') subroutine gridDefXbounds(gridID,xbounds_vec) bind(c,name='gridDefXbounds')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(in),dimension(*) :: xbounds_vec real(kind=c_double), intent(in), dimension(*) :: xbounds_vec
end subroutine gridDefXbounds end subroutine gridDefXbounds
end interface end interface
interface interface
function gridInqXbounds(gridID,xbounds_vec) bind(c,name='gridInqXbounds') function gridInqXbounds(gridID,xbounds_vec) bind(c,name='gridInqXbounds')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(out),dimension(*) :: xbounds_vec real(kind=c_double), intent(out), dimension(*) :: xbounds_vec
integer(kind=c_int) :: gridInqXbounds integer(kind=c_int) :: gridInqXbounds
end function gridInqXbounds end function gridInqXbounds
end interface end interface
...@@ -2101,14 +2101,14 @@ module mo_cdi ...@@ -2101,14 +2101,14 @@ module mo_cdi
subroutine gridDefYbounds(gridID,ybounds_vec) bind(c,name='gridDefYbounds') subroutine gridDefYbounds(gridID,ybounds_vec) bind(c,name='gridDefYbounds')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(in),dimension(*) :: ybounds_vec real(kind=c_double), intent(in), dimension(*) :: ybounds_vec
end subroutine gridDefYbounds end subroutine gridDefYbounds
end interface end interface
interface interface
function gridInqYbounds(gridID,ybounds_vec) bind(c,name='gridInqYbounds') function gridInqYbounds(gridID,ybounds_vec) bind(c,name='gridInqYbounds')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
real(kind=c_double), intent(out),dimension(*) :: ybounds_vec real(kind=c_double), intent(out), dimension(*) :: ybounds_vec
integer(kind=c_int) :: gridInqYbounds integer(kind=c_int) :: gridInqYbounds
end function gridInqYbounds end function gridInqYbounds
end interface end interface
...@@ -2117,14 +2117,14 @@ module mo_cdi ...@@ -2117,14 +2117,14 @@ module mo_cdi
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), value :: nrowlon integer(kind=c_int), value :: nrowlon
integer(kind=c_int), intent(in),dimension(*) :: rowlon_vec integer(kind=c_int), intent(in), dimension(*) :: rowlon_vec
end subroutine gridDefRowlon end subroutine gridDefRowlon
end interface end interface
interface interface
subroutine gridInqRowlon(gridID,rowlon_vec) bind(c,name='gridInqRowlon') subroutine gridInqRowlon(gridID,rowlon_vec) bind(c,name='gridInqRowlon')
import :: c_int import :: c_int
integer(kind=c_int), value :: gridID integer(kind=c_int), value :: gridID
integer(kind=c_int), intent(out),dimension(*) :: rowlon_vec integer(kind=c_int), intent(out), dimension(*) :: rowlon_vec
end subroutine gridInqRowlon end subroutine gridInqRowlon
end interface end interface
interface interface
...@@ -2207,14 +2207,14 @@ module mo_cdi ...@@ -2207,14 +2207,14 @@ module mo_cdi
subroutine zaxisDefLevels(zaxisID,levels_vec) bind(c,name='zaxisDefLevels') subroutine zaxisDefLevels(zaxisID,levels_vec) bind(c,name='zaxisDefLevels')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: zaxisID integer(kind=c_int), value :: zaxisID
real(kind=c_double), intent(in),dimension(*) :: levels_vec real(kind=c_double), intent(in), dimension(*) :: levels_vec
end subroutine zaxisDefLevels end subroutine zaxisDefLevels
end interface end interface
interface interface
subroutine zaxisInqLevels(zaxisID,levels_vec) bind(c,name='zaxisInqLevels') subroutine zaxisInqLevels(zaxisID,levels_vec) bind(c,name='zaxisInqLevels')
import :: c_int,c_double import :: c_int,c_double
integer(kind=c_int), value :: zaxisID integer(kind=c_int), value :: zaxisID
real(kind=c_double), intent(out),dimension(*) :: levels_vec real(kind=c_double), intent(out), dimension(*) :: levels_vec
end subroutine zaxisInqLevels end subroutine zaxisInqLevels
end interface end interface
interface interface
...@@ -2263,16 +2263,16 @@ module mo_cdi ...@@ -2263,16 +2263,16 @@ module mo_cdi
end interface end interface
interface interface
subroutine zaxisDefUUID(zaxisID,uuid) bind(c,name='zaxisDefUUID') subroutine zaxisDefUUID(zaxisID,uuid) bind(c,name='zaxisDefUUID')
import :: c_int,c_char import :: c_int,c_signed_char
integer(kind=c_int), value :: zaxisID integer(kind=c_int), value :: zaxisID
character(kind=c_char), dimension(16) :: uuid integer(kind=c_signed_char), intent(in), dimension(16) :: uuid
end subroutine zaxisDefUUID end subroutine zaxisDefUUID
end interface end interface
interface interface
subroutine zaxisInqUUID(zaxisID,uuid) bind(c,name='zaxisInqUUID') subroutine zaxisInqUUID(zaxisID,uuid) bind(c,name='zaxisInqUUID')
import :: c_int,c_char import :: c_int,c_signed_char
integer(kind=c_int), value :: zaxisID integer(kind=c_int), value :: zaxisID
character(kind=c_char), dimension(16) :: uuid integer(kind=c_signed_char), intent(out), dimension(16) :: uuid
end subroutine zaxisInqUUID end subroutine zaxisInqUUID
end interface end interface
interface interface
...@@ -2378,14 +2378,14 @@ module mo_cdi ...@@ -2378,14 +2378,14 @@ module mo_cdi