]> git.tuebingen.mpg.de Git - adu.git/blobdiff - adu.h
Add yet more source code documentation.
[adu.git] / adu.h
diff --git a/adu.h b/adu.h
index 509c0a2248ea392decce4e2891a6c89606d34cc3..c67dd6bc657b910293eba97b43138d3d05ed781b 100644 (file)
--- a/adu.h
+++ b/adu.h
@@ -4,7 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file adu.h Global definitions. */
+/** \file adu.h \brief Global definitions. */
 
 #include <sys/stat.h>
 #include <fcntl.h>
 /** Log messages with lower priority than that will not be compiled in. */
 #define COMPILE_TIME_LOGLEVEL 0
 
+/**
+ *  A variant of static inline that requires the object being documented.
+ *
+ * If doxygen finds the \p static keyword in any context, that part will not be
+ * included in the documentation. However, we want static inline functions in
+ * header files to be documented while static functions in C files and
+ * statically declared variables should be left out. As a workaround for this
+ * flaw we use \p _static_inline_ for static inline functions declared in
+ * header files.
+ */
+#define _static_inline_ static inline
+
 /** \cond */
 #if DEBUG > COMPILE_TIME_LOGLEVEL
 #define DEBUG_LOG(f,...) __log(DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
@@ -134,7 +146,6 @@ enum dir_table_columns {
        NUM_DT_COLUMNS
 };
 
-extern uint32_t num_uids;
 extern struct osl_table *dir_table;
 
 /** The adu command line options. */
@@ -158,7 +169,7 @@ extern struct select_args_info select_conf;
  *
  * \sa osl_compare_func, osl_hash_compare().
  */
-static inline int uint64_compare(const struct osl_object *obj1,
+_static_inline_ int uint64_compare(const struct osl_object *obj1,
                const struct osl_object *obj2)
 {
        uint64_t d1 = read_u64((const char *)obj1->data);
@@ -181,7 +192,7 @@ static inline int uint64_compare(const struct osl_object *obj1,
  * equal, the address of \a obj1 and \a obj2 are compared. So this compare function
  * returns zero if and only if \a obj1 and \a obj2 point to the same memory area.
  */
-static inline int size_compare(const struct osl_object *obj1, const struct osl_object *obj2)
+_static_inline_ int size_compare(const struct osl_object *obj1, const struct osl_object *obj2)
 {
        uint64_t d1 = *(uint64_t *)obj1->data;
        uint64_t d2 = *(uint64_t *)obj2->data;
@@ -197,7 +208,6 @@ static inline int size_compare(const struct osl_object *obj1, const struct osl_o
 __printf_2_3 void __log(int, const char*, ...);
 int open_dir_table(int create);
 void check_signals(void);
-void close_all_tables(void);
 /* create.c */
 int com_create(void);