From ed02819deb98c8eafe94c9eedc3e9f00e07ea9cc Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Fri, 3 May 2013 22:10:48 +0200 Subject: Introduce settings structure. No more passing particular options (like git or mtime) to functions. The structure is meant to be immutable after filling during startup. --- metaentry.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'metaentry.h') diff --git a/metaentry.h b/metaentry.h index 3b2f2a1..bd80bc4 100644 --- a/metaentry.h +++ b/metaentry.h @@ -20,6 +20,8 @@ #include +#include "settings.h" + /* Data structure to hold all metadata for a file/dir */ struct metaentry { struct metaentry *next; /* For the metahash chains */ @@ -52,7 +54,7 @@ struct metahash { struct metaentry *mentry_create(const char *path); /* Recurses opath and adds metadata entries to the metaentry list */ -void mentries_recurse_path(const char *opath, struct metahash **mhash, bool git); +void mentries_recurse_path(const char *opath, struct metahash **mhash, msettings *st); /* Stores a metaentry list to a file */ void mentries_tofile(const struct metahash *mhash, const char *path); @@ -78,7 +80,7 @@ int mentry_find_xattr(struct metaentry *haystack, /* Compares two metaentries and returns an int with a bitmask of differences */ int mentry_compare(struct metaentry *left, struct metaentry *right, - bool do_mtime); + msettings *st); /* Compares lists of real and stored metadata and calls pfunc for each */ void mentries_compare(struct metahash *mhashreal, @@ -86,5 +88,5 @@ void mentries_compare(struct metahash *mhashreal, void (*pfunc)(struct metaentry *real, struct metaentry *stored, int cmp), - bool do_mtime); + msettings *st); -- cgit v1.2.1