]> gitweb @ CieloNegro.org - bindings-apr.git/commitdiff
Bindings.APR.Lib
authorPHO <pho@cielonegro.org>
Fri, 20 Aug 2010 16:08:14 +0000 (01:08 +0900)
committerPHO <pho@cielonegro.org>
Fri, 20 Aug 2010 16:08:14 +0000 (01:08 +0900)
Bindings/APR/Lib.hsc [new file with mode: 0644]
bindings-apr.cabal
cbits/helper_apr_lib.c [new file with mode: 0644]

diff --git a/Bindings/APR/Lib.hsc b/Bindings/APR/Lib.hsc
new file mode 100644 (file)
index 0000000..a949124
--- /dev/null
@@ -0,0 +1,37 @@
+#include <bindings.dsl.h>
+#include <apr_lib.h>
+
+module Bindings.APR.Lib where
+#strict_import
+import Bindings.APR
+import Bindings.APR.ErrNo
+import System.Posix.Types
+
+#num HUGE_STRING_LEN
+
+#starttype struct apr_vformatter_buff_t
+#  field curpos, Ptr CChar
+#  field endpos, Ptr CChar
+#stoptype
+
+#ccall apr_filepath_name_get, Ptr CChar -> IO (Ptr CChar)
+
+#cinline apr_killpg, CPid -> CInt -> IO CInt
+
+-- apr_vformatter takes va_list...
+
+#ccall apr_password_get, Ptr CChar -> Ptr CChar -> Ptr <apr_size_t> -> IO <apr_status_t>
+
+#cinline apr_isalnum , CInt -> IO CInt
+#cinline apr_isalpha , CInt -> IO CInt
+#cinline apr_isdigit , CInt -> IO CInt
+#cinline apr_isgraph , CInt -> IO CInt
+#cinline apr_islower , CInt -> IO CInt
+#cinline apr_isascii , CInt -> IO CInt
+#cinline apr_isprint , CInt -> IO CInt
+#cinline apr_ispunct , CInt -> IO CInt
+#cinline apr_isspace , CInt -> IO CInt
+#cinline apr_isupper , CInt -> IO CInt
+#cinline apr_isxdigit, CInt -> IO CInt
+#cinline apr_tolower , CInt -> IO CInt
+#cinline apr_toupper , CInt -> IO CInt
index f65620862f746518a3ea0774ee742b1b380db760..4addaf06bbd513a423a06233d53d1e1b7df58b22 100644 (file)
@@ -44,6 +44,7 @@ Library
         Bindings.APR.GetOpt
         Bindings.APR.Global.Mutex
         Bindings.APR.Hash
+        Bindings.APR.Lib
         Bindings.APR.Pools
         Bindings.APR.Proc.Mutex
         Bindings.APR.Tables
@@ -58,6 +59,7 @@ Library
         cbits/helper_apr_errno.c
         cbits/helper_apr_general.c
         cbits/helper_apr_pools.c
+        cbits/helper_apr_lib.c
         cbits/helper_apr_time.c
         cbits/helper_apr_user.c
 
diff --git a/cbits/helper_apr_lib.c b/cbits/helper_apr_lib.c
new file mode 100644 (file)
index 0000000..c1f01e2
--- /dev/null
@@ -0,0 +1,19 @@
+#include <bindings.cmacros.h>
+#include <apr_lib.h>
+#include <signal.h>
+
+BC_INLINE2(apr_killpg, pid_t, int, int)
+
+BC_INLINE1(apr_isalnum , int, int)
+BC_INLINE1(apr_isalpha , int, int)
+BC_INLINE1(apr_isdigit , int, int)
+BC_INLINE1(apr_isgraph , int, int)
+BC_INLINE1(apr_islower , int, int)
+BC_INLINE1(apr_isascii , int, int)
+BC_INLINE1(apr_isprint , int, int)
+BC_INLINE1(apr_ispunct , int, int)
+BC_INLINE1(apr_isspace , int, int)
+BC_INLINE1(apr_isupper , int, int)
+BC_INLINE1(apr_isxdigit, int, int)
+BC_INLINE1(apr_tolower , int, int)
+BC_INLINE1(apr_toupper , int, int)