1 #include <bindings.dsl.h>
2 #include <apr_getopt.h>
4 module Bindings.APR.GetOpt where
6 import Bindings.APR.ErrNo
7 import Bindings.APR.Pools
9 -- apr_getopt_err_fn_t takes varargs so it can't be declared as FunPtr.
10 #opaque_t apr_getopt_err_fn_t
12 #starttype struct apr_getopt_t
13 # field cont , Ptr <apr_pool_t>
14 # field errfn , Ptr <apr_getopt_err_fn_t>
15 # field errarg, Ptr ()
20 # field argv , Ptr (Ptr CChar)
21 # field place , Ptr CChar
22 # field interleave, CInt
23 # field skip_start, CInt
24 # field skip_end , CInt
27 #starttype struct apr_getopt_option_t
28 # field name , Ptr CChar
30 # field has_arg , CInt
31 # field description, Ptr CChar
34 #ccall apr_getopt_init, Ptr (Ptr <apr_getopt_t>) -> Ptr <apr_pool_t> -> CInt -> Ptr (Ptr CChar) -> IO <apr_status_t>
35 #ccall apr_getopt , Ptr <apr_getopt_t> -> Ptr CChar -> Ptr CChar -> Ptr (Ptr CChar) -> IO <apr_status_t>
36 #ccall apr_getopt_long, Ptr <apr_getopt_t> -> Ptr <apr_getopt_option_t> -> Ptr CInt -> Ptr (Ptr CChar) -> IO <apr_status_t>