Makefile: use `git ls-files` to list header files, if possible
[git/raj.git] / sha1-array.h
blob55d016c4bf7bf56936f034b7550996d1b7ca6473
1 #ifndef SHA1_ARRAY_H
2 #define SHA1_ARRAY_H
4 struct oid_array {
5 struct object_id *oid;
6 int nr;
7 int alloc;
8 int sorted;
9 };
11 #define OID_ARRAY_INIT { NULL, 0, 0, 0 }
13 void oid_array_append(struct oid_array *array, const struct object_id *oid);
14 int oid_array_lookup(struct oid_array *array, const struct object_id *oid);
15 void oid_array_clear(struct oid_array *array);
17 typedef int (*for_each_oid_fn)(const struct object_id *oid,
18 void *data);
19 int oid_array_for_each(struct oid_array *array,
20 for_each_oid_fn fn,
21 void *data);
22 int oid_array_for_each_unique(struct oid_array *array,
23 for_each_oid_fn fn,
24 void *data);
25 void oid_array_filter(struct oid_array *array,
26 for_each_oid_fn want,
27 void *cbdata);
29 #endif /* SHA1_ARRAY_H */