* Improve the way we create bootcd, livecd and bootcdregtest. The effort results...
[reactos.git] / reactos / tools / cdmake / dirhash.h
1 #ifndef _REACTOS_TOOLS_CDMAKE_DIRHASH_H_
2 #define _REACTOS_TOOLS_CDMAKE_DIRHASH_H_
3
4 #define NUM_DIR_HASH_BUCKETS 1024
5
6 struct target_file {
7 struct target_file *next;
8 char *source_name;
9 char *target_name;
10 };
11
12 struct target_dir_entry {
13 struct target_dir_entry *next;
14 struct target_dir_entry *parent;
15 struct target_dir_entry *child;
16 struct target_file *head;
17 char *normalized_name;
18 char *case_name;
19 };
20
21 struct target_dir_hash {
22 struct target_dir_entry *buckets[NUM_DIR_HASH_BUCKETS];
23 struct target_dir_entry root;
24 };
25
26 struct target_dir_traversal {
27 struct target_dir_entry *it;
28 int i;
29 };
30
31 void normalize_dirname(char *filename);
32 void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const char *target);
33 struct target_dir_entry *
34 dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm);
35 struct target_dir_entry *dir_hash_next_dir(struct target_dir_hash *dh, struct target_dir_traversal *t);
36 void dir_hash_destroy(struct target_dir_hash *dh);
37
38 #endif//_REACTOS_TOOLS_CDMAKE_DIRHASH_H_