diff options
author | Stefano Karapetsas <[email protected]> | 2011-12-14 10:13:54 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2011-12-14 10:13:54 +0100 |
commit | ef0467789bfc8406b57ba553e4d59f4d6c3f9be8 (patch) | |
tree | 09d541636a16cb38448fe6183289ebdc3080c1bf /mate-dictionary/libgdict/gdict-debug.h | |
download | mate-utils-ef0467789bfc8406b57ba553e4d59f4d6c3f9be8.tar.bz2 mate-utils-ef0467789bfc8406b57ba553e4d59f4d6c3f9be8.tar.xz |
Moved from Mate-Extra repository
Diffstat (limited to 'mate-dictionary/libgdict/gdict-debug.h')
-rw-r--r-- | mate-dictionary/libgdict/gdict-debug.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mate-dictionary/libgdict/gdict-debug.h b/mate-dictionary/libgdict/gdict-debug.h new file mode 100644 index 00000000..af234b1f --- /dev/null +++ b/mate-dictionary/libgdict/gdict-debug.h @@ -0,0 +1,55 @@ +/* gdict-debug.h - Debug facilities for Gdict + * + * Copyright (C) 2006 Emmanuele Bassi <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + */ + +#ifndef __GDICT_DEBUG_H__ +#define __GDICT_DEBUG_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +typedef enum { + GDICT_DEBUG_MISC = 1 << 0, + GDICT_DEBUG_CONTEXT = 1 << 1, + GDICT_DEBUG_DICT = 1 << 2, + GDICT_DEBUG_SOURCE = 1 << 3, + GDICT_DEBUG_LOADER = 1 << 4, + GDICT_DEBUG_CHOOSER = 1 << 5, + GDICT_DEBUG_DEFBOX = 1 << 6, + GDICT_DEBUG_SPELLER = 1 << 7 +} GdictDebugFlags; + +#ifdef GDICT_ENABLE_DEBUG + +#define GDICT_NOTE(type,x,a...) G_STMT_START { \ + if (gdict_debug_flags & GDICT_DEBUG_##type) { \ + g_message ("[" #type "]: " G_STRLOC ": " x, ##a); \ + } } G_STMT_END + +#else + +#define GDICT_NOTE(type,x,a...) + +#endif /* !GDICT_ENABLE_DEBUG */ + +extern guint gdict_debug_flags; + +G_END_DECLS + +#endif /* __GDICT_DEBUG_H__ */ |