packages feed

bindings-libzip 0.1.0.4 → 0.10

raw patch · 2 files changed

+101/−124 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Bindings.LibZip: c'ZIP_AFL_RDONLY :: Num a => a
+ Bindings.LibZip: c'ZIP_CODEC_ENCODE :: Num a => a
+ Bindings.LibZip: c'ZIP_ER_ENCRNOTSUPP :: Num a => a
+ Bindings.LibZip: c'ZIP_ER_NOPASSWD :: Num a => a
+ Bindings.LibZip: c'ZIP_ER_RDONLY :: Num a => a
+ Bindings.LibZip: c'ZIP_ER_WRONGPASSWD :: Num a => a
+ Bindings.LibZip: c'ZIP_FL_ENCRYPTED :: Num a => a
+ Bindings.LibZip: c'ZIP_SOURCE_ERR_LOWER :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_COMP_METHOD :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_COMP_SIZE :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_CRC :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_ENCRYPTION_METHOD :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_FLAGS :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_INDEX :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_MTIME :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_NAME :: Num a => a
+ Bindings.LibZip: c'ZIP_STAT_SIZE :: Num a => a
+ Bindings.LibZip: c'zip_fdopen :: CInt -> CInt -> Ptr CInt -> IO (Ptr C'zip)
+ Bindings.LibZip: c'zip_fopen_encrypted :: Ptr C'zip -> CString -> CInt -> CString -> IO (Ptr C'zip_file)
+ Bindings.LibZip: c'zip_fopen_index_encrypted :: Ptr C'zip -> CULLong -> CInt -> CString -> IO (Ptr C'zip_file)
+ Bindings.LibZip: c'zip_get_file_extra :: Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString)
+ Bindings.LibZip: c'zip_get_num_entries :: Ptr C'zip -> CInt -> IO (CULLong)
+ Bindings.LibZip: c'zip_set_default_password :: Ptr C'zip -> CString -> IO (CInt)
+ Bindings.LibZip: c'zip_set_file_extra :: Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt)
+ Bindings.LibZip: c'zip_stat'flags :: C'zip_stat -> CUInt
+ Bindings.LibZip: c'zip_stat'valid :: C'zip_stat -> CULLong
+ Bindings.LibZip: p'zip_fdopen :: FunPtr (CInt -> CInt -> Ptr CInt -> IO (Ptr C'zip))
+ Bindings.LibZip: p'zip_fopen_encrypted :: FunPtr (Ptr C'zip -> CString -> CInt -> CString -> IO (Ptr C'zip_file))
+ Bindings.LibZip: p'zip_fopen_index_encrypted :: FunPtr (Ptr C'zip -> CULLong -> CInt -> CString -> IO (Ptr C'zip_file))
+ Bindings.LibZip: p'zip_get_file_extra :: FunPtr (Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString))
+ Bindings.LibZip: p'zip_get_num_entries :: FunPtr (Ptr C'zip -> CInt -> IO (CULLong))
+ Bindings.LibZip: p'zip_set_default_password :: FunPtr (Ptr C'zip -> CString -> IO (CInt))
+ Bindings.LibZip: p'zip_set_file_extra :: FunPtr (Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt))
+ Bindings.LibZip: p'zip_stat'flags :: Ptr (C'zip_stat) -> Ptr (CUInt)
+ Bindings.LibZip: p'zip_stat'valid :: Ptr (C'zip_stat) -> Ptr (CULLong)
- Bindings.LibZip: C'zip_stat :: Ptr CChar -> CInt -> CUInt -> CTime -> CSize -> CSize -> CUShort -> CUShort -> C'zip_stat
+ Bindings.LibZip: C'zip_stat :: CULLong -> Ptr CChar -> CULLong -> CULLong -> CULLong -> CTime -> CUInt -> CUShort -> CUShort -> CUInt -> C'zip_stat
- Bindings.LibZip: c'zip_add :: Ptr C'zip -> CString -> Ptr C'zip_source -> IO CInt
+ Bindings.LibZip: c'zip_add :: Ptr C'zip -> CString -> Ptr C'zip_source -> IO (CLLong)
- Bindings.LibZip: c'zip_add_dir :: Ptr C'zip -> CString -> IO CInt
+ Bindings.LibZip: c'zip_add_dir :: Ptr C'zip -> CString -> IO (CLLong)
- Bindings.LibZip: c'zip_close :: Ptr C'zip -> IO CInt
+ Bindings.LibZip: c'zip_close :: Ptr C'zip -> IO (CInt)
- Bindings.LibZip: c'zip_delete :: Ptr C'zip -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_delete :: Ptr C'zip -> CULLong -> IO (CInt)
- Bindings.LibZip: c'zip_error_get_sys_type :: CInt -> IO CInt
+ Bindings.LibZip: c'zip_error_get_sys_type :: CInt -> IO (CInt)
- Bindings.LibZip: c'zip_error_to_str :: Ptr Char -> CSize -> CInt -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_error_to_str :: Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_fclose :: Ptr C'zip_file -> IO CInt
+ Bindings.LibZip: c'zip_fclose :: Ptr C'zip_file -> IO (CInt)
- Bindings.LibZip: c'zip_file_strerror :: Ptr C'zip_file -> IO CString
+ Bindings.LibZip: c'zip_file_strerror :: Ptr C'zip_file -> IO (CString)
- Bindings.LibZip: c'zip_fopen_index :: Ptr C'zip -> CInt -> CInt -> IO (Ptr C'zip_file)
+ Bindings.LibZip: c'zip_fopen_index :: Ptr C'zip -> CULLong -> CInt -> IO (Ptr C'zip_file)
- Bindings.LibZip: c'zip_fread :: Ptr C'zip_file -> Ptr () -> CSize -> IO CSize
+ Bindings.LibZip: c'zip_fread :: Ptr C'zip_file -> Ptr () -> CULLong -> IO (CLLong)
- Bindings.LibZip: c'zip_get_archive_comment :: Ptr C'zip -> Ptr CInt -> CInt -> IO CString
+ Bindings.LibZip: c'zip_get_archive_comment :: Ptr C'zip -> Ptr CInt -> CInt -> IO (CString)
- Bindings.LibZip: c'zip_get_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_get_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_get_file_comment :: Ptr C'zip -> CInt -> Ptr CInt -> CInt -> IO CString
+ Bindings.LibZip: c'zip_get_file_comment :: Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString)
- Bindings.LibZip: c'zip_get_name :: Ptr C'zip -> CInt -> CInt -> IO CString
+ Bindings.LibZip: c'zip_get_name :: Ptr C'zip -> CULLong -> CInt -> IO (CString)
- Bindings.LibZip: c'zip_get_num_files :: Ptr C'zip -> IO CInt
+ Bindings.LibZip: c'zip_get_num_files :: Ptr C'zip -> IO (CInt)
- Bindings.LibZip: c'zip_name_locate :: Ptr C'zip -> CString -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_name_locate :: Ptr C'zip -> CString -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_rename :: Ptr C'zip -> CInt -> CString -> IO CInt
+ Bindings.LibZip: c'zip_rename :: Ptr C'zip -> CULLong -> CString -> IO (CInt)
- Bindings.LibZip: c'zip_replace :: Ptr C'zip -> CInt -> Ptr C'zip_source -> IO CInt
+ Bindings.LibZip: c'zip_replace :: Ptr C'zip -> CULLong -> Ptr C'zip_source -> IO (CInt)
- Bindings.LibZip: c'zip_set_archive_comment :: Ptr C'zip -> CString -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_set_archive_comment :: Ptr C'zip -> CString -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_set_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_set_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_set_file_comment :: Ptr C'zip -> CInt -> CString -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_set_file_comment :: Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt)
- Bindings.LibZip: c'zip_source_buffer :: Ptr C'zip -> Ptr () -> CSize -> CInt -> IO (Ptr C'zip_source)
+ Bindings.LibZip: c'zip_source_buffer :: Ptr C'zip -> Ptr () -> CULLong -> CInt -> IO (Ptr C'zip_source)
- Bindings.LibZip: c'zip_source_file :: Ptr C'zip -> CString -> CSize -> CSize -> IO (Ptr C'zip_source)
+ Bindings.LibZip: c'zip_source_file :: Ptr C'zip -> CString -> CULLong -> CLLong -> IO (Ptr C'zip_source)
- Bindings.LibZip: c'zip_source_filep :: Ptr C'zip -> Ptr CFile -> CSize -> CSize -> IO (Ptr C'zip_source)
+ Bindings.LibZip: c'zip_source_filep :: Ptr C'zip -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr C'zip_source)
- Bindings.LibZip: c'zip_source_zip :: Ptr C'zip -> Ptr C'zip -> CInt -> CInt -> CSize -> CSize -> IO (Ptr C'zip_source)
+ Bindings.LibZip: c'zip_source_zip :: Ptr C'zip -> Ptr C'zip -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr C'zip_source)
- Bindings.LibZip: c'zip_stat :: Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO CInt
+ Bindings.LibZip: c'zip_stat :: Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO (CInt)
- Bindings.LibZip: c'zip_stat'comp_size :: C'zip_stat -> CSize
+ Bindings.LibZip: c'zip_stat'comp_size :: C'zip_stat -> CULLong
- Bindings.LibZip: c'zip_stat'index :: C'zip_stat -> CInt
+ Bindings.LibZip: c'zip_stat'index :: C'zip_stat -> CULLong
- Bindings.LibZip: c'zip_stat'size :: C'zip_stat -> CSize
+ Bindings.LibZip: c'zip_stat'size :: C'zip_stat -> CULLong
- Bindings.LibZip: c'zip_stat_index :: Ptr C'zip -> CInt -> CInt -> Ptr C'zip_stat -> IO CInt
+ Bindings.LibZip: c'zip_stat_index :: Ptr C'zip -> CULLong -> CInt -> Ptr C'zip_stat -> IO (CInt)
- Bindings.LibZip: c'zip_strerror :: Ptr C'zip -> IO CString
+ Bindings.LibZip: c'zip_strerror :: Ptr C'zip -> IO (CString)
- Bindings.LibZip: c'zip_unchange :: Ptr C'zip -> CInt -> IO CInt
+ Bindings.LibZip: c'zip_unchange :: Ptr C'zip -> CULLong -> IO (CInt)
- Bindings.LibZip: c'zip_unchange_all :: Ptr C'zip -> IO CInt
+ Bindings.LibZip: c'zip_unchange_all :: Ptr C'zip -> IO (CInt)
- Bindings.LibZip: c'zip_unchange_archive :: Ptr C'zip -> IO CInt
+ Bindings.LibZip: c'zip_unchange_archive :: Ptr C'zip -> IO (CInt)
- Bindings.LibZip: mK'zip_source_callback :: C'zip_source_callback -> (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize)
+ Bindings.LibZip: mK'zip_source_callback :: C'zip_source_callback -> (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong)
- Bindings.LibZip: mk'zip_source_callback :: (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize) -> IO C'zip_source_callback
+ Bindings.LibZip: mk'zip_source_callback :: (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong) -> IO C'zip_source_callback
- Bindings.LibZip: p'zip_add :: FunPtr (Ptr C'zip -> CString -> Ptr C'zip_source -> IO CInt)
+ Bindings.LibZip: p'zip_add :: FunPtr (Ptr C'zip -> CString -> Ptr C'zip_source -> IO (CLLong))
- Bindings.LibZip: p'zip_add_dir :: FunPtr (Ptr C'zip -> CString -> IO CInt)
+ Bindings.LibZip: p'zip_add_dir :: FunPtr (Ptr C'zip -> CString -> IO (CLLong))
- Bindings.LibZip: p'zip_close :: FunPtr (Ptr C'zip -> IO CInt)
+ Bindings.LibZip: p'zip_close :: FunPtr (Ptr C'zip -> IO (CInt))
- Bindings.LibZip: p'zip_delete :: FunPtr (Ptr C'zip -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_delete :: FunPtr (Ptr C'zip -> CULLong -> IO (CInt))
- Bindings.LibZip: p'zip_error_get_sys_type :: FunPtr (CInt -> IO CInt)
+ Bindings.LibZip: p'zip_error_get_sys_type :: FunPtr (CInt -> IO (CInt))
- Bindings.LibZip: p'zip_error_to_str :: FunPtr (Ptr Char -> CSize -> CInt -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_error_to_str :: FunPtr (Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_fclose :: FunPtr (Ptr C'zip_file -> IO CInt)
+ Bindings.LibZip: p'zip_fclose :: FunPtr (Ptr C'zip_file -> IO (CInt))
- Bindings.LibZip: p'zip_file_strerror :: FunPtr (Ptr C'zip_file -> IO CString)
+ Bindings.LibZip: p'zip_file_strerror :: FunPtr (Ptr C'zip_file -> IO (CString))
- Bindings.LibZip: p'zip_fopen_index :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (Ptr C'zip_file))
+ Bindings.LibZip: p'zip_fopen_index :: FunPtr (Ptr C'zip -> CULLong -> CInt -> IO (Ptr C'zip_file))
- Bindings.LibZip: p'zip_fread :: FunPtr (Ptr C'zip_file -> Ptr () -> CSize -> IO CSize)
+ Bindings.LibZip: p'zip_fread :: FunPtr (Ptr C'zip_file -> Ptr () -> CULLong -> IO (CLLong))
- Bindings.LibZip: p'zip_get_archive_comment :: FunPtr (Ptr C'zip -> Ptr CInt -> CInt -> IO CString)
+ Bindings.LibZip: p'zip_get_archive_comment :: FunPtr (Ptr C'zip -> Ptr CInt -> CInt -> IO (CString))
- Bindings.LibZip: p'zip_get_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_get_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_get_file_comment :: FunPtr (Ptr C'zip -> CInt -> Ptr CInt -> CInt -> IO CString)
+ Bindings.LibZip: p'zip_get_file_comment :: FunPtr (Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString))
- Bindings.LibZip: p'zip_get_name :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CString)
+ Bindings.LibZip: p'zip_get_name :: FunPtr (Ptr C'zip -> CULLong -> CInt -> IO (CString))
- Bindings.LibZip: p'zip_get_num_files :: FunPtr (Ptr C'zip -> IO CInt)
+ Bindings.LibZip: p'zip_get_num_files :: FunPtr (Ptr C'zip -> IO (CInt))
- Bindings.LibZip: p'zip_name_locate :: FunPtr (Ptr C'zip -> CString -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_name_locate :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_rename :: FunPtr (Ptr C'zip -> CInt -> CString -> IO CInt)
+ Bindings.LibZip: p'zip_rename :: FunPtr (Ptr C'zip -> CULLong -> CString -> IO (CInt))
- Bindings.LibZip: p'zip_replace :: FunPtr (Ptr C'zip -> CInt -> Ptr C'zip_source -> IO CInt)
+ Bindings.LibZip: p'zip_replace :: FunPtr (Ptr C'zip -> CULLong -> Ptr C'zip_source -> IO (CInt))
- Bindings.LibZip: p'zip_set_archive_comment :: FunPtr (Ptr C'zip -> CString -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_set_archive_comment :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_set_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_set_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_set_file_comment :: FunPtr (Ptr C'zip -> CInt -> CString -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_set_file_comment :: FunPtr (Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt))
- Bindings.LibZip: p'zip_source_buffer :: FunPtr (Ptr C'zip -> Ptr () -> CSize -> CInt -> IO (Ptr C'zip_source))
+ Bindings.LibZip: p'zip_source_buffer :: FunPtr (Ptr C'zip -> Ptr () -> CULLong -> CInt -> IO (Ptr C'zip_source))
- Bindings.LibZip: p'zip_source_file :: FunPtr (Ptr C'zip -> CString -> CSize -> CSize -> IO (Ptr C'zip_source))
+ Bindings.LibZip: p'zip_source_file :: FunPtr (Ptr C'zip -> CString -> CULLong -> CLLong -> IO (Ptr C'zip_source))
- Bindings.LibZip: p'zip_source_filep :: FunPtr (Ptr C'zip -> Ptr CFile -> CSize -> CSize -> IO (Ptr C'zip_source))
+ Bindings.LibZip: p'zip_source_filep :: FunPtr (Ptr C'zip -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr C'zip_source))
- Bindings.LibZip: p'zip_source_zip :: FunPtr (Ptr C'zip -> Ptr C'zip -> CInt -> CInt -> CSize -> CSize -> IO (Ptr C'zip_source))
+ Bindings.LibZip: p'zip_source_zip :: FunPtr (Ptr C'zip -> Ptr C'zip -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr C'zip_source))
- Bindings.LibZip: p'zip_stat :: FunPtr (Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO CInt)
+ Bindings.LibZip: p'zip_stat :: FunPtr (Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO (CInt))
- Bindings.LibZip: p'zip_stat'comp_size :: Ptr (C'zip_stat) -> Ptr (CSize)
+ Bindings.LibZip: p'zip_stat'comp_size :: Ptr (C'zip_stat) -> Ptr (CULLong)
- Bindings.LibZip: p'zip_stat'index :: Ptr (C'zip_stat) -> Ptr (CInt)
+ Bindings.LibZip: p'zip_stat'index :: Ptr (C'zip_stat) -> Ptr (CULLong)
- Bindings.LibZip: p'zip_stat'size :: Ptr (C'zip_stat) -> Ptr (CSize)
+ Bindings.LibZip: p'zip_stat'size :: Ptr (C'zip_stat) -> Ptr (CULLong)
- Bindings.LibZip: p'zip_stat_index :: FunPtr (Ptr C'zip -> CInt -> CInt -> Ptr C'zip_stat -> IO CInt)
+ Bindings.LibZip: p'zip_stat_index :: FunPtr (Ptr C'zip -> CULLong -> CInt -> Ptr C'zip_stat -> IO (CInt))
- Bindings.LibZip: p'zip_strerror :: FunPtr (Ptr C'zip -> IO CString)
+ Bindings.LibZip: p'zip_strerror :: FunPtr (Ptr C'zip -> IO (CString))
- Bindings.LibZip: p'zip_unchange :: FunPtr (Ptr C'zip -> CInt -> IO CInt)
+ Bindings.LibZip: p'zip_unchange :: FunPtr (Ptr C'zip -> CULLong -> IO (CInt))
- Bindings.LibZip: p'zip_unchange_all :: FunPtr (Ptr C'zip -> IO CInt)
+ Bindings.LibZip: p'zip_unchange_all :: FunPtr (Ptr C'zip -> IO (CInt))
- Bindings.LibZip: p'zip_unchange_archive :: FunPtr (Ptr C'zip -> IO CInt)
+ Bindings.LibZip: p'zip_unchange_archive :: FunPtr (Ptr C'zip -> IO (CInt))
- Bindings.LibZip: type C'zip_source_callback = FunPtr (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize)
+ Bindings.LibZip: type C'zip_source_callback = FunPtr (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong)

