archive: declare struct archiver where it's needed
Move the declaration of struct archiver to archive.c, as this is the only file left where it is used. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rene Scharfe committed
Jul 25, 2008 at 12:41 UTC
f15f736d38d10f5c4f2ca367565019bdfe8e71dd
2 files changed
+5
-7
archive.c
+5
-1
@@ -9,7 +9,11 @@ static const char archive_usage[] = \
9
10
#define USES_ZLIB_COMPRESSION 1
11
12
-const struct archiver archivers[] = {
12
+const struct archiver {
13
+ const char *name;
14
+ write_archive_fn_t write_archive;
15
+ unsigned int flags;
16
+} archivers[] = {
17
{ "tar", write_tar_archive },
18
{ "zip", write_zip_archive, USES_ZLIB_COMPRESSION },
19
};
archive.h
-6
@@ -17,12 +17,6 @@ typedef int (*write_archive_fn_t)(struct archiver_args *);
17
18
typedef int (*write_archive_entry_fn_t)(struct archiver_args *args, const unsigned char *sha1, const char *path, size_t pathlen, unsigned int mode, void *buffer, unsigned long size);
19
20
-struct archiver {
21
- const char *name;
22
- write_archive_fn_t write_archive;
23
- unsigned int flags;
24
-};
25
-
20
/*
21
* Archive-format specific backends.
22
*/