{-# LANGUAGE ForeignFunctionInterface #-}
module Data.NetCDF.Raw.PutGet where
import Data.NetCDF.Raw.Utils
nc_put_var1_String :: CInt -> CInt -> Ptr CULong -> String -> IO CInt
nc_put_var1_String ncid varid idx s =
withCStringPtr s $ nc_put_var1'_ ncid varid idx
foreign import ccall safe "netcdf.h nc_put_var1"
nc_put_var1'_ :: CInt -> CInt -> Ptr CULong -> Ptr (Ptr CChar) -> IO CInt
nc_put_var1_htext :: CInt -> CInt -> Ptr CULong -> String -> IO CInt
nc_put_var1_htext ncid varid idx s =
withCString s $ nc_put_var1_text'_ ncid varid idx
foreign import ccall safe "netcdf.h nc_put_var1_text"
nc_put_var1_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_uchar"
nc_put_var1_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_schar"
nc_put_var1_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_short"
nc_put_var1_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_int"
nc_put_var1_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_long"
nc_put_var1_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_float"
nc_put_var1_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_double"
nc_put_var1_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_ushort"
nc_put_var1_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_uint"
nc_put_var1_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_longlong"
nc_put_var1_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var1_ulonglong"
nc_put_var1_ulonglong'_ :: CInt -> CInt -> Ptr CULong
-> Ptr CULLong -> IO CInt
nc_get_var1_htext :: CInt -> CInt -> Ptr CULong -> IO (CInt, String)
nc_get_var1_htext ncid varid idx =
allocaArray 1 $ \sp -> do
res <- nc_get_var1_text'_ ncid varid idx sp
s <- peekCString sp
return (res, s)
foreign import ccall safe "netcdf.h nc_get_var1_text"
nc_get_var1_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_uchar"
nc_get_var1_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_schar"
nc_get_var1_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_short"
nc_get_var1_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_int"
nc_get_var1_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_long"
nc_get_var1_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_float"
nc_get_var1_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_double"
nc_get_var1_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_ushort"
nc_get_var1_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_uint"
nc_get_var1_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_longlong"
nc_get_var1_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var1_ulonglong"
nc_get_var1_ulonglong'_ :: CInt -> CInt -> Ptr CULong
-> Ptr CULLong -> IO CInt
nc_put_var_htext :: CInt -> CInt -> String -> IO CInt
nc_put_var_htext ncid varid s = withCString s $ nc_put_var_text'_ ncid varid
foreign import ccall safe "netcdf.h nc_put_var_text"
nc_put_var_text'_ :: CInt -> CInt -> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_uchar"
nc_put_var_uchar'_ :: CInt -> CInt -> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_schar"
nc_put_var_schar'_ :: CInt -> CInt -> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_short"
nc_put_var_short'_ :: CInt -> CInt -> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_int"
nc_put_var_int'_ :: CInt -> CInt -> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_long"
nc_put_var_long'_ :: CInt -> CInt -> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_float"
nc_put_var_float'_ :: CInt -> CInt -> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_double"
nc_put_var_double'_ :: CInt -> CInt -> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_ushort"
nc_put_var_ushort'_ :: CInt -> CInt -> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_uint"
nc_put_var_uint'_ :: CInt -> CInt -> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_longlong"
nc_put_var_longlong'_ :: CInt -> CInt -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_var_ulonglong"
nc_put_var_ulonglong'_ :: CInt -> CInt -> Ptr CULLong -> IO CInt
nc_get_var_htext :: CInt -> CInt -> Int -> IO (CInt, String)
nc_get_var_htext ncid varid len =
allocaArray len $ \sp -> do
res <- nc_get_var_text'_ ncid varid sp
s <- peekCString sp
return (res, s)
foreign import ccall safe "netcdf.h nc_get_var_text"
nc_get_var_text'_ :: CInt -> CInt -> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_uchar"
nc_get_var_uchar'_ :: CInt -> CInt -> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_schar"
nc_get_var_schar'_ :: CInt -> CInt -> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_short"
nc_get_var_short'_ :: CInt -> CInt -> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_int"
nc_get_var_int'_ :: CInt -> CInt -> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_long"
nc_get_var_long'_ :: CInt -> CInt -> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_float"
nc_get_var_float'_ :: CInt -> CInt -> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_double"
nc_get_var_double'_ :: CInt -> CInt -> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_ushort"
nc_get_var_ushort'_ :: CInt -> CInt -> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_uint"
nc_get_var_uint'_ :: CInt -> CInt -> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_longlong"
nc_get_var_longlong'_ :: CInt -> CInt -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_var_ulonglong"
nc_get_var_ulonglong'_ :: CInt -> CInt -> Ptr CULLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_text"
nc_put_vara_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_uchar"
nc_put_vara_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_schar"
nc_put_vara_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_short"
nc_put_vara_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_int"
nc_put_vara_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_long"
nc_put_vara_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_float"
nc_put_vara_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_double"
nc_put_vara_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_ushort"
nc_put_vara_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_uint"
nc_put_vara_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_longlong"
nc_put_vara_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vara_ulonglong"
nc_put_vara_ulonglong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_text"
nc_get_vara_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_uchar"
nc_get_vara_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_schar"
nc_get_vara_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_short"
nc_get_vara_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_int"
nc_get_vara_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_long"
nc_get_vara_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_float"
nc_get_vara_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_double"
nc_get_vara_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_ushort"
nc_get_vara_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_uint"
nc_get_vara_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_longlong"
nc_get_vara_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vara_ulonglong"
nc_get_vara_ulonglong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_text"
nc_put_vars_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_uchar"
nc_put_vars_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_schar"
nc_put_vars_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_short"
nc_put_vars_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_int"
nc_put_vars_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_long"
nc_put_vars_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_float"
nc_put_vars_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_double"
nc_put_vars_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_ushort"
nc_put_vars_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_uint"
nc_put_vars_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_longlong"
nc_put_vars_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULong -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_put_vars_ulonglong"
nc_put_vars_ulonglong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULong -> Ptr CULLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_text"
nc_get_vars_text'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_uchar"
nc_get_vars_uchar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_schar"
nc_get_vars_schar'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CSChar -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_short"
nc_get_vars_short'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_int"
nc_get_vars_int'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_long"
nc_get_vars_long'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_float"
nc_get_vars_float'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CFloat -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_double"
nc_get_vars_double'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CDouble -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_ushort"
nc_get_vars_ushort'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUShort -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_uint"
nc_get_vars_uint'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong -> Ptr CULong
-> Ptr CUInt -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_longlong"
nc_get_vars_longlong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULong -> Ptr CLLong -> IO CInt
foreign import ccall safe "netcdf.h nc_get_vars_ulonglong"
nc_get_vars_ulonglong'_ :: CInt -> CInt -> Ptr CULong -> Ptr CULong
-> Ptr CULong -> Ptr CULLong -> IO CInt