a better API for loading PGF & NGF files

This commit is contained in:
krangelov
2021-08-06 16:50:21 +02:00
parent dc1644563f
commit 2d6bcd1953
7 changed files with 174 additions and 33 deletions

View File

@@ -31,8 +31,14 @@ foreign import ccall unsafe "pgf_utf8_decode"
foreign import ccall unsafe "pgf_utf8_encode"
pgf_utf8_encode :: Word32 -> Ptr CString -> IO ()
foreign import ccall "pgf_read"
pgf_read :: CString -> Ptr PgfExn -> IO (Ptr PgfPGF)
foreign import ccall "pgf_read_pgf"
pgf_read_pgf :: CString -> Ptr PgfExn -> IO (Ptr PgfPGF)
foreign import ccall "pgf_boot_ngf"
pgf_boot_ngf :: CString -> CString -> Ptr PgfExn -> IO (Ptr PgfPGF)
foreign import ccall "pgf_read_ngf"
pgf_read_ngf :: CString -> Ptr PgfExn -> IO (Ptr PgfPGF)
foreign import ccall "&pgf_free"
pgf_free_fptr :: FinalizerPtr PgfPGF