move struct got_zstream_buf to private header zb.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
diff --git a/include/got_object.h b/include/got_object.h
index 7926d57..12c26ba 100644
--- a/include/got_object.h
+++ b/include/got_object.h
@@ -14,16 +14,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-struct got_zstream_buf {
- z_stream z;
- char *inbuf;
- size_t inlen;
- char *outbuf;
- size_t outlen;
- int flags;
-#define GOT_ZSTREAM_F_HAVE_MORE 0x01
-};
-
struct got_object_id {
u_int8_t sha1[SHA1_DIGEST_LENGTH];
};
diff --git a/lib/object.c b/lib/object.c
index d9ff8c0..9e483cc 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -32,8 +32,8 @@
#include "got_sha1.h"
#include "pack.h"
#include "delta.h"
-#include "object.h"
#include "zb.h"
+#include "object.h"
#ifndef MIN
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))
diff --git a/lib/pack.c b/lib/pack.c
index 3098ee5..5d17581 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -36,8 +36,8 @@
#include "pack.h"
#include "path.h"
#include "delta.h"
-#include "object.h"
#include "zb.h"
+#include "object.h"
#define GOT_PACK_PREFIX "pack-"
#define GOT_PACKFILE_SUFFIX ".pack"
diff --git a/lib/zb.h b/lib/zb.h
index 0796cc6..083cd85 100644
--- a/lib/zb.h
+++ b/lib/zb.h
@@ -14,6 +14,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+struct got_zstream_buf {
+ z_stream z;
+ char *inbuf;
+ size_t inlen;
+ char *outbuf;
+ size_t outlen;
+ int flags;
+#define GOT_ZSTREAM_F_HAVE_MORE 0x01
+};
+
const struct got_error *got_inflate_init(struct got_zstream_buf *, size_t);
const struct got_error *got_inflate_read(struct got_zstream_buf *, FILE *,
size_t *);