X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=adu.h;h=adba2c6ac5264452fa532d39604e3458f47b3341;hp=c67dd6bc657b910293eba97b43138d3d05ed781b;hb=2e24b91148dda8ea52b308a4b5e0ef08c0f11267;hpb=d2ce6e60cb915dff3a0920a0b48f786435bd4ec8 diff --git a/adu.h b/adu.h index c67dd6b..adba2c6 100644 --- a/adu.h +++ b/adu.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Andre Noll + * Copyright (C) 2008 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -41,18 +41,6 @@ /** 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__) @@ -97,36 +85,6 @@ #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))) @@ -151,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. *