Files

Bindings/LibZip.hsc view
@@ -1,8 +1,8 @@ #include <bindings.dsl.h> #include <zip.h> --- | This module provides automatic low-level bindings to @libzip@ library.--- See also:+-- | This module provides automatic low-level bindings to @libzip@+-- library, version 0.10. See also: -- --   * @libzip@ documention: <http://nih.at/libzip/libzip.html> and @zip.h@ --@@ -14,6 +14,7 @@ --   * <http://hackage.haskell.org/package/LibZip> -- + module Bindings.LibZip where #strict_import @@ -34,11 +35,17 @@ #num ZIP_FL_COMPRESSED #num ZIP_FL_UNCHANGED #num ZIP_FL_RECOMPRESS+#num ZIP_FL_ENCRYPTED  -- archive global flags flags  #num ZIP_AFL_TORRENT+#num ZIP_AFL_RDONLY +-- flags for compression and encryption sources++#num ZIP_CODEC_ENCODE+ -- libzip error codes  #num ZIP_ER_OK@@ -65,6 +72,10 @@ #num ZIP_ER_INCONS #num ZIP_ER_REMOVE #num ZIP_ER_DELETED+#num ZIP_ER_ENCRNOTSUPP+#num ZIP_ER_RDONLY+#num ZIP_ER_NOPASSWD+#num ZIP_ER_WRONGPASSWD  -- type of system error value @@ -106,140 +117,106 @@ #num ZIP_SOURCE_ERROR #num ZIP_SOURCE_FREE --- typedef ssize_t (*zip_source_callback)(void *state, void *data,---                                        size_t len, enum zip_source_cmd cmd);-#callback zip_source_callback , Ptr () -> Ptr () -> CSize -> <zip_source_cmd> -> IO CSize+-- typedef zip_int64_t (*zip_source_callback)(void *, void *, zip_uint64_t, enum zip_source_cmd);+#callback zip_source_callback , Ptr () -> Ptr () -> CULLong -> <zip_source_cmd> -> IO CULLong +#num ZIP_SOURCE_ERR_LOWER++#num ZIP_STAT_NAME+#num ZIP_STAT_INDEX+#num ZIP_STAT_SIZE+#num ZIP_STAT_COMP_SIZE+#num ZIP_STAT_MTIME+#num ZIP_STAT_CRC+#num ZIP_STAT_COMP_METHOD+#num ZIP_STAT_ENCRYPTION_METHOD+#num ZIP_STAT_FLAGS+ #opaque_t time_t +-- struct zip_stat {+--     zip_uint64_t valid;                 /* which fields have valid values */+--     const char *name;                   /* name of the file */+--     zip_uint64_t index;                 /* index within archive */+--     zip_uint64_t size;                  /* size of file (uncompressed) */+--     zip_uint64_t comp_size;             /* size of file (compressed) */+--     time_t mtime;                       /* modification time */+--     zip_uint32_t crc;                   /* crc of file data */+--     zip_uint16_t comp_method;           /* compression method used */+--     zip_uint16_t encryption_method;     /* encryption method used */+--     zip_uint32_t flags;                 /* reserved for future use */+-- }; #starttype struct zip_stat+#field valid, CULLong #field name, Ptr CChar-#field index, CInt-#field crc, CUInt+#field index, CULLong+#field size, CULLong+#field comp_size, CULLong #field mtime, CTime-#field size, CSize-#field comp_size, CSize+#field crc, CUInt #field comp_method, CUShort #field encryption_method, CUShort+#field flags, CUInt #stoptype --- int zip_add(struct zip *, const char *, struct zip_source *);-#ccall zip_add , Ptr <zip> -> CString -> Ptr <zip_source> -> IO CInt---- int zip_add_dir(struct zip *, const char *);-#ccall zip_add_dir , Ptr <zip> -> CString -> IO CInt---- int zip_close(struct zip *);-#ccall zip_close , Ptr <zip> -> IO CInt---- int zip_delete(struct zip *, int);-#ccall zip_delete , Ptr <zip> -> CInt -> IO CInt+-- make every declaration one-line, and replace+--    ZIP_EXTERN ->+--    const char * -> CString+--    char * -> Ptr CChar+--    struct foo * -> Ptr <foo>  -- with regexps+--    FILE -> CFile+--    int -> CInt+--    zip_int64_t -> CLLong+--    zip_uint64_t -> CULLong+--    void -> ()+--    zip_source_callback -> <zip_source_callback>+--    foo * -> Ptr foo   -- with regexps+--    regexp-replace "\(.*\)\(zip_[a-z0-9_]+\)(\(.*\));" "#ccall \2 , \3 -> IO (\1)" --- void zip_error_clear(struct zip *);+#ccall zip_add , Ptr <zip> -> CString -> Ptr <zip_source> -> IO (CLLong)+#ccall zip_add_dir , Ptr <zip> -> CString -> IO (CLLong)+#ccall zip_close , Ptr <zip> -> IO (CInt)+#ccall zip_delete , Ptr <zip> -> CULLong -> IO (CInt) #ccall zip_error_clear , Ptr <zip> -> IO ()---- void zip_error_get(struct zip *, int *, int *); #ccall zip_error_get , Ptr <zip> -> Ptr CInt -> Ptr CInt -> IO ()---- int zip_error_get_sys_type(int);-#ccall zip_error_get_sys_type , CInt -> IO CInt---- int zip_error_to_str(char *, size_t, int, int);-#ccall zip_error_to_str , Ptr Char -> CSize -> CInt -> CInt -> IO CInt---- int zip_fclose(struct zip_file *);-#ccall zip_fclose , Ptr <zip_file> -> IO CInt---- void zip_file_error_clear(struct zip_file *);+#ccall zip_error_get_sys_type , CInt -> IO (CInt)+#ccall zip_error_to_str , Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt)+#ccall zip_fclose , Ptr <zip_file> -> IO (CInt)+#ccall zip_fdopen , CInt -> CInt -> Ptr CInt -> IO (Ptr <zip>) #ccall zip_file_error_clear , Ptr <zip_file> -> IO ()---- void zip_file_error_get(struct zip_file *, int *, int *); #ccall zip_file_error_get , Ptr <zip_file> -> Ptr CInt -> Ptr CInt -> IO ()---- const char *zip_file_strerror(struct zip_file *);-#ccall zip_file_strerror , Ptr <zip_file> -> IO CString---- struct zip_file *zip_fopen(struct zip *, const char *, int);+#ccall zip_file_strerror , Ptr <zip_file> -> IO (CString) #ccall zip_fopen , Ptr <zip> -> CString -> CInt -> IO (Ptr <zip_file>)---- struct zip_file *zip_fopen_index(struct zip *, int, int);-#ccall zip_fopen_index , Ptr <zip> -> CInt -> CInt -> IO (Ptr <zip_file>)---- ssize_t zip_fread(struct zip_file *, void *, size_t);-#ccall zip_fread , Ptr <zip_file> -> Ptr () -> CSize -> IO CSize---- const char *zip_get_archive_comment(struct zip *, int *, int);-#ccall zip_get_archive_comment , Ptr <zip> -> Ptr CInt -> CInt -> IO CString---- int zip_get_archive_flag(struct zip *, int, int);-#ccall zip_get_archive_flag , Ptr <zip> -> CInt -> CInt -> IO CInt---- const char *zip_get_file_comment(struct zip *, int, int *, int);-#ccall zip_get_file_comment , Ptr <zip> -> CInt -> Ptr CInt -> CInt -> IO CString---- const char *zip_get_name(struct zip *, int, int);-#ccall zip_get_name , Ptr <zip> -> CInt -> CInt -> IO CString---- int zip_get_num_files(struct zip *);-#ccall zip_get_num_files , Ptr <zip> -> IO CInt---- int zip_name_locate(struct zip *, const char *, int);-#ccall zip_name_locate , Ptr <zip> -> CString -> CInt -> IO CInt---- struct zip *zip_open(const char *, int, int *);+#ccall zip_fopen_encrypted , Ptr <zip> -> CString -> CInt -> CString -> IO (Ptr <zip_file>)+#ccall zip_fopen_index , Ptr <zip> -> CULLong -> CInt -> IO (Ptr <zip_file>)+#ccall zip_fopen_index_encrypted , Ptr <zip> -> CULLong -> CInt -> CString -> IO (Ptr <zip_file>)+#ccall zip_fread , Ptr <zip_file> -> Ptr () -> CULLong -> IO (CLLong)+#ccall zip_get_archive_comment , Ptr <zip> -> Ptr CInt -> CInt -> IO (CString)+#ccall zip_get_archive_flag , Ptr <zip> -> CInt -> CInt -> IO (CInt)+#ccall zip_get_file_comment , Ptr <zip> -> CULLong -> Ptr CInt -> CInt -> IO (CString)+#ccall zip_get_file_extra , Ptr <zip> -> CULLong -> Ptr CInt -> CInt -> IO (CString)+#ccall zip_get_name , Ptr <zip> -> CULLong -> CInt -> IO (CString)+#ccall zip_get_num_entries , Ptr <zip> -> CInt -> IO (CULLong)+#ccall zip_get_num_files , Ptr <zip> -> IO (CInt)+#ccall zip_name_locate , Ptr <zip> -> CString -> CInt -> IO (CInt) #ccall zip_open , CString -> CInt -> Ptr CInt -> IO (Ptr <zip>)---- int zip_rename(struct zip *, int, const char *);-#ccall zip_rename , Ptr <zip> -> CInt -> CString -> IO CInt---- int zip_replace(struct zip *, int, struct zip_source *);-#ccall zip_replace , Ptr <zip> -> CInt -> Ptr <zip_source> -> IO CInt---- int zip_set_archive_comment(struct zip *, const char *, int);-#ccall zip_set_archive_comment , Ptr <zip> -> CString -> CInt -> IO CInt---- int zip_set_archive_flag(struct zip *, int, int);-#ccall zip_set_archive_flag , Ptr <zip> -> CInt -> CInt -> IO CInt---- int zip_set_file_comment(struct zip *, int, const char *, int);-#ccall zip_set_file_comment , Ptr <zip> -> CInt -> CString -> CInt -> IO CInt---- struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int);-#ccall zip_source_buffer , Ptr <zip> -> Ptr () -> CSize -> CInt -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t);-#ccall zip_source_file , Ptr <zip> -> CString -> CSize -> CSize -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t);-#ccall zip_source_filep , Ptr <zip> -> Ptr CFile -> CSize -> CSize -> IO (Ptr <zip_source>)---- void zip_source_free(struct zip_source *);+#ccall zip_rename , Ptr <zip> -> CULLong -> CString -> IO (CInt)+#ccall zip_replace , Ptr <zip> -> CULLong -> Ptr <zip_source> -> IO (CInt)+#ccall zip_set_archive_comment , Ptr <zip> -> CString -> CInt -> IO (CInt)+#ccall zip_set_archive_flag , Ptr <zip> -> CInt -> CInt -> IO (CInt)+#ccall zip_set_default_password , Ptr <zip> -> CString -> IO (CInt)+#ccall zip_set_file_comment , Ptr <zip> -> CULLong -> CString -> CInt -> IO (CInt)+#ccall zip_set_file_extra , Ptr <zip> -> CULLong -> CString -> CInt -> IO (CInt)+#ccall zip_source_buffer , Ptr <zip> -> Ptr () -> CULLong -> CInt -> IO (Ptr <zip_source>)+#ccall zip_source_file , Ptr <zip> -> CString -> CULLong -> CLLong -> IO (Ptr <zip_source>)+#ccall zip_source_filep , Ptr <zip> -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr <zip_source>) #ccall zip_source_free , Ptr <zip_source> -> IO ()---- struct zip_source *zip_source_function(struct zip *, zip_source_callback, void *); #ccall zip_source_function , Ptr <zip> -> <zip_source_callback> -> Ptr () -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int, off_t, off_t);-#ccall zip_source_zip , Ptr <zip> -> Ptr <zip> -> CInt -> CInt -> CSize -> CSize -> IO (Ptr <zip_source>)---- int zip_stat(struct zip *, const char *, int, struct zip_stat *);-#ccall zip_stat , Ptr <zip> -> CString -> CInt -> Ptr <zip_stat> -> IO CInt---- int zip_stat_index(struct zip *, int, int, struct zip_stat *);-#ccall zip_stat_index , Ptr <zip> -> CInt -> CInt -> Ptr <zip_stat> -> IO CInt---- void zip_stat_init(struct zip_stat *);+#ccall zip_source_zip , Ptr <zip> -> Ptr <zip> -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr <zip_source>)+#ccall zip_stat , Ptr <zip> -> CString -> CInt -> Ptr <zip_stat> -> IO (CInt)+#ccall zip_stat_index , Ptr <zip> -> CULLong -> CInt -> Ptr <zip_stat> -> IO (CInt) #ccall zip_stat_init , Ptr <zip_stat> -> IO ()---- const char *zip_strerror(struct zip *);-#ccall zip_strerror , Ptr <zip> -> IO CString---- int zip_unchange(struct zip *, int);-#ccall zip_unchange , Ptr <zip> -> CInt -> IO CInt---- int zip_unchange_all(struct zip *);-#ccall zip_unchange_all , Ptr <zip> -> IO CInt---- int zip_unchange_archive(struct zip *);-#ccall zip_unchange_archive , Ptr <zip> -> IO CInt-+#ccall zip_strerror , Ptr <zip> -> IO (CString)+#ccall zip_unchange , Ptr <zip> -> CULLong -> IO (CInt)+#ccall zip_unchange_all , Ptr <zip> -> IO (CInt)+#ccall zip_unchange_archive , Ptr <zip> -> IO (CInt)
bindings-libzip.cabal view
@@ -1,8 +1,8 @@ Name:                bindings-libzip-Version:             0.1.0.4+Version:             0.10 Synopsis:            Low level bindings to libzip. Description:-  This package provides low-level bindings to libzip library.+  This package provides low-level bindings to libzip (v0.10) library.   For higher-level interface please use LibZip package:   <http://hackage.haskell.org/package/LibZip> @@ -16,7 +16,7 @@ Build-type:          Simple  Cabal-version:       >=1.2.3-Tested-with:         GHC == 7.0.1, GHC == 7.2.1, GHC == 7.4.1+Tested-with:         GHC == 7.0.3, GHC == 7.2.2, GHC == 7.4.1  Flag NoPkgConfig   Description: Do not use pkg-config to check for library dependencies.@@ -37,8 +37,8 @@     Includes: zip.h     Extra-Libraries: zip z   else-    PkgConfig-Depends: libzip >= 0.9+    PkgConfig-Depends: libzip == 0.10    GHC-Options:-        -Wall+        -Wall -fno-warn-unused-imports