]> git.tuebingen.mpg.de Git - adu.git/blobdiff - adu.h
Make user summary sortable by user defined column.
[adu.git] / adu.h
diff --git a/adu.h b/adu.h
index 67607fdb7946151ed2085dc4ccb0fe324dee9128..f1d4fba029e6e79644e260d7db7566ae7c2b8ee2 100644 (file)
--- a/adu.h
+++ b/adu.h
        } \
 }
 
+/** 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. */
@@ -189,6 +192,7 @@ 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);