1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 00:03:12 +02:00

core: add variables with count of hooks

This commit is contained in:
Sébastien Helleu
2015-07-15 23:55:00 +02:00
parent e9c6381774
commit 80872061c2
3 changed files with 16 additions and 12 deletions
+4 -12
View File
@@ -391,26 +391,18 @@ debug_hdata ()
void
debug_hooks ()
{
int i, num_hooks, num_hooks_total;
struct t_hook *ptr_hook;
int i;
gui_chat_printf (NULL, "");
gui_chat_printf (NULL, "hooks in memory:");
num_hooks_total = 0;
for (i = 0; i < HOOK_NUM_TYPES; i++)
{
num_hooks = 0;
for (ptr_hook = weechat_hooks[i]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
num_hooks++;
}
gui_chat_printf (NULL, "%17s:%5d", hook_type_string[i], num_hooks);
num_hooks_total += num_hooks;
gui_chat_printf (NULL, "%17s:%5d",
hook_type_string[i], hooks_count[i]);
}
gui_chat_printf (NULL, "%17s------", "---------");
gui_chat_printf (NULL, "%17s:%5d", "total", num_hooks_total);
gui_chat_printf (NULL, "%17s:%5d", "total", hooks_count_total);
}
/*