{-# LINE 1 "src/Foreign/ZoneDetect.hsc" #-}
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Foreign.ZoneDetect where
import Foreign
import Foreign.C.Types
import Foreign.C.String
data ZoneDetectInfo = ZoneDetectInfo
{ fd :: Int
, length :: CInt
, closeType :: Word8
, mapping :: Ptr Word8
, tableType :: Word8
, version :: Word8
, precision :: Word8
, numFields :: Word8
, notice :: CString
, fieldNames :: Ptr CString
, bboxOffset :: Word32
, metadataOffset :: Word32
, dataOffset :: Word32
}
foreign import ccall unsafe "zonedetect.h ZDOpenDatabase"
c_ZDOpenDatabase :: CString -> IO (Ptr ZoneDetectInfo)
foreign import ccall unsafe "zonedetect.h ZDHelperSimpleLookupString"
c_ZDHelperSimpleLookupString :: Ptr ZoneDetectInfo -> CFloat -> CFloat -> IO CString