summaryrefslogtreecommitdiff
path: root/metaentry.h
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemoc@gmail.com>2013-05-03 22:10:48 +0200
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>2013-05-03 22:10:48 +0200
commited02819deb98c8eafe94c9eedc3e9f00e07ea9cc (patch)
tree3b26ea22e8f46ab9799cf20382af0e60403f441a /metaentry.h
parent049757c1ce8bbd93e3c55897e77ed30318da8c93 (diff)
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.
Diffstat (limited to 'metaentry.h')
-rw-r--r--metaentry.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/metaentry.h b/metaentry.h
index 3b2f2a1..bd80bc4 100644
--- a/metaentry.h
+++ b/metaentry.h
@@ -20,6 +20,8 @@
#include <stdbool.h>
+#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);