From: PHO Date: Tue, 21 Sep 2010 05:55:20 +0000 (+0900) Subject: Bindings.APR.MD4 and XLate X-Git-Tag: RELEASE-0.1~11 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=468cc5fe8177261bc46c989e885ac96ab40a2345;p=bindings-apr-util.git Bindings.APR.MD4 and XLate --- diff --git a/Bindings/APR/MD4.hsc b/Bindings/APR/MD4.hsc new file mode 100644 index 0000000..ac3b86f --- /dev/null +++ b/Bindings/APR/MD4.hsc @@ -0,0 +1,25 @@ +#include +#include + +module Bindings.APR.MD4 where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.XLate + +#num APR_MD4_DIGESTSIZE + +#starttype struct apr_md4_ctx_t +# array_field state , +# array_field count , +# array_field buffer, CUChar +# if APR_HAS_XLATE +# field xlate, Ptr +# endif +#stoptype + +#ccall apr_md4_init , Ptr -> IO +#cinline apr_md4_set_xlate, Ptr -> Ptr -> IO +#ccall apr_md4_update , Ptr -> Ptr CUChar -> -> IO +#ccall apr_md4_final , Ptr CUChar -> Ptr -> IO +#ccall apr_md4 , Ptr CUChar -> Ptr CUChar -> -> IO diff --git a/Bindings/APR/XLate.hsc b/Bindings/APR/XLate.hsc new file mode 100644 index 0000000..415886f --- /dev/null +++ b/Bindings/APR/XLate.hsc @@ -0,0 +1,25 @@ +#include +#include + +module Bindings.APR.XLate where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +#opaque_t apr_xlate_t + +#ccall apr_xlate_open, Ptr (Ptr ) -> Ptr CChar -> Ptr CChar -> Ptr -> IO + +#pointer APR_DEFAULT_CHARSET +#pointer APR_LOCALE_CHARSET + +#ccall apr_xlate_sb_get , Ptr -> Ptr CInt -> IO +#ccall apr_xlate_conv_buffer, Ptr -> Ptr CChar -> Ptr -> Ptr CChar -> Ptr -> IO + +#if APR_NOT_DONE_YET +# ccall apr_xlate_conv_char, Ptr -> CChar -> CChar -> IO +#endif + +#ccall apr_xlate_conv_byte , Ptr -> CUChar -> IO +#ccall apr_xlate_close , Ptr -> IO diff --git a/bindings-apr-util.cabal b/bindings-apr-util.cabal index 75e662c..f8e900e 100644 --- a/bindings-apr-util.cabal +++ b/bindings-apr-util.cabal @@ -42,6 +42,8 @@ Library Bindings.APR.LDAP.Option Bindings.APR.LDAP.Rebind Bindings.APR.LDAP.URL + Bindings.APR.MD4 + Bindings.APR.XLate C-Sources: cbits/helper_apr_anylock.c @@ -49,6 +51,7 @@ Library cbits/helper_apr_dbm.c cbits/helper_apr_ldap.c cbits/helper_apr_ldap_init.c + cbits/helper_apr_md4.c Extensions: ForeignFunctionInterface diff --git a/cbits/helper_apr_md4.c b/cbits/helper_apr_md4.c new file mode 100644 index 0000000..649985e --- /dev/null +++ b/cbits/helper_apr_md4.c @@ -0,0 +1,4 @@ +#include +#include + +BC_INLINE2(apr_md4_set_xlate, apr_md4_ctx_t*, apr_xlate_t*, apr_status_t)