X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=adu.h;h=f8ef9c2ddf53af4a6c44ff9b3193487cbf8c9838;hp=a6a3892e6c33c5aaf52762d15debdb70b96790ac;hb=9ca6c5e46bfbfeb6341a54703a21e25c15ef0f7e;hpb=dd689d6a5f07f03bc0f4ffc518eb8bd3cdcee3ca diff --git a/adu.h b/adu.h index a6a3892..f8ef9c2 100644 --- a/adu.h +++ b/adu.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include /* time(), localtime() */ @@ -16,11 +16,7 @@ #include #include #include -#include -#include -#include -#include -#include /* needed by create_pf_socket */ +#include #include #include #include @@ -118,6 +114,9 @@ } \ } +/** 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))) + /** The columns of the directory table. */ enum dir_table_columns { /** The name of the directory. */ @@ -176,9 +175,6 @@ enum search_uid_flags { extern uint32_t num_uids; extern struct osl_table *dir_table; -extern uint64_t num_dirs; -extern uint64_t num_files; -extern uint64_t num_bytes; extern struct gengetopt_args_info conf; /* adu.c */ @@ -192,9 +188,11 @@ int search_uid(uint32_t uid, enum search_uid_flags flags, struct user_info **ui_ptr); int for_each_admissible_user(int (*func)(struct user_info *, void *), void *data); +void sort_hash_table(int (*comp)(const void *, const void *)); /* select.c */ int com_select(void); /* create.h */ int com_create(void); +int com_interactive(void);