diff options
author | JP Rosevear <jpr@novell.com> | 2005-01-28 02:00:30 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2005-01-28 02:00:30 +0800 |
commit | 637d616193b2275cb0fca955e62e1381bb6e1c88 (patch) | |
tree | 99b682504778afaf9d879e248ce001418e80aa02 | |
parent | eee6b3860698cc28391667fe871973bfb9c392d6 (diff) | |
download | gsoc2013-evolution-637d616193b2275cb0fca955e62e1381bb6e1c88.tar.gz gsoc2013-evolution-637d616193b2275cb0fca955e62e1381bb6e1c88.tar.zst gsoc2013-evolution-637d616193b2275cb0fca955e62e1381bb6e1c88.zip |
add a d(x) debugging define and default to off
2005-01-27 JP Rosevear <jpr@novell.com>
* em-format-hook.c: add a d(x) debugging define and default to off
svn path=/trunk/; revision=28582
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/em-format-hook.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 9acda651d8..0b2bd86bb0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,7 @@ +2005-01-27 JP Rosevear <jpr@novell.com> + + * em-format-hook.c: add a d(x) debugging define and default to off + 2005-01-26 Mengjie Yu <meng-jie.yu@sun.com> Fixes #71774 diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index 9748dc8088..627def3aa2 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -57,6 +57,8 @@ static GHashTable *emfh_types; static void *emfh_parent_class; #define emfh ((EMFormatHook *)eph) +#define d(x) + static const EPluginHookTargetKey emfh_flag_map[] = { { "inline", EM_FORMAT_HANDLER_INLINE }, { "inline_disposition", EM_FORMAT_HANDLER_INLINE_DISPOSITION }, @@ -99,7 +101,7 @@ emfh_construct_item(EPluginHook *eph, EMFormatHookGroup *group, xmlNodePtr root) { struct _EMFormatHookItem *item; - printf(" loading group item\n"); + d(printf(" loading group item\n")); item = g_malloc0(sizeof(*item)); item->handler.mime_type = e_plugin_xml_prop(root, "mime_type"); @@ -112,11 +114,11 @@ emfh_construct_item(EPluginHook *eph, EMFormatHookGroup *group, xmlNodePtr root) if (item->handler.mime_type == NULL || item->format == NULL) goto error; - printf(" type='%s' format='%s'\n", item->handler.mime_type, item->format); + d(printf(" type='%s' format='%s'\n", item->handler.mime_type, item->format)); return item; error: - printf("error!\n"); + d(printf("error!\n")); emfh_free_item(item); return NULL; } @@ -127,7 +129,7 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root) struct _EMFormatHookGroup *group; xmlNodePtr node; - printf(" loading group\n"); + d(printf(" loading group\n")); group = g_malloc0(sizeof(*group)); group->id = e_plugin_xml_prop(root, "id"); @@ -157,7 +159,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) { xmlNodePtr node; - printf("loading format hook\n"); + d(printf("loading format hook\n")); if (((EPluginHookClass *)emfh_parent_class)->construct(eph, ep, root) == -1) return -1; @@ -263,7 +265,7 @@ void em_format_hook_register_type(GType type) if (emfh_types == NULL) emfh_types = g_hash_table_new(g_str_hash, g_str_equal); - printf("registering formatter type '%s'\n", g_type_name(type)); + d(printf("registering formatter type '%s'\n", g_type_name(type))); klass = g_type_class_ref(type); g_hash_table_insert(emfh_types, (void *)g_type_name(type), klass); |