@@ -36,13 +36,15 @@ const char *archive_format_from_filename(const char *filename);
/* archive backend stuff */
-#define ARCHIVER_WANT_COMPRESSION_LEVELS 1
-#define ARCHIVER_REMOTE 2
-#define ARCHIVER_HIGH_COMPRESSION_LEVELS 4
+enum archiver_flags {
+ ARCHIVER_WANT_COMPRESSION_LEVELS = 1<<0,
+ ARCHIVER_REMOTE = 1<<1,
+ ARCHIVER_HIGH_COMPRESSION_LEVELS = 1<<2,
+};
struct archiver {
const char *name;
int (*write_archive)(const struct archiver *, struct archiver_args *);
- unsigned flags;
+ enum archiver_flags flags;
char *filter_command;
};
void register_archiver(struct archiver *);
Refactor the "#define" pattern in the archiver.h to use a new "enum archiver_flags". This isn't a functional change, but will make adding new flags in a subsequent commit easier to reason about. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- archive.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)