/** Command line and config file options. */
struct gengetopt_args_info conf;
-/** Global dir count. */
-uint64_t num_dirs = 0;
-/** Global files count. */
-uint64_t num_files = 0;
-/** Global bytes count. */
-uint64_t num_bytes = 0;
-
/** The number of different uids found so far. */
uint32_t num_uids = 0;
*/
struct uid_range *admissible_uids;
-/** Evaluates to 1 if x < y, to -1 if x > y and to 0 if x == y. */
-#define NUM_COMPARE(x, y) ((int)((x) < (y)) - (int)((x) > (y)))
/**
* Compare the size of two directories
return 1;
}
-#define PRIME1 0x811c9dc5
+#define PRIME1 0xb11924e1
#define PRIME2 0x01000193
void create_hash_table(unsigned bits)
return make_message("%s/uid_list", conf.database_dir_arg);
}
+void sort_hash_table(int (*comp)(const void *, const void *))
+{
+ qsort(uid_hash_table, uid_hash_table_size, sizeof(struct user_info),
+ comp);
+}
+
int open_dir_table(int create)
{
dir_table_desc.dir = adu_strdup(conf.database_dir_arg);