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



-- | This module provides automatic low-level bindings to @libzip@
-- library, version 1.0. See also:
--
--   * @libzip@ documention: <http://nih.at/libzip/libzip.html> and @zip.h@
--
--   * @bindings-DSL@ documentation:
--     <https://github.com/jwiegley/bindings-dsl>
--
-- Higher-level interface is provided by a separate LibZip package:
--
--   * <http://hackage.haskell.org/package/LibZip>
--
-- Note: this is the first version to support libzip 1.0 and it lacks
-- support for some of the new libzip functions. Contributions are welcome.


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 22 "Bindings/LibZip.hsc" #-}

type C'zip_flags_t = CUInt

{-# 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" #-}
c'ZIP_TRUNCATE = 8
c'ZIP_TRUNCATE :: (Num a) => a

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

{-# LINE 32 "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 36 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_NODIR = 2
c'ZIP_FL_NODIR :: (Num a) => a

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

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

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

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

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

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

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

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

{-# LINE 45 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_CENTRAL = 512
c'ZIP_FL_CENTRAL :: (Num a) => a

{-# LINE 46 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_ENC_UTF_8 = 2048
c'ZIP_FL_ENC_UTF_8 :: (Num a) => a

{-# LINE 47 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_ENC_CP437 = 4096
c'ZIP_FL_ENC_CP437 :: (Num a) => a

{-# LINE 48 "Bindings/LibZip.hsc" #-}
c'ZIP_FL_OVERWRITE = 8192
c'ZIP_FL_OVERWRITE :: (Num a) => a

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


-- archive global flags flags

c'ZIP_AFL_RDONLY = 2
c'ZIP_AFL_RDONLY :: (Num a) => a

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

-- new extra field

c'ZIP_EXTRA_FIELD_ALL = 65535
c'ZIP_EXTRA_FIELD_ALL :: (Num a) => a

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

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

-- libzip error codes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-- type of system error value

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

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

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

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

-- compression methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-- encryption methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type C'zip_source_cmd = CUInt

{-# LINE 148 "Bindings/LibZip.hsc" #-}
type C'zip_source_cmd_t = C'zip_source_cmd

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

c'ZIP_SOURCE_SUPPORTS_READABLE = 63
c'ZIP_SOURCE_SUPPORTS_READABLE :: (Num a) => a

{-# LINE 167 "Bindings/LibZip.hsc" #-}
c'ZIP_SOURCE_SUPPORTS_SEEKABLE = 16639
c'ZIP_SOURCE_SUPPORTS_SEEKABLE :: (Num a) => a

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

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

-- /* for use by sources */
-- struct zip_source_args_seek {
--     zip_int64_t offset;
--     int whence;
-- };

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

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

{-# LINE 178 "Bindings/LibZip.hsc" #-}
data C'zip_source_args_seek = C'zip_source_args_seek{
  c'zip_source_args_seek'offset :: CLLong,
  c'zip_source_args_seek'whence :: CInt
} deriving (Eq,Show)
p'zip_source_args_seek'offset p = plusPtr p 0
p'zip_source_args_seek'offset :: Ptr (C'zip_source_args_seek) -> Ptr (CLLong)
p'zip_source_args_seek'whence p = plusPtr p 8
p'zip_source_args_seek'whence :: Ptr (C'zip_source_args_seek) -> Ptr (CInt)
instance Storable C'zip_source_args_seek where
  sizeOf _ = 16
  alignment _ = 8
  peek _p = do
    v0 <- peekByteOff _p 0
    v1 <- peekByteOff _p 8
    return $ C'zip_source_args_seek v0 v1
  poke _p (C'zip_source_args_seek v0 v1) = do
    pokeByteOff _p 0 v0
    pokeByteOff _p 8 v1
    return ()

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

type C'zip_source_args_seek_t = C'zip_source_args_seek

{-# LINE 181 "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 184 "Bindings/LibZip.hsc" #-}

-- /* error information */
-- /* use zip_error_*() to access */
-- struct zip_error {
--     int zip_err;	/* libzip error code (ZIP_ER_*) */
--     int sys_err;	/* copy of errno (E*) or zlib error code */
--     char *str;		/* string representation or NULL */
-- };

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

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

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

{-# LINE 196 "Bindings/LibZip.hsc" #-}
data C'zip_error = C'zip_error{
  c'zip_error'zip_err :: CInt,
  c'zip_error'sys_err :: CInt,
  c'zip_error'str :: CString
} deriving (Eq,Show)
p'zip_error'zip_err p = plusPtr p 0
p'zip_error'zip_err :: Ptr (C'zip_error) -> Ptr (CInt)
p'zip_error'sys_err p = plusPtr p 4
p'zip_error'sys_err :: Ptr (C'zip_error) -> Ptr (CInt)
p'zip_error'str p = plusPtr p 8
p'zip_error'str :: Ptr (C'zip_error) -> Ptr (CString)
instance Storable C'zip_error where
  sizeOf _ = 16
  alignment _ = 8
  peek _p = do
    v0 <- peekByteOff _p 0
    v1 <- peekByteOff _p 4
    v2 <- peekByteOff _p 8
    return $ C'zip_error v0 v1 v2
  poke _p (C'zip_error v0 v1 v2) = do
    pokeByteOff _p 0 v0
    pokeByteOff _p 4 v1
    pokeByteOff _p 8 v2
    return ()

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

data C'zip = C'zip

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

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

{-# LINE 201 "Bindings/LibZip.hsc" #-}
type C'zip_t = C'zip

{-# LINE 202 "Bindings/LibZip.hsc" #-}
type C'zip_error_t = C'zip_error

{-# LINE 203 "Bindings/LibZip.hsc" #-}
type C'zip_file_t = C'zip_file

{-# LINE 204 "Bindings/LibZip.hsc" #-}
type C'zip_source_t = C'zip_source

{-# LINE 205 "Bindings/LibZip.hsc" #-}
type C'zip_stat_t = C'zip_stat

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

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

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

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

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

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

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

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

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

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

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

data C'time_t = C'time_t

{-# LINE 218 "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 232 "Bindings/LibZip.hsc" #-}

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

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

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

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

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

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

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

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

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

{-# LINE 242 "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 16
p'zip_stat'index :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'size p = plusPtr p 24
p'zip_stat'size :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'comp_size p = plusPtr p 32
p'zip_stat'comp_size :: Ptr (C'zip_stat) -> Ptr (CULLong)
p'zip_stat'mtime p = plusPtr p 40
p'zip_stat'mtime :: Ptr (C'zip_stat) -> Ptr (CTime)
p'zip_stat'crc p = plusPtr p 48
p'zip_stat'crc :: Ptr (C'zip_stat) -> Ptr (CUInt)
p'zip_stat'comp_method p = plusPtr p 52
p'zip_stat'comp_method :: Ptr (C'zip_stat) -> Ptr (CUShort)
p'zip_stat'encryption_method p = plusPtr p 54
p'zip_stat'encryption_method :: Ptr (C'zip_stat) -> Ptr (CUShort)
p'zip_stat'flags p = plusPtr p 56
p'zip_stat'flags :: Ptr (C'zip_stat) -> Ptr (CUInt)
instance Storable C'zip_stat where
  sizeOf _ = 64
  alignment _ = 8
  peek _p = do
    v0 <- peekByteOff _p 0
    v1 <- peekByteOff _p 8
    v2 <- peekByteOff _p 16
    v3 <- peekByteOff _p 24
    v4 <- peekByteOff _p 32
    v5 <- peekByteOff _p 40
    v6 <- peekByteOff _p 48
    v7 <- peekByteOff _p 52
    v8 <- peekByteOff _p 54
    v9 <- peekByteOff _p 56
    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 16 v2
    pokeByteOff _p 24 v3
    pokeByteOff _p 32 v4
    pokeByteOff _p 40 v5
    pokeByteOff _p 48 v6
    pokeByteOff _p 52 v7
    pokeByteOff _p 54 v8
    pokeByteOff _p 56 v9
    return ()

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

-- make every declaration one-line, and replace
--    ZIP_EXTERN ->
--    \/\*.*$ ->
--    const char * -> CString
--    char * -> Ptr CChar
--    struct foo * -> Ptr <foo>
--    (with regexp: struct \([a-z0-9_]*\) \* -> Ptr <\1> )
--    FILE -> CFile
--    int -> CInt
--    zip_uint8_t -> CUChar
--    zip_int16_t -> CShort
--    zip_uint16_t -> CUShort
--    zip_int32_t -> CInt
--    zip_uint32_t -> CUInt
--    zip_int64_t -> CLLong
--    zip_uint64_t -> CULLong
--    void -> ()
--    const ->
--    zip_source_callback -> <zip_source_callback>
--    foo * -> Ptr foo   -- with regexps
--    regexp-replace "\(.*\)\(zip_[a-z0-9_]+\)(\(.*\));" "#ccall \2 , \3 -> IO (\1)"

-- deprecated API

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 269 "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 270 "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 271 "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 272 "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 273 "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 274 "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 275 "Bindings/LibZip.hsc" #-}

-- deprecated since 1.0
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 278 "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 279 "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 280 "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 281 "Bindings/LibZip.hsc" #-}

-- the rest of the API
-- TODO: add new functions which appeared in 1.0

foreign import ccall "zip_archive_set_tempdir" c'zip_archive_set_tempdir
  :: Ptr C'zip -> CString -> IO (CInt)
foreign import ccall "&zip_archive_set_tempdir" p'zip_archive_set_tempdir
  :: FunPtr (Ptr C'zip -> CString -> IO (CInt))

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

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

{-# LINE 288 "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 289 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_discard" c'zip_discard
  :: Ptr C'zip -> IO ()
foreign import ccall "&zip_discard" p'zip_discard
  :: FunPtr (Ptr C'zip -> IO ())

{-# LINE 290 "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 291 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_extra_field_delete" c'zip_file_extra_field_delete
  :: Ptr C'zip -> CULLong -> CUShort -> C'zip_flags_t -> IO (CInt)
foreign import ccall "&zip_file_extra_field_delete" p'zip_file_extra_field_delete
  :: FunPtr (Ptr C'zip -> CULLong -> CUShort -> C'zip_flags_t -> IO (CInt))

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

{-# LINE 293 "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 294 "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 295 "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 296 "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 297 "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 298 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_fopen" c'zip_fopen
  :: Ptr C'zip -> CString -> C'zip_flags_t -> IO (Ptr C'zip_file)
foreign import ccall "&zip_fopen" p'zip_fopen
  :: FunPtr (Ptr C'zip -> CString -> C'zip_flags_t -> IO (Ptr C'zip_file))

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

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

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

{-# LINE 302 "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 303 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_get_archive_comment" c'zip_get_archive_comment
  :: Ptr C'zip -> Ptr CInt -> C'zip_flags_t -> IO (CString)
foreign import ccall "&zip_get_archive_comment" p'zip_get_archive_comment
  :: FunPtr (Ptr C'zip -> Ptr CInt -> C'zip_flags_t -> IO (CString))

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

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

{-# LINE 306 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_extra_field_get" c'zip_file_extra_field_get
  :: Ptr C'zip -> CULLong -> CUShort -> Ptr CUShort -> Ptr CUShort -> C'zip_flags_t -> IO (Ptr CUChar)
foreign import ccall "&zip_file_extra_field_get" p'zip_file_extra_field_get
  :: FunPtr (Ptr C'zip -> CULLong -> CUShort -> Ptr CUShort -> Ptr CUShort -> C'zip_flags_t -> IO (Ptr CUChar))

{-# LINE 307 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_extra_field_get_by_id" c'zip_file_extra_field_get_by_id
  :: Ptr C'zip -> CULLong -> CUShort -> CUShort -> Ptr CUShort -> C'zip_flags_t -> IO (Ptr CUChar)
foreign import ccall "&zip_file_extra_field_get_by_id" p'zip_file_extra_field_get_by_id
  :: FunPtr (Ptr C'zip -> CULLong -> CUShort -> CUShort -> Ptr CUShort -> C'zip_flags_t -> IO (Ptr CUChar))

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

{-# LINE 309 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_extra_fields_count_by_id" c'zip_file_extra_fields_count_by_id
  :: Ptr C'zip -> CULLong -> CUShort -> C'zip_flags_t -> IO (CShort)
foreign import ccall "&zip_file_extra_fields_count_by_id" p'zip_file_extra_fields_count_by_id
  :: FunPtr (Ptr C'zip -> CULLong -> CUShort -> C'zip_flags_t -> IO (CShort))

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

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

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

{-# LINE 313 "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 314 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_rename" c'zip_file_rename
  :: Ptr C'zip -> CULLong -> CString -> C'zip_flags_t -> IO (CInt)
foreign import ccall "&zip_file_rename" p'zip_file_rename
  :: FunPtr (Ptr C'zip -> CULLong -> CString -> C'zip_flags_t -> IO (CInt))

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

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

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

{-# LINE 318 "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 319 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_file_set_comment" c'zip_file_set_comment
  :: Ptr C'zip -> CULLong -> CString -> CUShort -> C'zip_flags_t -> IO (CInt)
foreign import ccall "&zip_file_set_comment" p'zip_file_set_comment
  :: FunPtr (Ptr C'zip -> CULLong -> CString -> CUShort -> C'zip_flags_t -> IO (CInt))

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

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

{-# LINE 322 "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 323 "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 324 "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 325 "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 326 "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 327 "Bindings/LibZip.hsc" #-}
foreign import ccall "zip_source_zip" c'zip_source_zip
  :: Ptr C'zip -> Ptr C'zip -> CULLong -> C'zip_flags_t -> 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 -> C'zip_flags_t -> CULLong -> CLLong -> IO (Ptr C'zip_source))

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

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

{-# LINE 330 "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 331 "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 332 "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 333 "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 334 "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 335 "Bindings/LibZip.hsc" #-}