X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=adu.h;h=83c3c664daa2fcfc4acea3e40e225834baef4638;hp=c67dd6bc657b910293eba97b43138d3d05ed781b;hb=f56aa749790691ac3a44cc9c67a0ee7055939f78;hpb=d2ce6e60cb915dff3a0920a0b48f786435bd4ec8 diff --git a/adu.h b/adu.h index c67dd6b..83c3c66 100644 --- a/adu.h +++ b/adu.h @@ -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,6 +85,21 @@ #endif /** \endcond */ +/** + * Wrapper for isspace. + * NetBSD needs this. + */ +/* + * The values should be cast to an unsigned char first, then to int. + * Why? Because the isdigit (as do all other is/to functions/macros) + * expect a number from 0 upto and including 255 as their (int) argument. + * Because char is signed on most systems, casting it to int immediately + * gives the functions an argument between -128 and 127 (inclusive), + * which they will use as an array index, and which will thus fail + * horribly for characters which have their most significant bit set. + */ +#define adu_isspace(c) isspace((int)(unsigned char)(c)) + /** * Write a log message to a dynamically allocated string. * @@ -151,6 +154,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. *