aboutsummaryrefslogtreecommitdiff
path: root/dlib/dlib.h
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-08-20 23:24:19 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-08-20 23:24:19 +0200
commitf5c598b518d1f906148534d015f50075d3e8242d (patch)
tree21dd70add5b366c3dd80641b77f6b18e0baa009e /dlib/dlib.h
parente98d02a01ffeb18ede86af025e51ae1ec011c75a (diff)
parent5f0fc0e48b8cbee7e1795935da0abff6627fd498 (diff)
merge
Diffstat (limited to 'dlib/dlib.h')
-rw-r--r--dlib/dlib.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/dlib/dlib.h b/dlib/dlib.h
index aa32beb4..ae9c7286 100644
--- a/dlib/dlib.h
+++ b/dlib/dlib.h
@@ -7,6 +7,7 @@
#include <string.h> /* for strerror */
#include <strings.h> /* for strcasecmp, strncasecmp (POSIX 2001) */
+#include "d_size.h"
#ifdef __cplusplus
extern "C" {
@@ -29,6 +30,10 @@ extern "C" {
#undef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+/* Handle signed char */
+#define dIsspace(c) isspace((uchar_t)(c))
+#define dIsalnum(c) isalnum((uchar_t)(c))
+
/*
*-- Casts -------------------------------------------------------------------
*/
@@ -55,6 +60,14 @@ void dFree (void *mem);
*/
#define D_STMT_START do
#define D_STMT_END while (0)
+#define dReturn_if(expr) \
+ D_STMT_START{ \
+ if (expr) { return; }; \
+ }D_STMT_END
+#define dReturn_val_if(expr,val) \
+ D_STMT_START{ \
+ if (expr) { return val; }; \
+ }D_STMT_END
#define dReturn_if_fail(expr) \
D_STMT_START{ \
if (!(expr)) { return; }; \
@@ -150,7 +163,12 @@ void *dList_find_sorted (Dlist *lp, const void *data, dCompareFunc func);
/*
*- Parse function ------------------------------------------------------------
*/
-int dParser_get_rc_pair(char **line, char **name, char **value);
+int dParser_parse_rc_line(char **line, char **name, char **value);
+
+/*
+ *- Dlib messages -------------------------------------------------------------
+ */
+void dLib_show_messages(bool_t show);
/*
*- Misc utility functions ----------------------------------------------------