{-# LINE 1 "Bindings/LibZip.hsc" #-}

{-# LINE 2 "Bindings/LibZip.hsc" #-}

{-# LINE 3 "Bindings/LibZip.hsc" #-}

-- | 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@
--
--   * @bindings-DSL@ documentation:
--     <http://bitbucket.org/mauricio/bindings-dsl/wiki/Home>
--
-- Higher-level interface is provided by a separate LibZip package:
--
--   * <http://hackage.haskell.org/package/LibZip>
--


module Bindings.LibZip where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 20 "Bindings/LibZip.hsc" #-}

data C'zip = C'zip

{-# LINE 22 "Bindings/LibZip.hsc" #-}
data C'zip_file = C'zip_file

{-# LINE 23 "Bindings/LibZip.hsc" #-}
data C'zip_source = C'zip_source

{-# LINE 24 "Bindings/LibZip.hsc" #-}

-- flags for zip_open

c'ZIP_CREATE = 1
c'ZIP_CREATE :: (Num a) => a

{-# LINE 28 "Bindings/LibZip.hsc" #-}
c'ZIP_EXCL = 2
c'ZIP_EXCL :: (Num a) => a

{-# LINE 29 "Bindings/LibZip.hsc" #-}
c'ZIP_CHECKCONS = 4
c'ZIP_CHECKCONS :: (Num a) => a

{-# LINE 30 "Bindings/LibZip.hsc" #-}

-- flags for zip_name_locate, zip_fopen, zip_stat, ...

c'ZIP_FL_NOCASE = 1
c'ZIP_FL_NOCASE :: (Num a) => a

{-# LINE 34 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_NODIR = 2
c'ZIP_FL_NODIR :: (Num a) => a

{-# LINE 35 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_COMPRESSED = 4
c'ZIP_FL_COMPRESSED :: (Num a) => a

{-# LINE 36 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_UNCHANGED = 8
c'ZIP_FL_UNCHANGED :: (Num a) => a

{-# LINE 37 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_RECOMPRESS = 16
c'ZIP_FL_RECOMPRESS :: (Num a) => a

{-# LINE 38 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_ENCRYPTED = 32
c'ZIP_FL_ENCRYPTED :: (Num a) => a

{-# LINE 39 "Bindings/LibZip.hsc" #-}

-- archive global flags flags

c'ZIP_AFL_TORRENT = 1
c'ZIP_AFL_TORRENT :: (Num a) => a

{-# LINE 43 "Bindings/LibZip.hsc" #-}
c'ZIP_AFL_RDONLY = 2
c'ZIP_AFL_RDONLY :: (Num a) => a

{-# LINE 44 "Bindings/LibZip.hsc" #-}

-- flags for compression and encryption sources

c'ZIP_CODEC_ENCODE = 1
c'ZIP_CODEC_ENCODE :: (Num a) => a

{-# LINE 48 "Bindings/LibZip.hsc" #-}

-- libzip error codes

c'ZIP_ER_OK = 0
c'ZIP_ER_OK :: (Num a) => a

{-# LINE 52 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_MULTIDISK = 1
c'ZIP_ER_MULTIDISK :: (Num a) => a

{-# LINE 53 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_RENAME = 2
c'ZIP_ER_RENAME :: (Num a) => a

{-# LINE 54 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_CLOSE = 3
c'ZIP_ER_CLOSE :: (Num a) => a

{-# LINE 55 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_SEEK = 4
c'ZIP_ER_SEEK :: (Num a) => a

{-# LINE 56 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_READ = 5
c'ZIP_ER_READ :: (Num a) => a

{-# LINE 57 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_WRITE = 6
c'ZIP_ER_WRITE :: (Num a) => a

{-# LINE 58 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_CRC = 7
c'ZIP_ER_CRC :: (Num a) => a

{-# LINE 59 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_ZIPCLOSED = 8
c'ZIP_ER_ZIPCLOSED :: (Num a) => a

{-# LINE 60 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_NOENT = 9
c'ZIP_ER_NOENT :: (Num a) => a

{-# LINE 61 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_EXISTS = 10
c'ZIP_ER_EXISTS :: (Num a) => a

{-# LINE 62 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_OPEN = 11
c'ZIP_ER_OPEN :: (Num a) => a

{-# LINE 63 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_TMPOPEN = 12
c'ZIP_ER_TMPOPEN :: (Num a) => a

{-# LINE 64 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_ZLIB = 13
c'ZIP_ER_ZLIB :: (Num a) => a

{-# LINE 65 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_MEMORY = 14
c'ZIP_ER_MEMORY :: (Num a) => a

{-# LINE 66 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_CHANGED = 15
c'ZIP_ER_CHANGED :: (Num a) => a

{-# LINE 67 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_COMPNOTSUPP = 16
c'ZIP_ER_COMPNOTSUPP :: (Num a) => a

{-# LINE 68 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_EOF = 17
c'ZIP_ER_EOF :: (Num a) => a

{-# LINE 69 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_INVAL = 18
c'ZIP_ER_INVAL :: (Num a) => a

{-# LINE 70 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_NOZIP = 19
c'ZIP_ER_NOZIP :: (Num a) => a

{-# LINE 71 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_INTERNAL = 20
c'ZIP_ER_INTERNAL :: (Num a) => a

{-# LINE 72 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_INCONS = 21
c'ZIP_ER_INCONS :: (Num a) => a

{-# LINE 73 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_REMOVE = 22
c'ZIP_ER_REMOVE :: (Num a) => a

{-# LINE 74 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_DELETED = 23
c'ZIP_ER_DELETED :: (Num a) => a

{-# LINE 75 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_ENCRNOTSUPP = 24
c'ZIP_ER_ENCRNOTSUPP :: (Num a) => a

{-# LINE 76 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_RDONLY = 25
c'ZIP_ER_RDONLY :: (Num a) => a

{-# LINE 77 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_NOPASSWD = 26
c'ZIP_ER_NOPASSWD :: (Num a) => a

{-# LINE 78 "Bindings/LibZip.hsc" #-}
c'ZIP_ER_WRONGPASSWD = 27
c'ZIP_ER_WRONGPASSWD :: (Num a) => a

{-# LINE 79 "Bindings/LibZip.hsc" #-}

-- type of system error value

c'ZIP_ET_NONE = 0
c'ZIP_ET_NONE :: (Num a) => a

{-# LINE 83 "Bindings/LibZip.hsc" #-}
c'ZIP_ET_SYS = 1
c'ZIP_ET_SYS :: (Num a) => a

{-# LINE 84 "Bindings/LibZip.hsc" #-}
c'ZIP_ET_ZLIB = 2
c'ZIP_ET_ZLIB :: (Num a) => a

{-# LINE 85 "Bindings/LibZip.hsc" #-}

-- compression methods

c'ZIP_CM_DEFAULT = -1
c'ZIP_CM_DEFAULT :: (Num a) => a

{-# LINE 89 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_STORE = 0
c'ZIP_CM_STORE :: (Num a) => a

{-# LINE 90 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_SHRINK = 1
c'ZIP_CM_SHRINK :: (Num a) => a

{-# LINE 91 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_REDUCE_1 = 2
c'ZIP_CM_REDUCE_1 :: (Num a) => a

{-# LINE 92 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_REDUCE_2 = 3
c'ZIP_CM_REDUCE_2 :: (Num a) => a

{-# LINE 93 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_REDUCE_3 = 4
c'ZIP_CM_REDUCE_3 :: (Num a) => a

{-# LINE 94 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_REDUCE_4 = 5
c'ZIP_CM_REDUCE_4 :: (Num a) => a

{-# LINE 95 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_IMPLODE = 6
c'ZIP_CM_IMPLODE :: (Num a) => a

{-# LINE 96 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_DEFLATE = 8
c'ZIP_CM_DEFLATE :: (Num a) => a

{-# LINE 97 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_DEFLATE64 = 9
c'ZIP_CM_DEFLATE64 :: (Num a) => a

{-# LINE 98 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_PKWARE_IMPLODE = 10
c'ZIP_CM_PKWARE_IMPLODE :: (Num a) => a

{-# LINE 99 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_BZIP2 = 12
c'ZIP_CM_BZIP2 :: (Num a) => a

{-# LINE 100 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_LZMA = 14
c'ZIP_CM_LZMA :: (Num a) => a

{-# LINE 101 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_TERSE = 18
c'ZIP_CM_TERSE :: (Num a) => a

{-# LINE 102 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_LZ77 = 19
c'ZIP_CM_LZ77 :: (Num a) => a

{-# LINE 103 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_WAVPACK = 97
c'ZIP_CM_WAVPACK :: (Num a) => a

{-# LINE 104 "Bindings/LibZip.hsc" #-}
c'ZIP_CM_PPMD = 98
c'ZIP_CM_PPMD :: (Num a) => a

{-# LINE 105 "Bindings/LibZip.hsc" #-}

-- encryption methods

c'ZIP_EM_NONE = 0
c'ZIP_EM_NONE :: (Num a) => a

{-# LINE 109 "Bindings/LibZip.hsc" #-}
c'ZIP_EM_TRAD_PKWARE = 1
c'ZIP_EM_TRAD_PKWARE :: (Num a) => a

{-# LINE 110 "Bindings/LibZip.hsc" #-}
c'ZIP_EM_UNKNOWN = 65535
c'ZIP_EM_UNKNOWN :: (Num a) => a

{-# LINE 111 "Bindings/LibZip.hsc" #-}

type C'zip_source_cmd = CUInt

{-# LINE 113 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_OPEN = 0
c'ZIP_SOURCE_OPEN :: (Num a) => a

{-# LINE 114 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_READ = 1
c'ZIP_SOURCE_READ :: (Num a) => a

{-# LINE 115 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_CLOSE = 2
c'ZIP_SOURCE_CLOSE :: (Num a) => a

{-# LINE 116 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_STAT = 3
c'ZIP_SOURCE_STAT :: (Num a) => a

{-# LINE 117 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_ERROR = 4
c'ZIP_SOURCE_ERROR :: (Num a) => a

{-# LINE 118 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_FREE = 5
c'ZIP_SOURCE_FREE :: (Num a) => a

{-# LINE 119 "Bindings/LibZip.hsc" #-}

-- typedef zip_int64_t (*zip_source_callback)(void *, void *, zip_uint64_t, enum zip_source_cmd);
type C'zip_source_callback = FunPtr (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong)
foreign import ccall "wrapper" mk'zip_source_callback
  :: (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong) -> IO C'zip_source_callback
foreign import ccall "dynamic" mK'zip_source_callback
  :: C'zip_source_callback -> (Ptr () -> Ptr () -> CULLong -> C'zip_source_cmd -> IO CULLong)

{-# LINE 122 "Bindings/LibZip.hsc" #-}

c'ZIP_SOURCE_ERR_LOWER = -2
c'ZIP_SOURCE_ERR_LOWER :: (Num a) => a

{-# LINE 124 "Bindings/LibZip.hsc" #-}

c'ZIP_STAT_NAME = 1
c'ZIP_STAT_NAME :: (Num a) => a

{-# LINE 126 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_INDEX = 2
c'ZIP_STAT_INDEX :: (Num a) => a

{-# LINE 127 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_SIZE = 4
c'ZIP_STAT_SIZE :: (Num a) => a

{-# LINE 128 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_COMP_SIZE = 8
c'ZIP_STAT_COMP_SIZE :: (Num a) => a

{-# LINE 129 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_MTIME = 16
c'ZIP_STAT_MTIME :: (Num a) => a

{-# LINE 130 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_CRC = 32
c'ZIP_STAT_CRC :: (Num a) => a

{-# LINE 131 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_COMP_METHOD = 64
c'ZIP_STAT_COMP_METHOD :: (Num a) => a

{-# LINE 132 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_ENCRYPTION_METHOD = 128
c'ZIP_STAT_ENCRYPTION_METHOD :: (Num a) => a

{-# LINE 133 "Bindings/LibZip.hsc" #-}
c'ZIP_STAT_FLAGS = 256
c'ZIP_STAT_FLAGS :: (Num a) => a

{-# LINE 134 "Bindings/LibZip.hsc" #-}

data C'time_t = C'time_t

{-# LINE 136 "Bindings/LibZip.hsc" #-}

-- 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 */
-- };

{-# LINE 150 "Bindings/LibZip.hsc" #-}

{-# LINE 151 "Bindings/LibZip.hsc" #-}

{-# LINE 152 "Bindings/LibZip.hsc" #-}

{-# LINE 153 "Bindings/LibZip.hsc" #-}

{-# LINE 154 "Bindings/LibZip.hsc" #-}

{-# LINE 155 "Bindings/LibZip.hsc" #-}

{-# LINE 156 "Bindings/LibZip.hsc" #-}

{-# LINE 157 "Bindings/LibZip.hsc" #-}

{-# LINE 158 "Bindings/LibZip.hsc" #-}

{-# LINE 159 "Bindings/LibZip.hsc" #-}

{-# LINE 160 "Bindings/LibZip.hsc" #-}
data C'zip_stat = C'zip_stat{
  c'zip_stat'valid :: CULLong,
  c'zip_stat'name :: Ptr CChar,
  c'zip_stat'index :: CULLong,
  c'zip_stat'size :: CULLong,
  c'zip_stat'comp_size :: CULLong,
  c'zip_stat'mtime :: CTime,
  c'zip_stat'crc :: CUInt,
  c'zip_stat'comp_method :: CUShort,
  c'zip_stat'encryption_method :: CUShort,
  c'zip_stat'flags :: CUInt
} deriving (Eq,Show)
p'zip_stat'valid p = plusPtr p 0
p'zip_stat'valid :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'name p = plusPtr p 8
p'zip_stat'name :: Ptr (C'zip_stat) -> Ptr (Ptr CChar)
p'zip_stat'index p = plusPtr p 12
p'zip_stat'index :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'size p = plusPtr p 20
p'zip_stat'size :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'comp_size p = plusPtr p 28
p'zip_stat'comp_size :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'mtime p = plusPtr p 36
p'zip_stat'mtime :: Ptr (C'zip_stat) -> Ptr (CTime)
p'zip_stat'crc p = plusPtr p 40
p'zip_stat'crc :: Ptr (C'zip_stat) -> Ptr (CUInt)
p'zip_stat'comp_method p = plusPtr p 44
p'zip_stat'comp_method :: Ptr (C'zip_stat) -> Ptr (CUShort)
p'zip_stat'encryption_method p = plusPtr p 46
p'zip_stat'encryption_method :: Ptr (C'zip_stat) -> Ptr (CUShort)
p'zip_stat'flags p = plusPtr p 48
p'zip_stat'flags :: Ptr (C'zip_stat) -> Ptr (CUInt)
instance Storable C'zip_stat where
  sizeOf _ = 52
  alignment _ = 4
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 12
    v3 <- peekByteOff p 20
    v4 <- peekByteOff p 28
    v5 <- peekByteOff p 36
    v6 <- peekByteOff p 40
    v7 <- peekByteOff p 44
    v8 <- peekByteOff p 46
    v9 <- peekByteOff p 48
    return $ C'zip_stat v0 v1 v2 v3 v4 v5 v6 v7 v8 v9
  poke p (C'zip_stat v0 v1 v2 v3 v4 v5 v6 v7 v8 v9) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 12 v2
    pokeByteOff p 20 v3
    pokeByteOff p 28 v4
    pokeByteOff p 36 v5
    pokeByteOff p 40 v6
    pokeByteOff p 44 v7
    pokeByteOff p 46 v8
    pokeByteOff p 48 v9
    return ()

{-# LINE 161 "Bindings/LibZip.hsc" #-}

-- 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)"

foreign import ccall "zip_add" c'zip_add
  :: Ptr C'zip -> CString -> Ptr C'zip_source -> IO (CLLong)
foreign import ccall "&zip_add" p'zip_add
  :: FunPtr (Ptr C'zip -> CString -> Ptr C'zip_source -> IO (CLLong))

{-# LINE 177 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_add_dir" c'zip_add_dir
  :: Ptr C'zip -> CString -> IO (CLLong)
foreign import ccall "&zip_add_dir" p'zip_add_dir
  :: FunPtr (Ptr C'zip -> CString -> IO (CLLong))

{-# LINE 178 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_close" c'zip_close
  :: Ptr C'zip -> IO (CInt)
foreign import ccall "&zip_close" p'zip_close
  :: FunPtr (Ptr C'zip -> IO (CInt))

{-# LINE 179 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_delete" c'zip_delete
  :: Ptr C'zip -> CULLong -> IO (CInt)
foreign import ccall "&zip_delete" p'zip_delete
  :: FunPtr (Ptr C'zip -> CULLong -> IO (CInt))

{-# LINE 180 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_error_clear" c'zip_error_clear
  :: Ptr C'zip -> IO ()
foreign import ccall "&zip_error_clear" p'zip_error_clear
  :: FunPtr (Ptr C'zip -> IO ())

{-# LINE 181 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_error_get" c'zip_error_get
  :: Ptr C'zip -> Ptr CInt -> Ptr CInt -> IO ()
foreign import ccall "&zip_error_get" p'zip_error_get
  :: FunPtr (Ptr C'zip -> Ptr CInt -> Ptr CInt -> IO ())

{-# LINE 182 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_error_get_sys_type" c'zip_error_get_sys_type
  :: CInt -> IO (CInt)
foreign import ccall "&zip_error_get_sys_type" p'zip_error_get_sys_type
  :: FunPtr (CInt -> IO (CInt))

{-# LINE 183 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_error_to_str" c'zip_error_to_str
  :: Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt)
foreign import ccall "&zip_error_to_str" p'zip_error_to_str
  :: FunPtr (Ptr CChar -> CULLong -> CInt -> CInt -> IO (CInt))

{-# LINE 184 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fclose" c'zip_fclose
  :: Ptr C'zip_file -> IO (CInt)
foreign import ccall "&zip_fclose" p'zip_fclose
  :: FunPtr (Ptr C'zip_file -> IO (CInt))

{-# LINE 185 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fdopen" c'zip_fdopen
  :: CInt -> CInt -> Ptr CInt -> IO (Ptr C'zip)
foreign import ccall "&zip_fdopen" p'zip_fdopen
  :: FunPtr (CInt -> CInt -> Ptr CInt -> IO (Ptr C'zip))

{-# LINE 186 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_error_clear" c'zip_file_error_clear
  :: Ptr C'zip_file -> IO ()
foreign import ccall "&zip_file_error_clear" p'zip_file_error_clear
  :: FunPtr (Ptr C'zip_file -> IO ())

{-# LINE 187 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_error_get" c'zip_file_error_get
  :: Ptr C'zip_file -> Ptr CInt -> Ptr CInt -> IO ()
foreign import ccall "&zip_file_error_get" p'zip_file_error_get
  :: FunPtr (Ptr C'zip_file -> Ptr CInt -> Ptr CInt -> IO ())

{-# LINE 188 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_strerror" c'zip_file_strerror
  :: Ptr C'zip_file -> IO (CString)
foreign import ccall "&zip_file_strerror" p'zip_file_strerror
  :: FunPtr (Ptr C'zip_file -> IO (CString))

{-# LINE 189 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fopen" c'zip_fopen
  :: Ptr C'zip -> CString -> CInt -> IO (Ptr C'zip_file)
foreign import ccall "&zip_fopen" p'zip_fopen
  :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (Ptr C'zip_file))

{-# LINE 190 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fopen_encrypted" c'zip_fopen_encrypted
  :: Ptr C'zip -> CString -> CInt -> CString -> IO (Ptr C'zip_file)
foreign import ccall "&zip_fopen_encrypted" p'zip_fopen_encrypted
  :: FunPtr (Ptr C'zip -> CString -> CInt -> CString -> IO (Ptr C'zip_file))

{-# LINE 191 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fopen_index" c'zip_fopen_index
  :: Ptr C'zip -> CULLong -> CInt -> IO (Ptr C'zip_file)
foreign import ccall "&zip_fopen_index" p'zip_fopen_index
  :: FunPtr (Ptr C'zip -> CULLong -> CInt -> IO (Ptr C'zip_file))

{-# LINE 192 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fopen_index_encrypted" c'zip_fopen_index_encrypted
  :: Ptr C'zip -> CULLong -> CInt -> CString -> IO (Ptr C'zip_file)
foreign import ccall "&zip_fopen_index_encrypted" p'zip_fopen_index_encrypted
  :: FunPtr (Ptr C'zip -> CULLong -> CInt -> CString -> IO (Ptr C'zip_file))

{-# LINE 193 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fread" c'zip_fread
  :: Ptr C'zip_file -> Ptr () -> CULLong -> IO (CLLong)
foreign import ccall "&zip_fread" p'zip_fread
  :: FunPtr (Ptr C'zip_file -> Ptr () -> CULLong -> IO (CLLong))

{-# LINE 194 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_archive_comment" c'zip_get_archive_comment
  :: Ptr C'zip -> Ptr CInt -> CInt -> IO (CString)
foreign import ccall "&zip_get_archive_comment" p'zip_get_archive_comment
  :: FunPtr (Ptr C'zip -> Ptr CInt -> CInt -> IO (CString))

{-# LINE 195 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_archive_flag" c'zip_get_archive_flag
  :: Ptr C'zip -> CInt -> CInt -> IO (CInt)
foreign import ccall "&zip_get_archive_flag" p'zip_get_archive_flag
  :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (CInt))

{-# LINE 196 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_file_comment" c'zip_get_file_comment
  :: Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString)
foreign import ccall "&zip_get_file_comment" p'zip_get_file_comment
  :: FunPtr (Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString))

{-# LINE 197 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_file_extra" c'zip_get_file_extra
  :: Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString)
foreign import ccall "&zip_get_file_extra" p'zip_get_file_extra
  :: FunPtr (Ptr C'zip -> CULLong -> Ptr CInt -> CInt -> IO (CString))

{-# LINE 198 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_name" c'zip_get_name
  :: Ptr C'zip -> CULLong -> CInt -> IO (CString)
foreign import ccall "&zip_get_name" p'zip_get_name
  :: FunPtr (Ptr C'zip -> CULLong -> CInt -> IO (CString))

{-# LINE 199 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_num_entries" c'zip_get_num_entries
  :: Ptr C'zip -> CInt -> IO (CULLong)
foreign import ccall "&zip_get_num_entries" p'zip_get_num_entries
  :: FunPtr (Ptr C'zip -> CInt -> IO (CULLong))

{-# LINE 200 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_num_files" c'zip_get_num_files
  :: Ptr C'zip -> IO (CInt)
foreign import ccall "&zip_get_num_files" p'zip_get_num_files
  :: FunPtr (Ptr C'zip -> IO (CInt))

{-# LINE 201 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_name_locate" c'zip_name_locate
  :: Ptr C'zip -> CString -> CInt -> IO (CInt)
foreign import ccall "&zip_name_locate" p'zip_name_locate
  :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (CInt))

{-# LINE 202 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_open" c'zip_open
  :: CString -> CInt -> Ptr CInt -> IO (Ptr C'zip)
foreign import ccall "&zip_open" p'zip_open
  :: FunPtr (CString -> CInt -> Ptr CInt -> IO (Ptr C'zip))

{-# LINE 203 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_rename" c'zip_rename
  :: Ptr C'zip -> CULLong -> CString -> IO (CInt)
foreign import ccall "&zip_rename" p'zip_rename
  :: FunPtr (Ptr C'zip -> CULLong -> CString -> IO (CInt))

{-# LINE 204 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_replace" c'zip_replace
  :: Ptr C'zip -> CULLong -> Ptr C'zip_source -> IO (CInt)
foreign import ccall "&zip_replace" p'zip_replace
  :: FunPtr (Ptr C'zip -> CULLong -> Ptr C'zip_source -> IO (CInt))

{-# LINE 205 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_set_archive_comment" c'zip_set_archive_comment
  :: Ptr C'zip -> CString -> CInt -> IO (CInt)
foreign import ccall "&zip_set_archive_comment" p'zip_set_archive_comment
  :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (CInt))

{-# LINE 206 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_set_archive_flag" c'zip_set_archive_flag
  :: Ptr C'zip -> CInt -> CInt -> IO (CInt)
foreign import ccall "&zip_set_archive_flag" p'zip_set_archive_flag
  :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (CInt))

{-# LINE 207 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_set_default_password" c'zip_set_default_password
  :: Ptr C'zip -> CString -> IO (CInt)
foreign import ccall "&zip_set_default_password" p'zip_set_default_password
  :: FunPtr (Ptr C'zip -> CString -> IO (CInt))

{-# LINE 208 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_set_file_comment" c'zip_set_file_comment
  :: Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt)
foreign import ccall "&zip_set_file_comment" p'zip_set_file_comment
  :: FunPtr (Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt))

{-# LINE 209 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_set_file_extra" c'zip_set_file_extra
  :: Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt)
foreign import ccall "&zip_set_file_extra" p'zip_set_file_extra
  :: FunPtr (Ptr C'zip -> CULLong -> CString -> CInt -> IO (CInt))

{-# LINE 210 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_buffer" c'zip_source_buffer
  :: Ptr C'zip -> Ptr () -> CULLong -> CInt -> IO (Ptr C'zip_source)
foreign import ccall "&zip_source_buffer" p'zip_source_buffer
  :: FunPtr (Ptr C'zip -> Ptr () -> CULLong -> CInt -> IO (Ptr C'zip_source))

{-# LINE 211 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_file" c'zip_source_file
  :: Ptr C'zip -> CString -> CULLong -> CLLong -> IO (Ptr C'zip_source)
foreign import ccall "&zip_source_file" p'zip_source_file
  :: FunPtr (Ptr C'zip -> CString -> CULLong -> CLLong -> IO (Ptr C'zip_source))

{-# LINE 212 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_filep" c'zip_source_filep
  :: Ptr C'zip -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr C'zip_source)
foreign import ccall "&zip_source_filep" p'zip_source_filep
  :: FunPtr (Ptr C'zip -> Ptr CFile -> CULLong -> CLLong -> IO (Ptr C'zip_source))

{-# LINE 213 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_free" c'zip_source_free
  :: Ptr C'zip_source -> IO ()
foreign import ccall "&zip_source_free" p'zip_source_free
  :: FunPtr (Ptr C'zip_source -> IO ())

{-# LINE 214 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_function" c'zip_source_function
  :: Ptr C'zip -> C'zip_source_callback -> Ptr () -> IO (Ptr C'zip_source)
foreign import ccall "&zip_source_function" p'zip_source_function
  :: FunPtr (Ptr C'zip -> C'zip_source_callback -> Ptr () -> IO (Ptr C'zip_source))

{-# LINE 215 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_zip" c'zip_source_zip
  :: Ptr C'zip -> Ptr C'zip -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr C'zip_source)
foreign import ccall "&zip_source_zip" p'zip_source_zip
  :: FunPtr (Ptr C'zip -> Ptr C'zip -> CULLong -> CInt -> CULLong -> CLLong -> IO (Ptr C'zip_source))

{-# LINE 216 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_stat" c'zip_stat
  :: Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO (CInt)
foreign import ccall "&zip_stat" p'zip_stat
  :: FunPtr (Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO (CInt))

{-# LINE 217 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_stat_index" c'zip_stat_index
  :: Ptr C'zip -> CULLong -> CInt -> Ptr C'zip_stat -> IO (CInt)
foreign import ccall "&zip_stat_index" p'zip_stat_index
  :: FunPtr (Ptr C'zip -> CULLong -> CInt -> Ptr C'zip_stat -> IO (CInt))

{-# LINE 218 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_stat_init" c'zip_stat_init
  :: Ptr C'zip_stat -> IO ()
foreign import ccall "&zip_stat_init" p'zip_stat_init
  :: FunPtr (Ptr C'zip_stat -> IO ())

{-# LINE 219 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_strerror" c'zip_strerror
  :: Ptr C'zip -> IO (CString)
foreign import ccall "&zip_strerror" p'zip_strerror
  :: FunPtr (Ptr C'zip -> IO (CString))

{-# LINE 220 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_unchange" c'zip_unchange
  :: Ptr C'zip -> CULLong -> IO (CInt)
foreign import ccall "&zip_unchange" p'zip_unchange
  :: FunPtr (Ptr C'zip -> CULLong -> IO (CInt))

{-# LINE 221 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_unchange_all" c'zip_unchange_all
  :: Ptr C'zip -> IO (CInt)
foreign import ccall "&zip_unchange_all" p'zip_unchange_all
  :: FunPtr (Ptr C'zip -> IO (CInt))

{-# LINE 222 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_unchange_archive" c'zip_unchange_archive
  :: Ptr C'zip -> IO (CInt)
foreign import ccall "&zip_unchange_archive" p'zip_unchange_archive
  :: FunPtr (Ptr C'zip -> IO (CInt))

{-# LINE 223 "Bindings/LibZip.hsc" #-}