00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef QORE_SUPPORT_H
00025
00026 #define QORE_SUPPORT_H
00027
00028 #include <qore/common.h>
00029
00030 DLLEXPORT int printe(const char *fmt, ...);
00031 DLLEXPORT char *remove_trailing_newlines(char *str);
00032 DLLEXPORT char *remove_trailing_blanks(char *str);
00033
00034
00035
00036
00038 DLLEXPORT void trace_function(int code, const char *funcname);
00040 DLLEXPORT int print_debug(int level, const char *fmt, ...);
00041
00042 DLLEXPORT extern int qore_trace;
00043 DLLEXPORT extern int debug;
00044
00045 #define TRACE_IN 1
00046 #define TRACE_OUT 2
00047
00048 #ifdef DEBUG
00050 #define printd print_debug
00051
00053 #define QORE_TRACE(a) trace_function(TRACE_IN, a); ON_BLOCK_EXIT(trace_function, TRACE_OUT, a)
00054
00055 #else
00056 #ifdef __GNUC__
00058 #define printd(args...)
00060 #define QORE_TRACE(args...)
00061 #else
00063 #define printd(args, ...)
00065 #define QORE_TRACE(x)
00066 #endif
00067 #endif
00068
00069 #if !defined(HAVE_ISBLANK) && !defined(isblank)
00070 #define isblank(a) ((a) == ' ' || (a) == '\t')
00071 #endif
00072
00073 #endif