Skip to content

Commit

Permalink
archive: declare struct archiver where it's needed
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Rene Scharfe authored and gitster committed Jul 26, 2008
1 parent 7f4d051 commit f15f736
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 5 additions & 1 deletion archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ static const char archive_usage[] = \

#define USES_ZLIB_COMPRESSION 1

const struct archiver archivers[] = {
const struct archiver {
const char *name;
write_archive_fn_t write_archive;
unsigned int flags;
} archivers[] = {
{ "tar", write_tar_archive },
{ "zip", write_zip_archive, USES_ZLIB_COMPRESSION },
};
Expand Down
6 changes: 0 additions & 6 deletions archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ typedef int (*write_archive_fn_t)(struct archiver_args *);

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

struct archiver {
const char *name;
write_archive_fn_t write_archive;
unsigned int flags;
};

/*
* Archive-format specific backends.
*/
Expand Down

0 comments on commit f15f736

Please sign in to comment.