diff options
Diffstat (limited to 'dlib/dlib.c')
-rw-r--r-- | dlib/dlib.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dlib/dlib.c b/dlib/dlib.c index 9d8cc062..310e9976 100644 --- a/dlib/dlib.c +++ b/dlib/dlib.c @@ -27,6 +27,15 @@ #include "dlib.h" +static bool_t dLib_show_msg = TRUE; + +/* dlib msgs go to stderr to avoid problems with filter dpis */ +#define DLIB_MSG(...) \ + D_STMT_START { \ + if (dLib_show_msg) \ + fprintf(stderr, __VA_ARGS__); \ + } D_STMT_END + /* *- Memory -------------------------------------------------------------------- */ @@ -801,6 +810,14 @@ int dParser_parse_rc_line(char **line, char **name, char **value) } /* + *- Dlib messages ------------------------------------------------------------- + */ +void dLib_show_messages(bool_t show) +{ + dLib_show_msg = show; +} + +/* *- Misc utility functions ---------------------------------------------------- */ |