From 794d2d4643eb43a9ef18025fb1537388dd803310 Mon Sep 17 00:00:00 2001 From: PHO Date: Thu, 19 Aug 2010 21:10:00 +0900 Subject: [PATCH] Bindings.APR.GetOpt --- Bindings/APR/GetOpt.hsc | 36 ++++++++++++++++++++++++++++++++++++ bindings-apr.cabal | 1 + 2 files changed, 37 insertions(+) create mode 100644 Bindings/APR/GetOpt.hsc diff --git a/Bindings/APR/GetOpt.hsc b/Bindings/APR/GetOpt.hsc new file mode 100644 index 0000000..2b9c768 --- /dev/null +++ b/Bindings/APR/GetOpt.hsc @@ -0,0 +1,36 @@ +#include +#include + +module Bindings.APR.GetOpt where +#strict_import +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +-- apr_getopt_err_fn_t takes varargs so it can't be declared as FunPtr. +#opaque_t apr_getopt_err_fn_t + +#starttype struct apr_getopt_t +# field cont , Ptr +# field errfn , Ptr +# field errarg, Ptr () +# field ind , CInt +# field opt , CInt +# field reset , CInt +# field argc , CInt +# field argv , Ptr (Ptr CChar) +# field place , Ptr CChar +# field interleave, CInt +# field skip_start, CInt +# field skip_end , CInt +#stoptype + +#starttype struct apr_getopt_option_t +# field name , Ptr CChar +# field optch , CInt +# field has_arg , CInt +# field description, Ptr CChar +#stoptype + +#ccall apr_getopt_init, Ptr (Ptr ) -> Ptr -> CInt -> Ptr (Ptr CChar) -> IO +#ccall apr_getopt , Ptr -> Ptr CChar -> Ptr CChar -> Ptr (Ptr CChar) -> IO +#ccall apr_getopt_long, Ptr -> Ptr -> Ptr CInt -> Ptr (Ptr CChar) -> IO diff --git a/bindings-apr.cabal b/bindings-apr.cabal index 6b312d1..3969e4b 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -41,6 +41,7 @@ Library Bindings.APR.File.Types Bindings.APR.FNMatch Bindings.APR.General + Bindings.APR.GetOpt Bindings.APR.Pools Bindings.APR.Proc.Mutex Bindings.APR.Tables -- 2.40.0