Assorted typo fixes in comments.
[adu.git] / adu.h
diff --git a/adu.h b/adu.h
index 74083ec3f3eb6e849a2b2294af99aefb99f384b0..adba2c6ac5264452fa532d39604e3458f47b3341 100644 (file)
--- a/adu.h
+++ b/adu.h
@@ -1,10 +1,10 @@
 /*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008 Andre Noll <maan@tuebingen.mpg.de>
  *
  * 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>
 #endif
 /** \endcond */
 
-/**
- * Write a log message to a dynamically allocated string.
- *
- * \param fmt Usual format string.
- * \param p Result pointer.
- *
- * \sa printf(3). */
-#define VSPRINTF(fmt, p) \
-{ \
-       int n; \
-       size_t size = 100; \
-       p = adu_malloc(size); \
-       while (1) { \
-               va_list ap; \
-               /* Try to print in the allocated space. */ \
-               va_start(ap, fmt); \
-               n = vsnprintf(p, size, fmt, ap); \
-               va_end(ap); \
-               /* If that worked, return the string. */ \
-               if (n > -1 && n < size) \
-                       break; \
-               /* Else try again with more space. */ \
-               if (n > -1) /* glibc 2.1 */ \
-                       size = n + 1; /* precisely what is needed */ \
-               else /* glibc 2.0 */ \
-                       size *= 2; /* twice the old size */ \
-               p = adu_realloc(p, size); \
-       } \
-}
-
 /** 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)))
 
@@ -139,6 +109,9 @@ extern struct osl_table *dir_table;
 /** The adu command line options. */
 extern struct gengetopt_args_info conf;
 
+/** Computed database dir. */
+extern char *database_dir;
+
 /**
  * The select command line options.
  *
@@ -157,7 +130,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);
@@ -180,7 +153,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;
@@ -196,7 +169,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);