From 965beb37dede0ac0f6e1be961acfbc15ee7e46cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 1 Apr 2024 21:08:52 +0200 Subject: [PATCH] core: fix print of pointer values --- doc/en/weechat_plugin_api.en.adoc | 7 +- doc/fr/weechat_plugin_api.fr.adoc | 8 +- doc/it/weechat_plugin_api.it.adoc | 8 +- doc/ja/weechat_plugin_api.ja.adoc | 8 +- doc/sr/weechat_plugin_api.sr.adoc | 8 +- src/core/core-arraylist.c | 15 +- src/core/core-command.c | 2 +- src/core/core-config-file.c | 116 ++++----- src/core/core-debug.c | 49 ++-- src/core/core-eval.c | 15 +- src/core/core-hashtable.c | 47 ++-- src/core/core-hashtable.h | 3 +- src/core/core-hdata.c | 24 +- src/core/core-hook.c | 18 +- src/core/core-infolist.c | 42 ++-- src/core/core-input.c | 3 +- src/core/core-list.c | 16 +- src/core/core-proxy.c | 18 +- src/core/hook/hook-command-run.c | 4 +- src/core/hook/hook-command.c | 14 +- src/core/hook/hook-completion.c | 2 +- src/core/hook/hook-config.c | 2 +- src/core/hook/hook-connect.c | 14 +- src/core/hook/hook-fd.c | 2 +- src/core/hook/hook-focus.c | 2 +- src/core/hook/hook-hdata.c | 2 +- src/core/hook/hook-hsignal.c | 2 +- src/core/hook/hook-info-hashtable.c | 2 +- src/core/hook/hook-info.c | 2 +- src/core/hook/hook-infolist.c | 2 +- src/core/hook/hook-line.c | 6 +- src/core/hook/hook-modifier.c | 2 +- src/core/hook/hook-print.c | 6 +- src/core/hook/hook-process.c | 12 +- src/core/hook/hook-signal.c | 2 +- src/core/hook/hook-timer.c | 2 +- src/core/hook/hook-url.c | 8 +- src/gui/curses/gui-curses-bar-window.c | 4 +- src/gui/curses/gui-curses-window.c | 6 +- src/gui/gui-bar-item.c | 17 +- src/gui/gui-bar-window.c | 32 +-- src/gui/gui-bar.c | 13 +- src/gui/gui-buffer.c | 228 +++++++++--------- src/gui/gui-chat.c | 4 +- src/gui/gui-completion.c | 52 ++-- src/gui/gui-cursor.c | 10 +- src/gui/gui-filter.c | 24 +- src/gui/gui-history.c | 3 +- src/gui/gui-hotlist.c | 10 +- src/gui/gui-input.c | 3 +- src/gui/gui-key.c | 24 +- src/gui/gui-layout.c | 48 ++-- src/gui/gui-line.c | 20 +- src/gui/gui-nicklist.c | 28 +-- src/gui/gui-window.c | 80 +++--- src/plugins/buflist/buflist-mouse.c | 3 +- src/plugins/exec/exec.c | 50 ++-- src/plugins/fset/fset-mouse.c | 3 +- src/plugins/fset/fset-option.c | 32 +-- src/plugins/irc/irc-bar-item.c | 3 +- src/plugins/irc/irc-batch.c | 24 +- src/plugins/irc/irc-channel.c | 62 ++--- src/plugins/irc/irc-ignore.c | 16 +- src/plugins/irc/irc-info.c | 2 +- src/plugins/irc/irc-modelist.c | 14 +- src/plugins/irc/irc-nick.c | 20 +- src/plugins/irc/irc-notify.c | 18 +- src/plugins/irc/irc-redirect.c | 60 ++--- src/plugins/irc/irc-server.c | 204 ++++++++-------- src/plugins/irc/irc-typing.c | 4 +- src/plugins/plugin-api-info.c | 2 +- src/plugins/plugin-script.c | 28 +-- src/plugins/plugin.c | 30 +-- src/plugins/relay/api/relay-api.c | 12 +- src/plugins/relay/irc/relay-irc.c | 32 ++- src/plugins/relay/relay-client.c | 62 ++--- src/plugins/relay/relay-http.c | 8 +- src/plugins/relay/relay-server.c | 30 +-- src/plugins/relay/relay-websocket.c | 4 +- .../relay/weechat/relay-weechat-protocol.c | 34 +-- src/plugins/relay/weechat/relay-weechat.c | 22 +- src/plugins/script/script-repo.c | 46 ++-- src/plugins/trigger/trigger-buffer.c | 2 +- src/plugins/trigger/trigger-callback.c | 11 +- src/plugins/trigger/trigger.c | 32 +-- src/plugins/xfer/xfer.c | 92 +++---- tests/unit/core/test-core-eval.cpp | 7 +- tests/unit/core/test-core-hashtable.cpp | 4 +- tests/unit/core/test-core-hook.cpp | 4 +- tests/unit/plugins/irc/test-irc-info.cpp | 6 +- tests/unit/plugins/test-plugin-api-info.cpp | 2 +- 91 files changed, 1031 insertions(+), 1055 deletions(-) diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index a8c7cfab2..80912d774 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -5262,7 +5262,7 @@ C example: [source,c] ---- -weechat_printf (NULL, "user data of item: 0x%lx", weechat_list_user_data (item)); +weechat_printf (NULL, "user data of item: %p", weechat_list_user_data (item)); ---- [NOTE] @@ -17898,7 +17898,7 @@ C example: [source,c] ---- -weechat_printf (NULL, "pointer = 0x%lx", +weechat_printf (NULL, "pointer = %p", weechat_infolist_pointer (infolist, "my_pointer")); ---- @@ -17941,8 +17941,7 @@ C example: ---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); -weechat_printf (NULL, "buffer = 0x%lx, size = %d", - pointer, size); +weechat_printf (NULL, "buffer = %p, size = %d", pointer, size); ---- [NOTE] diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index d9ec479d0..0015f1aec 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -5347,7 +5347,7 @@ Exemple en C : [source,c] ---- -weechat_printf (NULL, "données utilisateur de l'élément : 0x%lx", weechat_list_user_data (item)); +weechat_printf (NULL, "données utilisateur de l'élément : %p", weechat_list_user_data (item)); ---- [NOTE] @@ -18270,8 +18270,7 @@ Exemple en C : [source,c] ---- -weechat_printf (NULL, "pointeur = 0x%lx", - weechat_infolist_pointer (infolist, "mon_pointeur")); +weechat_printf (NULL, "pointeur = %p", weechat_infolist_pointer (infolist, "mon_pointeur")); ---- Script (Python) : @@ -18315,8 +18314,7 @@ Exemple en C : ---- int size; void *pointer = weechat_infolist_buffer (infolist, "mon_buffer", &size); -weechat_printf (NULL, "buffer = 0x%lx, taille = %d", - pointer, size); +weechat_printf (NULL, "buffer = %p, taille = %d", pointer, size); ---- [NOTE] diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 915bf41a5..082fc9449 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -5489,7 +5489,7 @@ Esempio in C: [source,c] ---- -weechat_printf (NULL, "user data of item: 0x%lx", weechat_list_user_data (item)); +weechat_printf (NULL, "user data of item: %p", weechat_list_user_data (item)); ---- [NOTE] @@ -18720,8 +18720,7 @@ Esempio in C: [source,c] ---- -weechat_printf (NULL, "pointer = 0x%lx", - weechat_infolist_pointer (infolist, "my_pointer")); +weechat_printf (NULL, "pointer = %p", weechat_infolist_pointer (infolist, "my_pointer")); ---- Script (Python): @@ -18765,8 +18764,7 @@ Esempio in C: ---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); -weechat_printf (NULL, "buffer = 0x%lx, size = %d", - pointer, size); +weechat_printf (NULL, "buffer = %p, size = %d", pointer, size); ---- [NOTE] diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 2482d38e4..2f29ca7ce 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -5397,7 +5397,7 @@ C 言語での使用例: // TRANSLATION MISSING [source,c] ---- -weechat_printf (NULL, "user data of item: 0x%lx", weechat_list_user_data (item)); +weechat_printf (NULL, "user data of item: %p", weechat_list_user_data (item)); ---- [NOTE] @@ -18144,8 +18144,7 @@ C 言語での使用例: [source,c] ---- -weechat_printf (NULL, "pointer = 0x%lx", - weechat_infolist_pointer (infolist, "my_pointer")); +weechat_printf (NULL, "pointer = %p", weechat_infolist_pointer (infolist, "my_pointer")); ---- スクリプト (Python) での使用例: @@ -18187,8 +18186,7 @@ C 言語での使用例: ---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); -weechat_printf (NULL, "buffer = 0x%lx, size = %d", - pointer, size); +weechat_printf (NULL, "buffer = %p, size = %d", pointer, size); ---- [NOTE] diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 95238c8e7..fc3889435 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -5124,7 +5124,7 @@ C пример: [source,c] ---- -weechat_printf (NULL, "кориснички подаци ставке: 0x%lx", weechat_list_user_data (item)); +weechat_printf (NULL, "кориснички подаци ставке: %p", weechat_list_user_data (item)); ---- [NOTE] @@ -17425,8 +17425,7 @@ C пример: [source,c] ---- -weechat_printf (NULL, "pointer = 0x%lx", - weechat_infolist_pointer (infolist, "my_pointer")); +weechat_printf (NULL, "pointer = %p", weechat_infolist_pointer (infolist, "my_pointer")); ---- Скрипта (Python): @@ -17468,8 +17467,7 @@ C пример: ---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); -weechat_printf (NULL, "buffer = 0x%lx, size = %d", - pointer, size); +weechat_printf (NULL, "buffer = %p, size = %d", pointer, size); ---- [NOTE] diff --git a/src/core/core-arraylist.c b/src/core/core-arraylist.c index 44320b3f3..6f1a6f778 100644 --- a/src/core/core-arraylist.c +++ b/src/core/core-arraylist.c @@ -703,25 +703,24 @@ arraylist_print_log (struct t_arraylist *arraylist, const char *name) { int i; - log_printf ("[arraylist %s (addr:0x%lx)]", name, arraylist); + log_printf ("[arraylist %s (addr:%p)]", name, arraylist); log_printf (" size . . . . . . . . . : %d", arraylist->size); log_printf (" size_alloc . . . . . . : %d", arraylist->size_alloc); log_printf (" size_alloc_min . . . . : %d", arraylist->size_alloc_min); log_printf (" sorted . . . . . . . . : %d", arraylist->sorted); log_printf (" allow_duplicates . . . : %d", arraylist->allow_duplicates); - log_printf (" data . . . . . . . . . : 0x%lx", arraylist->data); + log_printf (" data . . . . . . . . . : %p", arraylist->data); if (arraylist->data) { for (i = 0; i < arraylist->size_alloc; i++) { - log_printf (" data[%08d] . . . : 0x%lx", - i, arraylist->data[i]); + log_printf (" data[%08d] . . . : %p", i, arraylist->data[i]); } } - log_printf (" callback_cmp . . . . . : 0x%lx", arraylist->callback_cmp); - log_printf (" callback_cmp_data. . . : 0x%lx", + log_printf (" callback_cmp . . . . . : %p", arraylist->callback_cmp); + log_printf (" callback_cmp_data. . . : %p", arraylist->callback_cmp_data); - log_printf (" callback_free. . . . . : 0x%lx", arraylist->callback_free); - log_printf (" callback_free_data . . : 0x%lx", + log_printf (" callback_free. . . . . : %p", arraylist->callback_free); + log_printf (" callback_free_data . . : %p", arraylist->callback_free_data); } diff --git a/src/core/core-command.c b/src/core/core-command.c index 54dd18bb3..f17abd01f 100644 --- a/src/core/core-command.c +++ b/src/core/core-command.c @@ -1395,7 +1395,7 @@ COMMAND_CALLBACK(buffer) if (gui_buffer_property_in_list (gui_buffer_properties_get_pointer, argv[2])) { - gui_chat_printf (NULL, "%s%s%s: (ptr) %s = 0x%lx", + gui_chat_printf (NULL, "%s%s%s: (ptr) %s = %p", GUI_COLOR(GUI_COLOR_CHAT_BUFFER), buffer->full_name, GUI_COLOR(GUI_COLOR_CHAT), diff --git a/src/core/core-config-file.c b/src/core/core-config-file.c index ec637bc11..9fff969fc 100644 --- a/src/core/core-config-file.c +++ b/src/core/core-config-file.c @@ -4572,63 +4572,63 @@ config_file_print_log () ptr_config_file = ptr_config_file->next_config) { log_printf (""); - log_printf ("[config (addr:0x%lx)]", ptr_config_file); - log_printf (" plugin . . . . . . . . : 0x%lx ('%s')", + log_printf ("[config (addr:%p)]", ptr_config_file); + log_printf (" plugin . . . . . . . . : %p ('%s')", ptr_config_file->plugin, plugin_get_name (ptr_config_file->plugin)); - log_printf (" priority . . . . . . . : %d", ptr_config_file->priority); - log_printf (" name . . . . . . . . . : '%s'", ptr_config_file->name); - log_printf (" filename . . . . . . . : '%s'", ptr_config_file->filename); - log_printf (" file . . . . . . . . . : 0x%lx", ptr_config_file->file); - log_printf (" callback_reload. . . . : 0x%lx", ptr_config_file->callback_reload); - log_printf (" callback_reload_pointer: 0x%lx", ptr_config_file->callback_reload_pointer); - log_printf (" callback_reload_data . : 0x%lx", ptr_config_file->callback_reload_data); - log_printf (" sections . . . . . . . : 0x%lx", ptr_config_file->sections); - log_printf (" last_section . . . . . : 0x%lx", ptr_config_file->last_section); - log_printf (" prev_config. . . . . . : 0x%lx", ptr_config_file->prev_config); - log_printf (" next_config. . . . . . : 0x%lx", ptr_config_file->next_config); + log_printf (" priority . . . . . . . : %d", ptr_config_file->priority); + log_printf (" name . . . . . . . . . : '%s'", ptr_config_file->name); + log_printf (" filename . . . . . . . : '%s'", ptr_config_file->filename); + log_printf (" file . . . . . . . . . : %p", ptr_config_file->file); + log_printf (" callback_reload. . . . : %p", ptr_config_file->callback_reload); + log_printf (" callback_reload_pointer: %p", ptr_config_file->callback_reload_pointer); + log_printf (" callback_reload_data . : %p", ptr_config_file->callback_reload_data); + log_printf (" sections . . . . . . . : %p", ptr_config_file->sections); + log_printf (" last_section . . . . . : %p", ptr_config_file->last_section); + log_printf (" prev_config. . . . . . : %p", ptr_config_file->prev_config); + log_printf (" next_config. . . . . . : %p", ptr_config_file->next_config); for (ptr_section = ptr_config_file->sections; ptr_section; ptr_section = ptr_section->next_section) { log_printf (""); - log_printf (" [section (addr:0x%lx)]", ptr_section); - log_printf (" config_file . . . . . . . . . : 0x%lx", ptr_section->config_file); - log_printf (" name. . . . . . . . . . . . . : '%s'", ptr_section->name); - log_printf (" callback_read . . . . . . . . : 0x%lx", ptr_section->callback_read); - log_printf (" callback_read_pointer . . . . : 0x%lx", ptr_section->callback_read_pointer); - log_printf (" callback_read_data. . . . . . : 0x%lx", ptr_section->callback_read_data); - log_printf (" callback_write. . . . . . . . : 0x%lx", ptr_section->callback_write); - log_printf (" callback_write_pointer. . . . : 0x%lx", ptr_section->callback_write_pointer); - log_printf (" callback_write_data . . . . . : 0x%lx", ptr_section->callback_write_data); - log_printf (" callback_write_default. . . . : 0x%lx", ptr_section->callback_write_default); - log_printf (" callback_write_default_pointer: 0x%lx", ptr_section->callback_write_default_pointer); - log_printf (" callback_write_default_data . : 0x%lx", ptr_section->callback_write_default_data); - log_printf (" callback_create_option. . . . : 0x%lx", ptr_section->callback_create_option); - log_printf (" callback_create_option_pointer: 0x%lx", ptr_section->callback_create_option_pointer); - log_printf (" callback_create_option_data . : 0x%lx", ptr_section->callback_create_option_data); - log_printf (" callback_delete_option. . . . : 0x%lx", ptr_section->callback_delete_option); - log_printf (" callback_delete_option_pointer: 0x%lx", ptr_section->callback_delete_option_pointer); - log_printf (" callback_delete_option_data . : 0x%lx", ptr_section->callback_delete_option_data); - log_printf (" options . . . . . . . . . . . : 0x%lx", ptr_section->options); - log_printf (" last_option . . . . . . . . . : 0x%lx", ptr_section->last_option); - log_printf (" prev_section. . . . . . . . . : 0x%lx", ptr_section->prev_section); - log_printf (" next_section. . . . . . . . . : 0x%lx", ptr_section->next_section); + log_printf (" [section (addr:%p)]", ptr_section); + log_printf (" config_file . . . . . . . . . : %p", ptr_section->config_file); + log_printf (" name. . . . . . . . . . . . . : '%s'", ptr_section->name); + log_printf (" callback_read . . . . . . . . : %p", ptr_section->callback_read); + log_printf (" callback_read_pointer . . . . : %p", ptr_section->callback_read_pointer); + log_printf (" callback_read_data. . . . . . : %p", ptr_section->callback_read_data); + log_printf (" callback_write. . . . . . . . : %p", ptr_section->callback_write); + log_printf (" callback_write_pointer. . . . : %p", ptr_section->callback_write_pointer); + log_printf (" callback_write_data . . . . . : %p", ptr_section->callback_write_data); + log_printf (" callback_write_default. . . . : %p", ptr_section->callback_write_default); + log_printf (" callback_write_default_pointer: %p", ptr_section->callback_write_default_pointer); + log_printf (" callback_write_default_data . : %p", ptr_section->callback_write_default_data); + log_printf (" callback_create_option. . . . : %p", ptr_section->callback_create_option); + log_printf (" callback_create_option_pointer: %p", ptr_section->callback_create_option_pointer); + log_printf (" callback_create_option_data . : %p", ptr_section->callback_create_option_data); + log_printf (" callback_delete_option. . . . : %p", ptr_section->callback_delete_option); + log_printf (" callback_delete_option_pointer: %p", ptr_section->callback_delete_option_pointer); + log_printf (" callback_delete_option_data . : %p", ptr_section->callback_delete_option_data); + log_printf (" options . . . . . . . . . . . : %p", ptr_section->options); + log_printf (" last_option . . . . . . . . . : %p", ptr_section->last_option); + log_printf (" prev_section. . . . . . . . . : %p", ptr_section->prev_section); + log_printf (" next_section. . . . . . . . . : %p", ptr_section->next_section); for (ptr_option = ptr_section->options; ptr_option; ptr_option = ptr_option->next_option) { log_printf (""); - log_printf (" [option (addr:0x%lx)]", ptr_option); - log_printf (" config_file. . . . . . . . . : 0x%lx", ptr_option->config_file); - log_printf (" section. . . . . . . . . . . : 0x%lx", ptr_option->section); - log_printf (" name . . . . . . . . . . . . : '%s'", ptr_option->name); - log_printf (" parent_name. . . . . . . . . : '%s'", ptr_option->parent_name); - log_printf (" type . . . . . . . . . . . . : %d", ptr_option->type); - log_printf (" description. . . . . . . . . : '%s'", ptr_option->description); - log_printf (" string_values. . . . . . . . : 0x%lx", ptr_option->string_values); - log_printf (" min. . . . . . . . . . . . . : %d", ptr_option->min); - log_printf (" max. . . . . . . . . . . . . : %d", ptr_option->max); + log_printf (" [option (addr:%p)]", ptr_option); + log_printf (" config_file. . . . . . . . . : %p", ptr_option->config_file); + log_printf (" section. . . . . . . . . . . : %p", ptr_option->section); + log_printf (" name . . . . . . . . . . . . : '%s'", ptr_option->name); + log_printf (" parent_name. . . . . . . . . : '%s'", ptr_option->parent_name); + log_printf (" type . . . . . . . . . . . . : %d", ptr_option->type); + log_printf (" description. . . . . . . . . : '%s'", ptr_option->description); + log_printf (" string_values. . . . . . . . : %p", ptr_option->string_values); + log_printf (" min. . . . . . . . . . . . . : %d", ptr_option->min); + log_printf (" max. . . . . . . . . . . . . : %d", ptr_option->max); switch (ptr_option->type) { case CONFIG_OPTION_TYPE_BOOLEAN: @@ -4690,19 +4690,19 @@ config_file_print_log () case CONFIG_NUM_OPTION_TYPES: break; } - log_printf (" null_value_allowed . . . . . : %d", ptr_option->null_value_allowed); - log_printf (" callback_check_value . . . . : 0x%lx", ptr_option->callback_check_value); - log_printf (" callback_check_value_pointer : 0x%lx", ptr_option->callback_check_value_pointer); - log_printf (" callback_check_value_data. . : 0x%lx", ptr_option->callback_check_value_data); - log_printf (" callback_change. . . . . . . : 0x%lx", ptr_option->callback_change); - log_printf (" callback_change_pointer. . . : 0x%lx", ptr_option->callback_change_pointer); - log_printf (" callback_change_data . . . . : 0x%lx", ptr_option->callback_change_data); - log_printf (" callback_delete. . . . . . . : 0x%lx", ptr_option->callback_delete); - log_printf (" callback_delete_pointer. . . : 0x%lx", ptr_option->callback_delete_pointer); - log_printf (" callback_delete_data . . . . : 0x%lx", ptr_option->callback_delete_data); - log_printf (" loaded . . . . . . . . . . . : %d", ptr_option->loaded); - log_printf (" prev_option. . . . . . . . . : 0x%lx", ptr_option->prev_option); - log_printf (" next_option. . . . . . . . . : 0x%lx", ptr_option->next_option); + log_printf (" null_value_allowed . . . . . : %d", ptr_option->null_value_allowed); + log_printf (" callback_check_value . . . . : %p", ptr_option->callback_check_value); + log_printf (" callback_check_value_pointer : %p", ptr_option->callback_check_value_pointer); + log_printf (" callback_check_value_data. . : %p", ptr_option->callback_check_value_data); + log_printf (" callback_change. . . . . . . : %p", ptr_option->callback_change); + log_printf (" callback_change_pointer. . . : %p", ptr_option->callback_change_pointer); + log_printf (" callback_change_data . . . . : %p", ptr_option->callback_change_data); + log_printf (" callback_delete. . . . . . . : %p", ptr_option->callback_delete); + log_printf (" callback_delete_pointer. . . : %p", ptr_option->callback_delete_pointer); + log_printf (" callback_delete_data . . . . : %p", ptr_option->callback_delete_data); + log_printf (" loaded . . . . . . . . . . . : %d", ptr_option->loaded); + log_printf (" prev_option. . . . . . . . . : %p", ptr_option->prev_option); + log_printf (" next_option. . . . . . . . . : %p", ptr_option->next_option); } } } diff --git a/src/core/core-debug.c b/src/core/core-debug.c index fb40dcb71..d5153ca26 100644 --- a/src/core/core-debug.c +++ b/src/core/core-debug.c @@ -211,17 +211,26 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent) /* leaf */ snprintf (format, sizeof (format), - "%%-%dsleaf: 0x%%lx, parent:0x%%lx, child1=0x%%lx, " - "child2=0x%%lx, win=0x%%lx (%%d,%%d %%dx%%d" - " %%d%%%%x%%d%%%%)", + "%%-%dsleaf: " + "%%p, " + "parent:%%p, " + "child1=%%p, " + "child2=%%p, " + "win=%%p " + "(%%d,%%d %%dx%%d %%d%%%%x%%d%%%%)", indent * 2); gui_chat_printf (NULL, format, - " ", tree, tree->parent_node, - tree->child1, tree->child2, + " ", + tree, + tree->parent_node, + tree->child1, + tree->child2, tree->window, - tree->window->win_x, tree->window->win_y, - tree->window->win_width, tree->window->win_height, + tree->window->win_x, + tree->window->win_y, + tree->window->win_width, + tree->window->win_height, tree->window->win_width_pct, tree->window->win_height_pct); } @@ -230,14 +239,23 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent) /* node */ snprintf (format, sizeof (format), - "%%-%dsnode: 0x%%lx, parent:0x%%lx, pct:%%d, " - "horizontal:%%d, child1=0x%%lx, child2=0x%%lx", + "%%-%dsnode: " + "0x%%lx, " + "parent:%%p, " + "pct:%%d, " + "horizontal:%%d, " + "child1=%%p, " + "child2=%%p", indent * 2); gui_chat_printf (NULL, format, - " ", tree, tree->parent_node, tree->split_pct, + " ", + tree, + tree->parent_node, + tree->split_pct, tree->split_horizontal, - tree->child1, tree->child2); + tree->child1, + tree->child2); } if (tree->child1) @@ -346,7 +364,7 @@ debug_hdata_hash_list_map_cb (void *data, (void) hashtable; gui_chat_printf (NULL, - " list: %s -> 0x%lx", + " list: %s -> %p", (char *)key, *((void **)value)); } @@ -372,8 +390,9 @@ debug_hdata_map_cb (void *data, ptr_hdata = (struct t_hdata *)value; gui_chat_printf (NULL, - " hdata 0x%lx: \"%s\", %d vars, %d lists:", - ptr_hdata, (const char *)key, + " hdata %p: \"%s\", %d vars, %d lists:", + ptr_hdata, + (const char *)key, ptr_hdata->hash_var->items_count, ptr_hdata->hash_list->items_count); @@ -618,7 +637,7 @@ debug_infolists () } } gui_chat_printf (NULL, - "%4d: infolist 0x%lx: %d items, %d vars - " + "%4d: infolist %p: %d items, %d vars - " "structs: %d, data: %d (total: %d bytes)", i + 1, ptr_infolist, count_items, count_vars, size_structs, size_data, size_structs + size_data); diff --git a/src/core/core-eval.c b/src/core/core-eval.c index 06bde6c2d..661a4d6e0 100644 --- a/src/core/core-eval.c +++ b/src/core/core-eval.c @@ -1166,7 +1166,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, int type, debug_id; struct t_hashtable *hashtable; - EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", 0x%lx, \"%s\")", + EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", %p, \"%s\")", (hdata) ? hdata->name : "(null)", pointer, path); @@ -1184,8 +1184,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, /* no path? just return current pointer as string */ if (!path || !path[0]) { - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)pointer); + snprintf (str_value, sizeof (str_value), "%p", pointer); value = strdup (str_value); goto end; } @@ -1242,8 +1241,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, break; case WEECHAT_HDATA_POINTER: pointer = hdata_pointer (hdata, pointer, var_name); - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)pointer); + snprintf (str_value, sizeof (str_value), "%p", pointer); value = strdup (str_value); break; case WEECHAT_HDATA_TIME: @@ -1293,7 +1291,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, case HASHTABLE_POINTER: case HASHTABLE_BUFFER: snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)ptr_value); + "%p", ptr_value); value = strdup (str_value); break; case HASHTABLE_TIME: @@ -1308,8 +1306,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, } else { - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)pointer); + snprintf (str_value, sizeof (str_value), "%p", pointer); value = strdup (str_value); } break; @@ -2459,7 +2456,7 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace, result = NULL; - EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", 0x%lx, \"%s\")", + EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", %p, \"%s\")", string, regex, replace); if (!string || !regex || !replace) diff --git a/src/core/core-hashtable.c b/src/core/core-hashtable.c index b7c92a90f..20f56afe2 100644 --- a/src/core/core-hashtable.c +++ b/src/core/core-hashtable.c @@ -561,8 +561,7 @@ hashtable_to_string (enum t_hashtable_type type, const void *value) break; case HASHTABLE_POINTER: case HASHTABLE_BUFFER: - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)value); + snprintf (str_value, sizeof (str_value), "%p", value); return str_value; break; case HASHTABLE_TIME: @@ -1302,31 +1301,31 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name) int i; log_printf (""); - log_printf ("[hashtable %s (addr:0x%lx)]", name, hashtable); - log_printf (" size . . . . . . . . . : %d", hashtable->size); - log_printf (" htable . . . . . . . . : 0x%lx", hashtable->htable); - log_printf (" items_count. . . . . . : %d", hashtable->items_count); - log_printf (" oldest_item. . . . . . : 0x%lx", hashtable->oldest_item); - log_printf (" newest_item. . . . . . : 0x%lx", hashtable->newest_item); + log_printf ("[hashtable %s (addr:%p)]", name, hashtable); + log_printf (" size . . . . . . . . . : %d", hashtable->size); + log_printf (" htable . . . . . . . . : %p", hashtable->htable); + log_printf (" items_count. . . . . . : %d", hashtable->items_count); + log_printf (" oldest_item. . . . . . : %p", hashtable->oldest_item); + log_printf (" newest_item. . . . . . : %p", hashtable->newest_item); log_printf (" type_keys. . . . . . . : %d (%s)", hashtable->type_keys, hashtable_type_string[hashtable->type_keys]); log_printf (" type_values. . . . . . : %d (%s)", hashtable->type_values, hashtable_type_string[hashtable->type_values]); - log_printf (" callback_hash_key. . . : 0x%lx", hashtable->callback_hash_key); - log_printf (" callback_keycmp. . . . : 0x%lx", hashtable->callback_keycmp); - log_printf (" callback_free_key. . . : 0x%lx", hashtable->callback_free_key); - log_printf (" callback_free_value. . : 0x%lx", hashtable->callback_free_value); - log_printf (" keys_values. . . . . . : '%s'", hashtable->keys_values); + log_printf (" callback_hash_key. . . : %p", hashtable->callback_hash_key); + log_printf (" callback_keycmp. . . . : %p", hashtable->callback_keycmp); + log_printf (" callback_free_key. . . : %p", hashtable->callback_free_key); + log_printf (" callback_free_value. . : %p", hashtable->callback_free_value); + log_printf (" keys_values. . . . . . : '%s'", hashtable->keys_values); for (i = 0; i < hashtable->size; i++) { - log_printf (" htable[%06d] . . . . : 0x%lx", i, hashtable->htable[i]); + log_printf (" htable[%06d] . . . . : %p", i, hashtable->htable[i]); for (ptr_item = hashtable->htable[i]; ptr_item; ptr_item = ptr_item->next_item) { - log_printf (" [item 0x%lx]", hashtable->htable); + log_printf (" [item %p]", hashtable->htable); switch (hashtable->type_keys) { case HASHTABLE_INTEGER: @@ -1336,10 +1335,10 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name) log_printf (" key (string) . . . : '%s'", (char *)ptr_item->key); break; case HASHTABLE_POINTER: - log_printf (" key (pointer). . . : 0x%lx", ptr_item->key); + log_printf (" key (pointer). . . : %p", ptr_item->key); break; case HASHTABLE_BUFFER: - log_printf (" key (buffer) . . . : 0x%lx", ptr_item->key); + log_printf (" key (buffer) . . . : %p", ptr_item->key); break; case HASHTABLE_TIME: log_printf (" key (time) . . . . : %lld", (long long)(*((time_t *)ptr_item->key))); @@ -1357,10 +1356,10 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name) log_printf (" value (string) . . : '%s'", (char *)ptr_item->value); break; case HASHTABLE_POINTER: - log_printf (" value (pointer). . : 0x%lx", ptr_item->value); + log_printf (" value (pointer). . : %p", ptr_item->value); break; case HASHTABLE_BUFFER: - log_printf (" value (buffer) . . : 0x%lx", ptr_item->value); + log_printf (" value (buffer) . . : %p", ptr_item->value); break; case HASHTABLE_TIME: log_printf (" value (time) . . . : %lld", (long long)(*((time_t *)ptr_item->value))); @@ -1368,11 +1367,11 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name) case HASHTABLE_NUM_TYPES: break; } - log_printf (" value_size . . . . : %d", ptr_item->value_size); - log_printf (" prev_item. . . . . : 0x%lx", ptr_item->prev_item); - log_printf (" next_item. . . . . : 0x%lx", ptr_item->next_item); - log_printf (" prev_created_item. : 0x%lx", ptr_item->prev_created_item); - log_printf (" next_created_item. : 0x%lx", ptr_item->next_created_item); + log_printf (" value_size . . . . : %d", ptr_item->value_size); + log_printf (" prev_item. . . . . : %p", ptr_item->prev_item); + log_printf (" next_item. . . . . : %p", ptr_item->next_item); + log_printf (" prev_created_item. : %p", ptr_item->prev_created_item); + log_printf (" next_created_item. : %p", ptr_item->next_created_item); } } } diff --git a/src/core/core-hashtable.h b/src/core/core-hashtable.h index 9ba78e1a3..b2c8a8fa3 100644 --- a/src/core/core-hashtable.h +++ b/src/core/core-hashtable.h @@ -43,8 +43,7 @@ struct t_infolist_item; #define HASHTABLE_SET_POINTER(__name, __pointer) \ if (__pointer) \ { \ - snprintf (str_value, sizeof (str_value), \ - "0x%lx", (unsigned long)__pointer); \ + snprintf (str_value, sizeof (str_value), "%p", __pointer); \ hashtable_set (hashtable, __name, str_value); \ } \ else \ diff --git a/src/core/core-hdata.c b/src/core/core-hdata.c index a3f4e195d..c6aab2b4d 100644 --- a/src/core/core-hdata.c +++ b/src/core/core-hdata.c @@ -1504,22 +1504,22 @@ hdata_print_log_map_cb (void *data, struct t_hashtable *hashtable, ptr_hdata = (struct t_hdata *)value; log_printf (""); - log_printf ("[hdata (addr:0x%lx)]", ptr_hdata); - log_printf (" name . . . . . . . . . : '%s'", ptr_hdata->name); - log_printf (" plugin . . . . . . . . : 0x%lx", ptr_hdata->plugin); - log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev); - log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next); - log_printf (" hash_var . . . . . . . : 0x%lx (hashtable: '%s')", + log_printf ("[hdata (addr:%p)]", ptr_hdata); + log_printf (" name . . . . . . . . . : '%s'", ptr_hdata->name); + log_printf (" plugin . . . . . . . . : %p", ptr_hdata->plugin); + log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev); + log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next); + log_printf (" hash_var . . . . . . . : %p (hashtable: '%s')", ptr_hdata->hash_var, hashtable_get_string (ptr_hdata->hash_var, "keys_values")); - log_printf (" hash_list. . . . . . . : 0x%lx (hashtable: '%s')", + log_printf (" hash_list. . . . . . . : %p (hashtable: '%s')", ptr_hdata->hash_list, hashtable_get_string (ptr_hdata->hash_list, "keys_values")); - log_printf (" create_allowed . . . . : %d", (int)ptr_hdata->create_allowed); - log_printf (" delete_allowed . . . . : %d", (int)ptr_hdata->delete_allowed); - log_printf (" callback_update. . . . : 0x%lx", ptr_hdata->callback_update); - log_printf (" callback_update_data . : 0x%lx", ptr_hdata->callback_update_data); - log_printf (" update_pending . . . . : %d", (int)ptr_hdata->update_pending); + log_printf (" create_allowed . . . . : %d", (int)ptr_hdata->create_allowed); + log_printf (" delete_allowed . . . . : %d", (int)ptr_hdata->delete_allowed); + log_printf (" callback_update. . . . : %p", ptr_hdata->callback_update); + log_printf (" callback_update_data . : %p", ptr_hdata->callback_update_data); + log_printf (" update_pending . . . . : %d", (int)ptr_hdata->update_pending); hashtable_map (ptr_hdata->hash_var, &hdata_print_log_var_map_cb, NULL); } diff --git a/src/core/core-hook.c b/src/core/core-hook.c index d89c2f988..1b6d1560d 100644 --- a/src/core/core-hook.c +++ b/src/core/core-hook.c @@ -929,24 +929,24 @@ hook_print_log () ptr_hook = ptr_hook->next_hook) { log_printf (""); - log_printf ("[hook (addr:0x%lx)]", ptr_hook); - log_printf (" plugin. . . . . . . . . : 0x%lx ('%s')", + log_printf ("[hook (addr:%p)]", ptr_hook); + log_printf (" plugin. . . . . . . . . : %p ('%s')", ptr_hook->plugin, plugin_get_name (ptr_hook->plugin)); log_printf (" subplugin . . . . . . . : '%s'", ptr_hook->subplugin); log_printf (" type. . . . . . . . . . : %d (%s)", ptr_hook->type, hook_type_string[ptr_hook->type]); - log_printf (" deleted . . . . . . . . : %d", ptr_hook->deleted); - log_printf (" running . . . . . . . . : %d", ptr_hook->running); - log_printf (" priority. . . . . . . . : %d", ptr_hook->priority); - log_printf (" callback_pointer. . . . : 0x%lx", ptr_hook->callback_pointer); - log_printf (" callback_data . . . . . : 0x%lx", ptr_hook->callback_data); + log_printf (" deleted . . . . . . . . : %d", ptr_hook->deleted); + log_printf (" running . . . . . . . . : %d", ptr_hook->running); + log_printf (" priority. . . . . . . . : %d", ptr_hook->priority); + log_printf (" callback_pointer. . . . : %p", ptr_hook->callback_pointer); + log_printf (" callback_data . . . . . : %p", ptr_hook->callback_data); if (ptr_hook->deleted) continue; (hook_callback_print_log[ptr_hook->type]) (ptr_hook); - log_printf (" prev_hook . . . . . . . : 0x%lx", ptr_hook->prev_hook); - log_printf (" next_hook . . . . . . . : 0x%lx", ptr_hook->next_hook); + log_printf (" prev_hook . . . . . . . : %p", ptr_hook->prev_hook); + log_printf (" next_hook . . . . . . . : %p", ptr_hook->next_hook); } } } diff --git a/src/core/core-infolist.c b/src/core/core-infolist.c index 652482db5..18a4bc524 100644 --- a/src/core/core-infolist.c +++ b/src/core/core-infolist.c @@ -722,45 +722,45 @@ infolist_print_log () ptr_infolist = ptr_infolist->next_infolist) { log_printf (""); - log_printf ("[infolist (addr:0x%lx)]", ptr_infolist); - log_printf (" plugin . . . . . . . . : 0x%lx", ptr_infolist->plugin); - log_printf (" items. . . . . . . . . : 0x%lx", ptr_infolist->items); - log_printf (" last_item. . . . . . . : 0x%lx", ptr_infolist->last_item); - log_printf (" ptr_item . . . . . . . : 0x%lx", ptr_infolist->ptr_item); - log_printf (" prev_infolist. . . . . : 0x%lx", ptr_infolist->prev_infolist); - log_printf (" next_infolist. . . . . : 0x%lx", ptr_infolist->next_infolist); + log_printf ("[infolist (addr:%p)]", ptr_infolist); + log_printf (" plugin . . . . . . . . : %p", ptr_infolist->plugin); + log_printf (" items. . . . . . . . . : %p", ptr_infolist->items); + log_printf (" last_item. . . . . . . : %p", ptr_infolist->last_item); + log_printf (" ptr_item . . . . . . . : %p", ptr_infolist->ptr_item); + log_printf (" prev_infolist. . . . . : %p", ptr_infolist->prev_infolist); + log_printf (" next_infolist. . . . . : %p", ptr_infolist->next_infolist); for (ptr_item = ptr_infolist->items; ptr_item; ptr_item = ptr_item->next_item) { log_printf (""); - log_printf (" [item (addr:0x%lx)]", ptr_item); - log_printf (" vars . . . . . . . . . : 0x%lx", ptr_item->vars); - log_printf (" last_var . . . . . . . : 0x%lx", ptr_item->last_var); - log_printf (" prev_item. . . . . . . : 0x%lx", ptr_item->prev_item); - log_printf (" next_item. . . . . . . : 0x%lx", ptr_item->next_item); + log_printf (" [item (addr:%p)]", ptr_item); + log_printf (" vars . . . . . . . . . : %p", ptr_item->vars); + log_printf (" last_var . . . . . . . : %p", ptr_item->last_var); + log_printf (" prev_item. . . . . . . : %p", ptr_item->prev_item); + log_printf (" next_item. . . . . . . : %p", ptr_item->next_item); for (ptr_var = ptr_item->vars; ptr_var; ptr_var = ptr_var->next_var) { log_printf (""); - log_printf (" [var (addr:0x%lx)]", ptr_var); + log_printf (" [var (addr:%p)]", ptr_var); log_printf (" name . . . . . . . . : '%s'", ptr_var->name); - log_printf (" type . . . . . . . . : %d", ptr_var->type); + log_printf (" type . . . . . . . . : %d", ptr_var->type); switch (ptr_var->type) { case INFOLIST_INTEGER: - log_printf (" value (integer). . . : %d", *((int *)ptr_var->value)); + log_printf (" value (integer). . . : %d", *((int *)ptr_var->value)); break; case INFOLIST_STRING: - log_printf (" value (string) . . . : '%s'", (char *)ptr_var->value); + log_printf (" value (string) . . . : '%s'", (char *)ptr_var->value); break; case INFOLIST_POINTER: - log_printf (" value (pointer). . . : 0x%lx", ptr_var->value); + log_printf (" value (pointer). . . : %p", ptr_var->value); break; case INFOLIST_BUFFER: - log_printf (" value (buffer) . . . : 0x%lx", ptr_var->value); - log_printf (" size of buffer . . . : %d", ptr_var->size); + log_printf (" value (buffer) . . . : %p", ptr_var->value); + log_printf (" size of buffer . . . : %d", ptr_var->size); break; case INFOLIST_TIME: log_printf (" value (time) . . . . : %lld", (long long)(*((time_t *)ptr_var->value))); @@ -768,8 +768,8 @@ infolist_print_log () case INFOLIST_NUM_TYPES: break; } - log_printf (" prev_var . . . . . . : 0x%lx", ptr_var->prev_var); - log_printf (" next_var . . . . . . : 0x%lx", ptr_var->next_var); + log_printf (" prev_var . . . . . . : %p", ptr_var->prev_var); + log_printf (" next_var . . . . . . : %p", ptr_var->next_var); } } } diff --git a/src/core/core-input.c b/src/core/core-input.c index b1585642d..d09f0aad8 100644 --- a/src/core/core-input.c +++ b/src/core/core-input.c @@ -268,8 +268,7 @@ input_data (struct t_gui_buffer *buffer, const char *data, } /* execute modifier "input_text_for_buffer" */ - snprintf (str_buffer, sizeof (str_buffer), - "0x%lx", (unsigned long)buffer); + snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); new_data = hook_modifier_exec (NULL, "input_text_for_buffer", str_buffer, diff --git a/src/core/core-list.c b/src/core/core-list.c index 62634ffbe..5e3dc5d32 100644 --- a/src/core/core-list.c +++ b/src/core/core-list.c @@ -450,20 +450,20 @@ weelist_print_log (struct t_weelist *weelist, const char *name) struct t_weelist_item *ptr_item; int i; - log_printf ("[weelist %s (addr:0x%lx)]", name, weelist); - log_printf (" items. . . . . . . . . : 0x%lx", weelist->items); - log_printf (" last_item. . . . . . . : 0x%lx", weelist->last_item); + log_printf ("[weelist %s (addr:%p)]", name, weelist); + log_printf (" items. . . . . . . . . : %p", weelist->items); + log_printf (" last_item. . . . . . . : %p", weelist->last_item); log_printf (" size . . . . . . . . . : %d", weelist->size); i = 0; for (ptr_item = weelist->items; ptr_item; ptr_item = ptr_item->next_item) { - log_printf (" [item %d (addr:0x%lx)]", i, ptr_item); - log_printf (" data . . . . . . . . : '%s'", ptr_item->data); - log_printf (" user_data. . . . . . : 0x%lx", ptr_item->user_data); - log_printf (" prev_item. . . . . . : 0x%lx", ptr_item->prev_item); - log_printf (" next_item. . . . . . : 0x%lx", ptr_item->next_item); + log_printf (" [item %d (addr:%p)]", i, ptr_item); + log_printf (" data . . . . . . . . : '%s'", ptr_item->data); + log_printf (" user_data. . . . . . : %p", ptr_item->user_data); + log_printf (" prev_item. . . . . . : %p", ptr_item->prev_item); + log_printf (" next_item. . . . . . : %p", ptr_item->next_item); i++; } } diff --git a/src/core/core-proxy.c b/src/core/core-proxy.c index 705776cdf..a88db0929 100644 --- a/src/core/core-proxy.c +++ b/src/core/core-proxy.c @@ -664,17 +664,17 @@ proxy_print_log () ptr_proxy = ptr_proxy->next_proxy) { log_printf (""); - log_printf ("[proxy (addr:0x%lx)]", ptr_proxy); - log_printf (" name . . . . . . . . . : '%s'", ptr_proxy->name); + log_printf ("[proxy (addr:%p)]", ptr_proxy); + log_printf (" name . . . . . . . . . : '%s'", ptr_proxy->name); log_printf (" type . . . . . . . . . : %d (%s)", CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE]), proxy_type_string[CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE])]); - log_printf (" ipv6 . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_IPV6])); - log_printf (" address. . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_ADDRESS])); - log_printf (" port . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_PORT])); - log_printf (" username . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_USERNAME])); - log_printf (" password . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_PASSWORD])); - log_printf (" prev_proxy . . . . . . : 0x%lx", ptr_proxy->prev_proxy); - log_printf (" next_proxy . . . . . . : 0x%lx", ptr_proxy->next_proxy); + log_printf (" ipv6 . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_IPV6])); + log_printf (" address. . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_ADDRESS])); + log_printf (" port . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_PORT])); + log_printf (" username . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_USERNAME])); + log_printf (" password . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_PASSWORD])); + log_printf (" prev_proxy . . . . . . : %p", ptr_proxy->prev_proxy); + log_printf (" next_proxy . . . . . . : %p", ptr_proxy->next_proxy); } } diff --git a/src/core/hook/hook-command-run.c b/src/core/hook/hook-command-run.c index 1c72543c2..e664c7709 100644 --- a/src/core/hook/hook-command-run.c +++ b/src/core/hook/hook-command-run.c @@ -229,6 +229,6 @@ hook_command_run_print_log (struct t_hook *hook) return; log_printf (" command_run data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_COMMAND_RUN(hook, callback)); - log_printf (" command . . . . . . . : '%s'", HOOK_COMMAND_RUN(hook, command)); + log_printf (" callback. . . . . . . : %p", HOOK_COMMAND_RUN(hook, callback)); + log_printf (" command . . . . . . . : '%s'", HOOK_COMMAND_RUN(hook, command)); } diff --git a/src/core/hook/hook-command.c b/src/core/hook/hook-command.c index 2558d52ab..d31972719 100644 --- a/src/core/hook/hook-command.c +++ b/src/core/hook/hook-command.c @@ -1108,13 +1108,13 @@ hook_command_print_log (struct t_hook *hook) return; log_printf (" command data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_COMMAND(hook, callback)); - log_printf (" command . . . . . . . : '%s'", HOOK_COMMAND(hook, command)); - log_printf (" description . . . . . : '%s'", HOOK_COMMAND(hook, description)); - log_printf (" args. . . . . . . . . : '%s'", HOOK_COMMAND(hook, args)); - log_printf (" args_description. . . : '%s'", HOOK_COMMAND(hook, args_description)); - log_printf (" completion. . . . . . : '%s'", HOOK_COMMAND(hook, completion)); - log_printf (" cplt_num_templates. . : %d", HOOK_COMMAND(hook, cplt_num_templates)); + log_printf (" callback. . . . . . . : %p", HOOK_COMMAND(hook, callback)); + log_printf (" command . . . . . . . : '%s'", HOOK_COMMAND(hook, command)); + log_printf (" description . . . . . : '%s'", HOOK_COMMAND(hook, description)); + log_printf (" args. . . . . . . . . : '%s'", HOOK_COMMAND(hook, args)); + log_printf (" args_description. . . : '%s'", HOOK_COMMAND(hook, args_description)); + log_printf (" completion. . . . . . : '%s'", HOOK_COMMAND(hook, completion)); + log_printf (" cplt_num_templates. . : %d", HOOK_COMMAND(hook, cplt_num_templates)); for (i = 0; i < HOOK_COMMAND(hook, cplt_num_templates); i++) { log_printf (" cplt_templates[%04d] . . . : '%s'", diff --git a/src/core/hook/hook-completion.c b/src/core/hook/hook-completion.c index 063572e79..44618f129 100644 --- a/src/core/hook/hook-completion.c +++ b/src/core/hook/hook-completion.c @@ -219,7 +219,7 @@ hook_completion_print_log (struct t_hook *hook) return; log_printf (" completion data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_COMPLETION(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_COMPLETION(hook, callback)); log_printf (" completion_item . . . : '%s'", HOOK_COMPLETION(hook, completion_item)); log_printf (" description . . . . . : '%s'", HOOK_COMPLETION(hook, description)); } diff --git a/src/core/hook/hook-config.c b/src/core/hook/hook-config.c index 42b158b55..c6784378b 100644 --- a/src/core/hook/hook-config.c +++ b/src/core/hook/hook-config.c @@ -181,6 +181,6 @@ hook_config_print_log (struct t_hook *hook) return; log_printf (" config data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_CONFIG(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_CONFIG(hook, callback)); log_printf (" option. . . . . . . . : '%s'", HOOK_CONFIG(hook, option)); } diff --git a/src/core/hook/hook-connect.c b/src/core/hook/hook-connect.c index d6da88ba8..f93b902e2 100644 --- a/src/core/hook/hook-connect.c +++ b/src/core/hook/hook-connect.c @@ -388,15 +388,15 @@ hook_connect_print_log (struct t_hook *hook) return; log_printf (" connect data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_CONNECT(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_CONNECT(hook, callback)); log_printf (" proxy . . . . . . . . : '%s'", HOOK_CONNECT(hook, proxy)); log_printf (" address . . . . . . . : '%s'", HOOK_CONNECT(hook, address)); log_printf (" port. . . . . . . . . : %d", HOOK_CONNECT(hook, port)); log_printf (" sock. . . . . . . . . : %d", HOOK_CONNECT(hook, sock)); log_printf (" ipv6. . . . . . . . . : %d", HOOK_CONNECT(hook, ipv6)); log_printf (" retry . . . . . . . . : %d", HOOK_CONNECT(hook, retry)); - log_printf (" gnutls_sess . . . . . : 0x%lx", HOOK_CONNECT(hook, gnutls_sess)); - log_printf (" gnutls_cb . . . . . . : 0x%lx", HOOK_CONNECT(hook, gnutls_cb)); + log_printf (" gnutls_sess . . . . . : %p", HOOK_CONNECT(hook, gnutls_sess)); + log_printf (" gnutls_cb . . . . . . : %p", HOOK_CONNECT(hook, gnutls_cb)); log_printf (" gnutls_dhkey_size . . : %d", HOOK_CONNECT(hook, gnutls_dhkey_size)); log_printf (" gnutls_priorities . . : '%s'", HOOK_CONNECT(hook, gnutls_priorities)); log_printf (" local_hostname. . . . : '%s'", HOOK_CONNECT(hook, local_hostname)); @@ -405,10 +405,10 @@ hook_connect_print_log (struct t_hook *hook) log_printf (" child_recv. . . . . . : %d", HOOK_CONNECT(hook, child_recv)); log_printf (" child_send. . . . . . : %d", HOOK_CONNECT(hook, child_send)); log_printf (" child_pid . . . . . . : %d", HOOK_CONNECT(hook, child_pid)); - log_printf (" hook_child_timer. . . : 0x%lx", HOOK_CONNECT(hook, hook_child_timer)); - log_printf (" hook_fd . . . . . . . : 0x%lx", HOOK_CONNECT(hook, hook_fd)); - log_printf (" handshake_hook_fd . . : 0x%lx", HOOK_CONNECT(hook, handshake_hook_fd)); - log_printf (" handshake_hook_timer. : 0x%lx", HOOK_CONNECT(hook, handshake_hook_timer)); + log_printf (" hook_child_timer. . . : %p", HOOK_CONNECT(hook, hook_child_timer)); + log_printf (" hook_fd . . . . . . . : %p", HOOK_CONNECT(hook, hook_fd)); + log_printf (" handshake_hook_fd . . : %p", HOOK_CONNECT(hook, handshake_hook_fd)); + log_printf (" handshake_hook_timer. : %p", HOOK_CONNECT(hook, handshake_hook_timer)); log_printf (" handshake_fd_flags. . : %d", HOOK_CONNECT(hook, handshake_fd_flags)); log_printf (" handshake_ip_address. : '%s'", HOOK_CONNECT(hook, handshake_ip_address)); if (!hook_socketpair_ok) diff --git a/src/core/hook/hook-fd.c b/src/core/hook/hook-fd.c index abc4f6d93..0405daed7 100644 --- a/src/core/hook/hook-fd.c +++ b/src/core/hook/hook-fd.c @@ -347,7 +347,7 @@ hook_fd_print_log (struct t_hook *hook) return; log_printf (" fd data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_FD(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_FD(hook, callback)); log_printf (" fd. . . . . . . . . . : %d", HOOK_FD(hook, fd)); log_printf (" flags . . . . . . . . : %d", HOOK_FD(hook, flags)); log_printf (" error . . . . . . . . : %d", HOOK_FD(hook, error)); diff --git a/src/core/hook/hook-focus.c b/src/core/hook/hook-focus.c index 8731709b6..53f42785b 100644 --- a/src/core/hook/hook-focus.c +++ b/src/core/hook/hook-focus.c @@ -331,6 +331,6 @@ hook_focus_print_log (struct t_hook *hook) return; log_printf (" focus data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_FOCUS(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_FOCUS(hook, callback)); log_printf (" area. . . . . . . . . : '%s'", HOOK_FOCUS(hook, area)); } diff --git a/src/core/hook/hook-hdata.c b/src/core/hook/hook-hdata.c index 2ba924e47..a1d98672f 100644 --- a/src/core/hook/hook-hdata.c +++ b/src/core/hook/hook-hdata.c @@ -215,7 +215,7 @@ hook_hdata_print_log (struct t_hook *hook) return; log_printf (" hdata data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_HDATA(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_HDATA(hook, callback)); log_printf (" hdata_name. . . . . . : '%s'", HOOK_HDATA(hook, hdata_name)); log_printf (" description . . . . . : '%s'", HOOK_HDATA(hook, description)); } diff --git a/src/core/hook/hook-hsignal.c b/src/core/hook/hook-hsignal.c index cffd5e031..235bf37dc 100644 --- a/src/core/hook/hook-hsignal.c +++ b/src/core/hook/hook-hsignal.c @@ -233,7 +233,7 @@ hook_hsignal_print_log (struct t_hook *hook) return; log_printf (" signal data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_HSIGNAL(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_HSIGNAL(hook, callback)); log_printf (" signals:"); for (i = 0; i < HOOK_HSIGNAL(hook, num_signals); i++) { diff --git a/src/core/hook/hook-info-hashtable.c b/src/core/hook/hook-info-hashtable.c index 72d808bf3..bbe12e462 100644 --- a/src/core/hook/hook-info-hashtable.c +++ b/src/core/hook/hook-info-hashtable.c @@ -237,7 +237,7 @@ hook_info_hashtable_print_log (struct t_hook *hook) return; log_printf (" info_hashtable data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_INFO_HASHTABLE(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_INFO_HASHTABLE(hook, callback)); log_printf (" info_name . . . . . . : '%s'", HOOK_INFO_HASHTABLE(hook, info_name)); log_printf (" description . . . . . : '%s'", HOOK_INFO_HASHTABLE(hook, description)); log_printf (" args_description. . . : '%s'", HOOK_INFO_HASHTABLE(hook, args_description)); diff --git a/src/core/hook/hook-info.c b/src/core/hook/hook-info.c index 498dcf9f7..c63e8e4be 100644 --- a/src/core/hook/hook-info.c +++ b/src/core/hook/hook-info.c @@ -221,7 +221,7 @@ void hook_info_print_log (struct t_hook *hook) { log_printf (" info data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_INFO(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_INFO(hook, callback)); log_printf (" info_name . . . . . . : '%s'", HOOK_INFO(hook, info_name)); log_printf (" description . . . . . : '%s'", HOOK_INFO(hook, description)); log_printf (" args_description. . . : '%s'", HOOK_INFO(hook, args_description)); diff --git a/src/core/hook/hook-infolist.c b/src/core/hook/hook-infolist.c index 4482cfa75..d8ffab1ee 100644 --- a/src/core/hook/hook-infolist.c +++ b/src/core/hook/hook-infolist.c @@ -238,7 +238,7 @@ hook_infolist_print_log (struct t_hook *hook) return; log_printf (" infolist data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_INFOLIST(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_INFOLIST(hook, callback)); log_printf (" infolist_name . . . . : '%s'", HOOK_INFOLIST(hook, infolist_name)); log_printf (" description . . . . . : '%s'", HOOK_INFOLIST(hook, description)); log_printf (" pointer_description . : '%s'", HOOK_INFOLIST(hook, pointer_description)); diff --git a/src/core/hook/hook-line.c b/src/core/hook/hook-line.c index a8ec86a7f..cea6f7afa 100644 --- a/src/core/hook/hook-line.c +++ b/src/core/hook/hook-line.c @@ -279,9 +279,9 @@ hook_line_print_log (struct t_hook *hook) return; log_printf (" line data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_LINE(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_LINE(hook, callback)); log_printf (" buffer_type . . . . . : %d", HOOK_LINE(hook, buffer_type)); - log_printf (" buffers . . . . . . . : 0x%lx", HOOK_LINE(hook, buffers)); + log_printf (" buffers . . . . . . . : %p", HOOK_LINE(hook, buffers)); log_printf (" num_buffers . . . . . : %d", HOOK_LINE(hook, num_buffers)); for (i = 0; i < HOOK_LINE(hook, num_buffers); i++) { @@ -289,7 +289,7 @@ hook_line_print_log (struct t_hook *hook) i, HOOK_LINE(hook, buffers)[i]); } log_printf (" tags_count. . . . . . : %d", HOOK_LINE(hook, tags_count)); - log_printf (" tags_array. . . . . . : 0x%lx", HOOK_LINE(hook, tags_array)); + log_printf (" tags_array. . . . . . : %p", HOOK_LINE(hook, tags_array)); if (HOOK_LINE(hook, tags_array)) { for (i = 0; i < HOOK_LINE(hook, tags_count); i++) diff --git a/src/core/hook/hook-modifier.c b/src/core/hook/hook-modifier.c index feac9a064..e8efbc557 100644 --- a/src/core/hook/hook-modifier.c +++ b/src/core/hook/hook-modifier.c @@ -213,6 +213,6 @@ hook_modifier_print_log (struct t_hook *hook) return; log_printf (" modifier data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_MODIFIER(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_MODIFIER(hook, callback)); log_printf (" modifier. . . . . . . : '%s'", HOOK_MODIFIER(hook, modifier)); } diff --git a/src/core/hook/hook-print.c b/src/core/hook/hook-print.c index 54b55fdff..d04cfdad3 100644 --- a/src/core/hook/hook-print.c +++ b/src/core/hook/hook-print.c @@ -257,10 +257,10 @@ hook_print_print_log (struct t_hook *hook) return; log_printf (" print data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_PRINT(hook, callback)); - log_printf (" buffer. . . . . . . . : 0x%lx", HOOK_PRINT(hook, buffer)); + log_printf (" callback. . . . . . . : %p", HOOK_PRINT(hook, callback)); + log_printf (" buffer. . . . . . . . : %p", HOOK_PRINT(hook, buffer)); log_printf (" tags_count. . . . . . : %d", HOOK_PRINT(hook, tags_count)); - log_printf (" tags_array. . . . . . : 0x%lx", HOOK_PRINT(hook, tags_array)); + log_printf (" tags_array. . . . . . : %p", HOOK_PRINT(hook, tags_array)); if (HOOK_PRINT(hook, tags_array)) { for (i = 0; i < HOOK_PRINT(hook, tags_count); i++) diff --git a/src/core/hook/hook-process.c b/src/core/hook/hook-process.c index 44668ba92..cb64d2375 100644 --- a/src/core/hook/hook-process.c +++ b/src/core/hook/hook-process.c @@ -978,9 +978,9 @@ hook_process_print_log (struct t_hook *hook) return; log_printf (" process data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_PROCESS(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_PROCESS(hook, callback)); log_printf (" command . . . . . . . : '%s'", HOOK_PROCESS(hook, command)); - log_printf (" options . . . . . . . : 0x%lx (hashtable: '%s')", + log_printf (" options . . . . . . . : %p (hashtable: '%s')", HOOK_PROCESS(hook, options), hashtable_get_string (HOOK_PROCESS(hook, options), "keys_values")); @@ -993,8 +993,8 @@ hook_process_print_log (struct t_hook *hook) log_printf (" child_read[stderr]. . : %d", HOOK_PROCESS(hook, child_read[HOOK_PROCESS_STDERR])); log_printf (" child_write[stderr] . : %d", HOOK_PROCESS(hook, child_write[HOOK_PROCESS_STDERR])); log_printf (" child_pid . . . . . . : %d", HOOK_PROCESS(hook, child_pid)); - log_printf (" hook_fd[stdin]. . . . : 0x%lx", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDIN])); - log_printf (" hook_fd[stdout] . . . : 0x%lx", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDOUT])); - log_printf (" hook_fd[stderr] . . . : 0x%lx", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDERR])); - log_printf (" hook_timer. . . . . . : 0x%lx", HOOK_PROCESS(hook, hook_timer)); + log_printf (" hook_fd[stdin]. . . . : %p", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDIN])); + log_printf (" hook_fd[stdout] . . . : %p", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDOUT])); + log_printf (" hook_fd[stderr] . . . : %p", HOOK_PROCESS(hook, hook_fd[HOOK_PROCESS_STDERR])); + log_printf (" hook_timer. . . . . . : %p", HOOK_PROCESS(hook, hook_timer)); } diff --git a/src/core/hook/hook-signal.c b/src/core/hook/hook-signal.c index 837db2e67..a9c1b3e83 100644 --- a/src/core/hook/hook-signal.c +++ b/src/core/hook/hook-signal.c @@ -234,7 +234,7 @@ hook_signal_print_log (struct t_hook *hook) return; log_printf (" signal data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_SIGNAL(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_SIGNAL(hook, callback)); log_printf (" signals:"); for (i = 0; i < HOOK_SIGNAL(hook, num_signals); i++) { diff --git a/src/core/hook/hook-timer.c b/src/core/hook/hook-timer.c index 1fd9dd3c5..15e432c5c 100644 --- a/src/core/hook/hook-timer.c +++ b/src/core/hook/hook-timer.c @@ -421,7 +421,7 @@ hook_timer_print_log (struct t_hook *hook) return; log_printf (" timer data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_TIMER(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_TIMER(hook, callback)); log_printf (" interval. . . . . . . : %ld", HOOK_TIMER(hook, interval)); log_printf (" align_second. . . . . : %d", HOOK_TIMER(hook, align_second)); log_printf (" remaining_calls . . . : %d", HOOK_TIMER(hook, remaining_calls)); diff --git a/src/core/hook/hook-url.c b/src/core/hook/hook-url.c index 19cef8c37..aa33d0cce 100644 --- a/src/core/hook/hook-url.c +++ b/src/core/hook/hook-url.c @@ -444,17 +444,17 @@ hook_url_print_log (struct t_hook *hook) return; log_printf (" url data:"); - log_printf (" callback. . . . . . . : 0x%lx", HOOK_URL(hook, callback)); + log_printf (" callback. . . . . . . : %p", HOOK_URL(hook, callback)); log_printf (" url . . . . . . . . . : '%s'", HOOK_URL(hook, url)); - log_printf (" options . . . . . . . : 0x%lx (hashtable: '%s')", + log_printf (" options . . . . . . . : %p (hashtable: '%s')", HOOK_URL(hook, options), hashtable_get_string (HOOK_URL(hook, options), "keys_values")); log_printf (" timeout . . . . . . . : %ld", HOOK_URL(hook, timeout)); log_printf (" thread_created. . . . : %d", (int)HOOK_URL(hook, thread_created)); log_printf (" thread_running. . . . : %d", (int)HOOK_URL(hook, thread_running)); - log_printf (" hook_timer. . . . . . : 0x%lx", HOOK_URL(hook, hook_timer)); - log_printf (" output. . . . . . . . : 0x%lx (hashtable: '%s')", + log_printf (" hook_timer. . . . . . : %p", HOOK_URL(hook, hook_timer)); + log_printf (" output. . . . . . . . : %p (hashtable: '%s')", HOOK_URL(hook, output), hashtable_get_string (HOOK_URL(hook, output), "keys_values")); diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index e1c3ca938..0be0fb54b 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -963,6 +963,6 @@ void gui_bar_window_objects_print_log (struct t_gui_bar_window *bar_window) { log_printf (" bar window specific objects for Curses:"); - log_printf (" win_bar. . . . . . . : 0x%lx", GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar); - log_printf (" win_separator. . . . : 0x%lx", GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator); + log_printf (" win_bar. . . . . . . : %p", GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar); + log_printf (" win_separator. . . . : %p", GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator); } diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index c7e287c3e..570b4cafc 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -2716,7 +2716,7 @@ void gui_window_objects_print_log (struct t_gui_window *window) { log_printf (" window specific objects for Curses:"); - log_printf (" win_chat. . . . . . . : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_chat); - log_printf (" win_separator_horiz . : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_separator_horiz); - log_printf (" win_separator_vertic. : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_separator_vertic); + log_printf (" win_chat. . . . . . . : %p", GUI_WINDOW_OBJECTS(window)->win_chat); + log_printf (" win_separator_horiz . : %p", GUI_WINDOW_OBJECTS(window)->win_separator_horiz); + log_printf (" win_separator_vertic. : %p", GUI_WINDOW_OBJECTS(window)->win_separator_vertic); } diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index 5dd42d570..385e46af5 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -956,8 +956,7 @@ gui_bar_item_input_text_cb (const void *pointer, void *data, } /* for modifiers */ - snprintf (str_buffer, sizeof (str_buffer), - "0x%lx", (unsigned long)buffer); + snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); /* execute modifier with basic string (without cursor tag) */ ptr_input = NULL; @@ -2606,14 +2605,14 @@ gui_bar_item_print_log () for (ptr_item = gui_bar_items; ptr_item; ptr_item = ptr_item->next_item) { log_printf (""); - log_printf ("[bar item (addr:0x%lx)]", ptr_item); - log_printf (" plugin . . . . . . . . : 0x%lx ('%s')", + log_printf ("[bar item (addr:%p)]", ptr_item); + log_printf (" plugin . . . . . . . . : %p ('%s')", ptr_item->plugin, plugin_get_name (ptr_item->plugin)); log_printf (" name . . . . . . . . . : '%s'", ptr_item->name); - log_printf (" build_callback . . . . : 0x%lx", ptr_item->build_callback); - log_printf (" build_callback_pointer : 0x%lx", ptr_item->build_callback_pointer); - log_printf (" build_callback_data. . : 0x%lx", ptr_item->build_callback_data); - log_printf (" prev_item. . . . . . . : 0x%lx", ptr_item->prev_item); - log_printf (" next_item. . . . . . . : 0x%lx", ptr_item->next_item); + log_printf (" build_callback . . . . : %p", ptr_item->build_callback); + log_printf (" build_callback_pointer : %p", ptr_item->build_callback_pointer); + log_printf (" build_callback_data. . : %p", ptr_item->build_callback_data); + log_printf (" prev_item. . . . . . . : %p", ptr_item->prev_item); + log_printf (" next_item. . . . . . . : %p", ptr_item->next_item); } } diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c index 379f32c07..7294937fa 100644 --- a/src/gui/gui-bar-window.c +++ b/src/gui/gui-bar-window.c @@ -1759,20 +1759,20 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window) int i, j; log_printf (""); - log_printf (" [window bar (addr:0x%lx)]", bar_window); - log_printf (" bar. . . . . . . . . . : 0x%lx ('%s')", + log_printf (" [window bar (addr:%p)]", bar_window); + log_printf (" bar. . . . . . . . . . : %p ('%s')", bar_window->bar, (bar_window->bar) ? bar_window->bar->name : ""); - log_printf (" x. . . . . . . . . . . : %d", bar_window->x); - log_printf (" y. . . . . . . . . . . : %d", bar_window->y); - log_printf (" width. . . . . . . . . : %d", bar_window->width); - log_printf (" height . . . . . . . . : %d", bar_window->height); - log_printf (" scroll_x . . . . . . . : %d", bar_window->scroll_x); - log_printf (" scroll_y . . . . . . . : %d", bar_window->scroll_y); - log_printf (" cursor_x . . . . . . . : %d", bar_window->cursor_x); - log_printf (" cursor_y . . . . . . . : %d", bar_window->cursor_y); - log_printf (" current_size . . . . . : %d", bar_window->current_size); - log_printf (" items_count. . . . . . : %d", bar_window->items_count); + log_printf (" x. . . . . . . . . . . : %d", bar_window->x); + log_printf (" y. . . . . . . . . . . : %d", bar_window->y); + log_printf (" width. . . . . . . . . : %d", bar_window->width); + log_printf (" height . . . . . . . . : %d", bar_window->height); + log_printf (" scroll_x . . . . . . . : %d", bar_window->scroll_x); + log_printf (" scroll_y . . . . . . . : %d", bar_window->scroll_y); + log_printf (" cursor_x . . . . . . . : %d", bar_window->cursor_x); + log_printf (" cursor_y . . . . . . . : %d", bar_window->cursor_y); + log_printf (" current_size . . . . . : %d", bar_window->current_size); + log_printf (" items_count. . . . . . : %d", bar_window->items_count); for (i = 0; i < bar_window->items_count; i++) { log_printf (" items_subcount[%03d]. . : %d", @@ -1794,7 +1794,7 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window) } else { - log_printf (" items_content. . . . . . : 0x%lx", bar_window->items_content); + log_printf (" items_content. . . . . . : %p", bar_window->items_content); } } log_printf (" screen_col_size. . . . : %d", bar_window->screen_col_size); @@ -1811,8 +1811,8 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window) bar_window->coords[i]->x, bar_window->coords[i]->y); } - log_printf (" gui_objects. . . . . . : 0x%lx", bar_window->gui_objects); + log_printf (" gui_objects. . . . . . : %p", bar_window->gui_objects); gui_bar_window_objects_print_log (bar_window); - log_printf (" prev_bar_window. . . . : 0x%lx", bar_window->prev_bar_window); - log_printf (" next_bar_window. . . . : 0x%lx", bar_window->next_bar_window); + log_printf (" prev_bar_window. . . . : %p", bar_window->prev_bar_window); + log_printf (" next_bar_window. . . . : %p", bar_window->next_bar_window); } diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index 77085486e..2b6fdd00f 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -438,8 +438,7 @@ gui_bar_check_conditions (struct t_gui_bar *bar, */ snprintf (str_modifier, sizeof (str_modifier), "bar_condition_%s", bar->name); - snprintf (str_window, sizeof (str_window), - "0x%lx", (unsigned long)(window)); + snprintf (str_window, sizeof (str_window), "%p", window); str_displayed = hook_modifier_exec (NULL, str_modifier, str_window, @@ -2425,7 +2424,7 @@ gui_bar_print_log () for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar) { log_printf (""); - log_printf ("[bar (addr:0x%lx)]", ptr_bar); + log_printf ("[bar (addr:%p)]", ptr_bar); log_printf (" name . . . . . . . . . : '%s'", ptr_bar->name); log_printf (" hidden . . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_HIDDEN])); log_printf (" priority . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_PRIORITY])); @@ -2475,10 +2474,10 @@ gui_bar_print_log () ptr_bar->items_suffix[i][j]); } } - log_printf (" bar_window . . . . . . : 0x%lx", ptr_bar->bar_window); - log_printf (" bar_refresh_needed . . : %d", ptr_bar->bar_refresh_needed); - log_printf (" prev_bar . . . . . . . : 0x%lx", ptr_bar->prev_bar); - log_printf (" next_bar . . . . . . . : 0x%lx", ptr_bar->next_bar); + log_printf (" bar_window . . . . . . : %p", ptr_bar->bar_window); + log_printf (" bar_refresh_needed . . : %d", ptr_bar->bar_refresh_needed); + log_printf (" prev_bar . . . . . . . : %p", ptr_bar->prev_bar); + log_printf (" next_bar . . . . . . . : %p", ptr_bar->next_bar); if (ptr_bar->bar_window) gui_bar_window_print_log (ptr_bar->bar_window); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 0cbe44881..a5d60d1e6 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -5473,7 +5473,7 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer) char *prefix_without_colors, *message_without_colors, *tags; char buf[256]; - log_printf ("[buffer dump hexa (addr:0x%lx)]", buffer); + log_printf ("[buffer dump hexa (addr:%p)]", buffer); num_line = 1; for (ptr_line = buffer->lines->first_line; ptr_line; ptr_line = ptr_line->next_line) @@ -5555,131 +5555,131 @@ gui_buffer_print_log () int num; log_printf (""); - log_printf ("gui_buffers . . . . . . . . . : 0x%lx", gui_buffers); - log_printf ("last_gui_buffer . . . . . . . : 0x%lx", last_gui_buffer); - log_printf ("gui_buffers_count . . . . . . : %d", gui_buffers_count); - log_printf ("gui_buffers_visited . . . . . : 0x%lx", gui_buffers_visited); - log_printf ("last_gui_buffer_visited . . . : 0x%lx", last_gui_buffer_visited); - log_printf ("gui_buffers_visited_index . . : %d", gui_buffers_visited_index); - log_printf ("gui_buffers_visited_count . . : %d", gui_buffers_visited_count); - log_printf ("gui_buffers_visited_frozen. . : %d", gui_buffers_visited_frozen); - log_printf ("gui_buffer_last_displayed . . : 0x%lx", gui_buffer_last_displayed); + log_printf ("gui_buffers . . . . . . . . . : %p", gui_buffers); + log_printf ("last_gui_buffer . . . . . . . : %p", last_gui_buffer); + log_printf ("gui_buffers_count . . . . . . : %d", gui_buffers_count); + log_printf ("gui_buffers_visited . . . . . : %p", gui_buffers_visited); + log_printf ("last_gui_buffer_visited . . . : %p", last_gui_buffer_visited); + log_printf ("gui_buffers_visited_index . . : %d", gui_buffers_visited_index); + log_printf ("gui_buffers_visited_count . . : %d", gui_buffers_visited_count); + log_printf ("gui_buffers_visited_frozen. . : %d", gui_buffers_visited_frozen); + log_printf ("gui_buffer_last_displayed . . : %p", gui_buffer_last_displayed); for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) { log_printf (""); - log_printf ("[buffer (addr:0x%lx)]", ptr_buffer); - log_printf (" id. . . . . . . . . . . : %lld", ptr_buffer->id); - log_printf (" opening . . . . . . . . : %d", ptr_buffer->opening); - log_printf (" plugin. . . . . . . . . : 0x%lx ('%s')", + log_printf ("[buffer (addr:%p)]", ptr_buffer); + log_printf (" id. . . . . . . . . . . : %lld", ptr_buffer->id); + log_printf (" opening . . . . . . . . : %d", ptr_buffer->opening); + log_printf (" plugin. . . . . . . . . : %p ('%s')", ptr_buffer->plugin, gui_buffer_get_plugin_name (ptr_buffer)); - log_printf (" plugin_name_for_upgrade : '%s'", ptr_buffer->plugin_name_for_upgrade); - log_printf (" number. . . . . . . . . : %d", ptr_buffer->number); - log_printf (" layout_number . . . . . : %d", ptr_buffer->layout_number); - log_printf (" layout_number_merge_order: %d", ptr_buffer->layout_number_merge_order); - log_printf (" name. . . . . . . . . . : '%s'", ptr_buffer->name); - log_printf (" full_name . . . . . . . : '%s'", ptr_buffer->full_name); - log_printf (" old_full_name . . . . . : '%s'", ptr_buffer->old_full_name); - log_printf (" short_name. . . . . . . : '%s'", ptr_buffer->short_name); - log_printf (" type. . . . . . . . . . : %d", ptr_buffer->type); - log_printf (" notify. . . . . . . . . : %d", ptr_buffer->notify); - log_printf (" num_displayed . . . . . : %d", ptr_buffer->num_displayed); - log_printf (" active. . . . . . . . . : %d", ptr_buffer->active); - log_printf (" hidden. . . . . . . . . : %d", ptr_buffer->hidden); - log_printf (" zoomed. . . . . . . . . : %d", ptr_buffer->zoomed); - log_printf (" print_hooks_enabled . . : %d", ptr_buffer->print_hooks_enabled); - log_printf (" day_change. . . . . . . : %d", ptr_buffer->day_change); - log_printf (" clear . . . . . . . . . : %d", ptr_buffer->clear); - log_printf (" filter. . . . . . . . . : %d", ptr_buffer->filter); - log_printf (" close_callback. . . . . : 0x%lx", ptr_buffer->close_callback); - log_printf (" close_callback_pointer. : 0x%lx", ptr_buffer->close_callback_pointer); - log_printf (" close_callback_data . . : 0x%lx", ptr_buffer->close_callback_data); - log_printf (" closing . . . . . . . . : %d", ptr_buffer->closing); - log_printf (" title . . . . . . . . . : '%s'", ptr_buffer->title); - log_printf (" own_lines . . . . . . . : 0x%lx", ptr_buffer->own_lines); + log_printf (" plugin_name_for_upgrade : '%s'", ptr_buffer->plugin_name_for_upgrade); + log_printf (" number. . . . . . . . . : %d", ptr_buffer->number); + log_printf (" layout_number . . . . . : %d", ptr_buffer->layout_number); + log_printf (" layout_number_merge_order: %d", ptr_buffer->layout_number_merge_order); + log_printf (" name. . . . . . . . . . : '%s'", ptr_buffer->name); + log_printf (" full_name . . . . . . . : '%s'", ptr_buffer->full_name); + log_printf (" old_full_name . . . . . : '%s'", ptr_buffer->old_full_name); + log_printf (" short_name. . . . . . . : '%s'", ptr_buffer->short_name); + log_printf (" type. . . . . . . . . . : %d", ptr_buffer->type); + log_printf (" notify. . . . . . . . . : %d", ptr_buffer->notify); + log_printf (" num_displayed . . . . . : %d", ptr_buffer->num_displayed); + log_printf (" active. . . . . . . . . : %d", ptr_buffer->active); + log_printf (" hidden. . . . . . . . . : %d", ptr_buffer->hidden); + log_printf (" zoomed. . . . . . . . . : %d", ptr_buffer->zoomed); + log_printf (" print_hooks_enabled . . : %d", ptr_buffer->print_hooks_enabled); + log_printf (" day_change. . . . . . . : %d", ptr_buffer->day_change); + log_printf (" clear . . . . . . . . . : %d", ptr_buffer->clear); + log_printf (" filter. . . . . . . . . : %d", ptr_buffer->filter); + log_printf (" close_callback. . . . . : %p", ptr_buffer->close_callback); + log_printf (" close_callback_pointer. : %p", ptr_buffer->close_callback_pointer); + log_printf (" close_callback_data . . : %p", ptr_buffer->close_callback_data); + log_printf (" closing . . . . . . . . : %d", ptr_buffer->closing); + log_printf (" title . . . . . . . . . : '%s'", ptr_buffer->title); + log_printf (" own_lines . . . . . . . : %p", ptr_buffer->own_lines); gui_lines_print_log (ptr_buffer->own_lines); - log_printf (" mixed_lines . . . . . . : 0x%lx", ptr_buffer->mixed_lines); + log_printf (" mixed_lines . . . . . . : %p", ptr_buffer->mixed_lines); gui_lines_print_log (ptr_buffer->mixed_lines); - log_printf (" lines . . . . . . . . . : 0x%lx", ptr_buffer->lines); - log_printf (" next_line_id. . . . . . : %d", ptr_buffer->next_line_id); - log_printf (" time_for_each_line. . . : %d", ptr_buffer->time_for_each_line); - log_printf (" chat_refresh_needed . . : %d", ptr_buffer->chat_refresh_needed); - log_printf (" nicklist. . . . . . . . : %d", ptr_buffer->nicklist); - log_printf (" nicklist_case_sensitive : %d", ptr_buffer->nicklist_case_sensitive); - log_printf (" nicklist_root . . . . . : 0x%lx", ptr_buffer->nicklist_root); - log_printf (" nicklist_max_length . . : %d", ptr_buffer->nicklist_max_length); - log_printf (" nicklist_display_groups : %d", ptr_buffer->nicklist_display_groups); - log_printf (" nicklist_count. . . . . : %d", ptr_buffer->nicklist_count); - log_printf (" nicklist_visible_count. : %d", ptr_buffer->nicklist_visible_count); - log_printf (" nicklist_groups_count . : %d", ptr_buffer->nicklist_groups_count); - log_printf (" nicklist_groups_vis_cnt : %d", ptr_buffer->nicklist_groups_visible_count); - log_printf (" nicklist_nicks_count. . : %d", ptr_buffer->nicklist_nicks_count); - log_printf (" nicklist_nicks_vis_cnt. : %d", ptr_buffer->nicklist_nicks_visible_count); - log_printf (" nickcmp_callback. . . . : 0x%lx", ptr_buffer->nickcmp_callback); - log_printf (" nickcmp_callback_pointer: 0x%lx", ptr_buffer->nickcmp_callback_pointer); - log_printf (" nickcmp_callback_data . : 0x%lx", ptr_buffer->nickcmp_callback_data); - log_printf (" input . . . . . . . . . : %d", ptr_buffer->input); - log_printf (" input_callback. . . . . : 0x%lx", ptr_buffer->input_callback); - log_printf (" input_callback_pointer. : 0x%lx", ptr_buffer->input_callback_pointer); - log_printf (" input_callback_data . . : 0x%lx", ptr_buffer->input_callback_data); - log_printf (" input_get_unknown_cmd . : %d", ptr_buffer->input_get_unknown_commands); - log_printf (" input_get_empty . . . . : %d", ptr_buffer->input_get_empty); - log_printf (" input_multiline . . . . : %d", ptr_buffer->input_multiline); - log_printf (" input_buffer. . . . . . : '%s'", ptr_buffer->input_buffer); - log_printf (" input_buffer_alloc. . . : %d", ptr_buffer->input_buffer_alloc); - log_printf (" input_buffer_size . . . : %d", ptr_buffer->input_buffer_size); - log_printf (" input_buffer_length . . : %d", ptr_buffer->input_buffer_length); - log_printf (" input_buffer_pos. . . . : %d", ptr_buffer->input_buffer_pos); - log_printf (" input_buffer_1st_disp . : %d", ptr_buffer->input_buffer_1st_display); - log_printf (" input_undo_snap->data . : '%s'", (ptr_buffer->input_undo_snap)->data); - log_printf (" input_undo_snap->pos. . : %d", (ptr_buffer->input_undo_snap)->pos); - log_printf (" input_undo. . . . . . . : 0x%lx", ptr_buffer->input_undo); - log_printf (" last_input_undo . . . . : 0x%lx", ptr_buffer->last_input_undo); - log_printf (" ptr_input_undo. . . . . : 0x%lx", ptr_buffer->ptr_input_undo); - log_printf (" input_undo_count. . . . : %d", ptr_buffer->input_undo_count); + log_printf (" lines . . . . . . . . . : %p", ptr_buffer->lines); + log_printf (" next_line_id. . . . . . : %d", ptr_buffer->next_line_id); + log_printf (" time_for_each_line. . . : %d", ptr_buffer->time_for_each_line); + log_printf (" chat_refresh_needed . . : %d", ptr_buffer->chat_refresh_needed); + log_printf (" nicklist. . . . . . . . : %d", ptr_buffer->nicklist); + log_printf (" nicklist_case_sensitive : %d", ptr_buffer->nicklist_case_sensitive); + log_printf (" nicklist_root . . . . . : %p", ptr_buffer->nicklist_root); + log_printf (" nicklist_max_length . . : %d", ptr_buffer->nicklist_max_length); + log_printf (" nicklist_display_groups : %d", ptr_buffer->nicklist_display_groups); + log_printf (" nicklist_count. . . . . : %d", ptr_buffer->nicklist_count); + log_printf (" nicklist_visible_count. : %d", ptr_buffer->nicklist_visible_count); + log_printf (" nicklist_groups_count . : %d", ptr_buffer->nicklist_groups_count); + log_printf (" nicklist_groups_vis_cnt : %d", ptr_buffer->nicklist_groups_visible_count); + log_printf (" nicklist_nicks_count. . : %d", ptr_buffer->nicklist_nicks_count); + log_printf (" nicklist_nicks_vis_cnt. : %d", ptr_buffer->nicklist_nicks_visible_count); + log_printf (" nickcmp_callback. . . . : %p", ptr_buffer->nickcmp_callback); + log_printf (" nickcmp_callback_pointer: %p", ptr_buffer->nickcmp_callback_pointer); + log_printf (" nickcmp_callback_data . : %p", ptr_buffer->nickcmp_callback_data); + log_printf (" input . . . . . . . . . : %d", ptr_buffer->input); + log_printf (" input_callback. . . . . : %p", ptr_buffer->input_callback); + log_printf (" input_callback_pointer. : %p", ptr_buffer->input_callback_pointer); + log_printf (" input_callback_data . . : %p", ptr_buffer->input_callback_data); + log_printf (" input_get_unknown_cmd . : %d", ptr_buffer->input_get_unknown_commands); + log_printf (" input_get_empty . . . . : %d", ptr_buffer->input_get_empty); + log_printf (" input_multiline . . . . : %d", ptr_buffer->input_multiline); + log_printf (" input_buffer. . . . . . : '%s'", ptr_buffer->input_buffer); + log_printf (" input_buffer_alloc. . . : %d", ptr_buffer->input_buffer_alloc); + log_printf (" input_buffer_size . . . : %d", ptr_buffer->input_buffer_size); + log_printf (" input_buffer_length . . : %d", ptr_buffer->input_buffer_length); + log_printf (" input_buffer_pos. . . . : %d", ptr_buffer->input_buffer_pos); + log_printf (" input_buffer_1st_disp . : %d", ptr_buffer->input_buffer_1st_display); + log_printf (" input_undo_snap->data . : '%s'", (ptr_buffer->input_undo_snap)->data); + log_printf (" input_undo_snap->pos. . : %d", (ptr_buffer->input_undo_snap)->pos); + log_printf (" input_undo. . . . . . . : %p", ptr_buffer->input_undo); + log_printf (" last_input_undo . . . . : %p", ptr_buffer->last_input_undo); + log_printf (" ptr_input_undo. . . . . : %p", ptr_buffer->ptr_input_undo); + log_printf (" input_undo_count. . . . : %d", ptr_buffer->input_undo_count); num = 0; for (ptr_undo = ptr_buffer->input_undo; ptr_undo; ptr_undo = ptr_undo->next_undo) { - log_printf (" undo[%04d]. . . . . . : 0x%lx ('%s' / %d)", + log_printf (" undo[%04d]. . . . . . : %p ('%s' / %d)", num, ptr_undo, ptr_undo->data, ptr_undo->pos); num++; } - log_printf (" completion. . . . . . . . . . . : 0x%lx", ptr_buffer->completion); - log_printf (" history . . . . . . . . : 0x%lx", ptr_buffer->history); - log_printf (" last_history. . . . . . : 0x%lx", ptr_buffer->last_history); - log_printf (" ptr_history . . . . . . : 0x%lx", ptr_buffer->ptr_history); - log_printf (" num_history . . . . . . : %d", ptr_buffer->num_history); - log_printf (" text_search . . . . . . . . . . : %d", ptr_buffer->text_search); - log_printf (" text_search_direction . . . . . : %d", ptr_buffer->text_search_direction); - log_printf (" text_search_exact . . . . . . . : %d", ptr_buffer->text_search_exact); - log_printf (" text_search_regex . . . . . . . : %d", ptr_buffer->text_search_regex); - log_printf (" text_search_regex_compiled. . . : 0x%lx", ptr_buffer->text_search_regex_compiled); - log_printf (" text_search_where . . . . . . . : %d", ptr_buffer->text_search_where); - log_printf (" text_search_history . . . . . . : %d", ptr_buffer->text_search_history); - log_printf (" text_search_found . . . . . . . : %d", ptr_buffer->text_search_found); - log_printf (" text_search_ptr_history . . . . : 0x%lx", ptr_buffer->text_search_ptr_history); - log_printf (" text_search_input . . . . . . . : '%s'", ptr_buffer->text_search_input); - log_printf (" highlight_words . . . . . . . . : '%s'", ptr_buffer->highlight_words); - log_printf (" highlight_disable_regex . . . . : '%s'", ptr_buffer->highlight_disable_regex); - log_printf (" highlight_disable_regex_compiled: 0x%lx", ptr_buffer->highlight_disable_regex_compiled); - log_printf (" highlight_regex . . . . . . . . : '%s'", ptr_buffer->highlight_regex); - log_printf (" highlight_regex_compiled. . . . : 0x%lx", ptr_buffer->highlight_regex_compiled); - log_printf (" highlight_tags_restrict . . . . : '%s'", ptr_buffer->highlight_tags_restrict); - log_printf (" highlight_tags_restrict_count . : %d", ptr_buffer->highlight_tags_restrict_count); - log_printf (" highlight_tags_restrict_array . : 0x%lx", ptr_buffer->highlight_tags_restrict_array); - log_printf (" highlight_tags. . . . . . . . . : '%s'", ptr_buffer->highlight_tags); - log_printf (" highlight_tags_count. . . . . . : %d", ptr_buffer->highlight_tags_count); - log_printf (" highlight_tags_array. . . . . . : 0x%lx", ptr_buffer->highlight_tags_array); - log_printf (" hotlist . . . . . . . . : 0x%lx", ptr_buffer->hotlist); - log_printf (" hotlist_removed . . . . : 0x%lx", ptr_buffer->hotlist_removed); - log_printf (" keys. . . . . . . . . . : 0x%lx", ptr_buffer->keys); - log_printf (" last_key. . . . . . . . : 0x%lx", ptr_buffer->last_key); - log_printf (" keys_count. . . . . . . : %d", ptr_buffer->keys_count); - log_printf (" local_variables . . . . : 0x%lx", ptr_buffer->local_variables); - log_printf (" prev_buffer . . . . . . : 0x%lx", ptr_buffer->prev_buffer); - log_printf (" next_buffer . . . . . . : 0x%lx", ptr_buffer->next_buffer); + log_printf (" completion. . . . . . . . . . . : %p", ptr_buffer->completion); + log_printf (" history . . . . . . . . . . . . : %p", ptr_buffer->history); + log_printf (" last_history. . . . . . . . . . : %p", ptr_buffer->last_history); + log_printf (" ptr_history . . . . . . . . . . : %p", ptr_buffer->ptr_history); + log_printf (" num_history . . . . . . . . . . : %d", ptr_buffer->num_history); + log_printf (" text_search . . . . . . . . . . : %d", ptr_buffer->text_search); + log_printf (" text_search_direction . . . . . : %d", ptr_buffer->text_search_direction); + log_printf (" text_search_exact . . . . . . . : %d", ptr_buffer->text_search_exact); + log_printf (" text_search_regex . . . . . . . : %d", ptr_buffer->text_search_regex); + log_printf (" text_search_regex_compiled. . . : %p", ptr_buffer->text_search_regex_compiled); + log_printf (" text_search_where . . . . . . . : %d", ptr_buffer->text_search_where); + log_printf (" text_search_history . . . . . . : %d", ptr_buffer->text_search_history); + log_printf (" text_search_found . . . . . . . : %d", ptr_buffer->text_search_found); + log_printf (" text_search_ptr_history . . . . : %p", ptr_buffer->text_search_ptr_history); + log_printf (" text_search_input . . . . . . . : '%s'", ptr_buffer->text_search_input); + log_printf (" highlight_words . . . . . . . . : '%s'", ptr_buffer->highlight_words); + log_printf (" highlight_disable_regex . . . . : '%s'", ptr_buffer->highlight_disable_regex); + log_printf (" highlight_disable_regex_compiled: %p", ptr_buffer->highlight_disable_regex_compiled); + log_printf (" highlight_regex . . . . . . . . : '%s'", ptr_buffer->highlight_regex); + log_printf (" highlight_regex_compiled. . . . : %p", ptr_buffer->highlight_regex_compiled); + log_printf (" highlight_tags_restrict . . . . : '%s'", ptr_buffer->highlight_tags_restrict); + log_printf (" highlight_tags_restrict_count . : %d", ptr_buffer->highlight_tags_restrict_count); + log_printf (" highlight_tags_restrict_array . : %p", ptr_buffer->highlight_tags_restrict_array); + log_printf (" highlight_tags. . . . . . . . . : '%s'", ptr_buffer->highlight_tags); + log_printf (" highlight_tags_count. . . . . . : %d", ptr_buffer->highlight_tags_count); + log_printf (" highlight_tags_array. . . . . . : %p", ptr_buffer->highlight_tags_array); + log_printf (" hotlist . . . . . . . . . . . . : %p", ptr_buffer->hotlist); + log_printf (" hotlist_removed . . . . . . . . : %p", ptr_buffer->hotlist_removed); + log_printf (" keys. . . . . . . . . . . . . . : %p", ptr_buffer->keys); + log_printf (" last_key. . . . . . . . . . . . : %p", ptr_buffer->last_key); + log_printf (" keys_count. . . . . . . . . . . : %d", ptr_buffer->keys_count); + log_printf (" local_variables . . . . . . . . : %p", ptr_buffer->local_variables); + log_printf (" prev_buffer . . . . . . . . . . : %p", ptr_buffer->prev_buffer); + log_printf (" next_buffer . . . . . . . . . . : %p", ptr_buffer->next_buffer); if (ptr_buffer->hotlist_max_level_nicks) { @@ -5749,9 +5749,9 @@ gui_buffer_print_log () ptr_buffer_visited = ptr_buffer_visited->next_buffer) { log_printf (" #%d:", num); - log_printf (" buffer . . . . . . . . : 0x%lx", ptr_buffer_visited->buffer); - log_printf (" prev_buffer. . . . . . : 0x%lx", ptr_buffer_visited->prev_buffer); - log_printf (" next_buffer. . . . . . : 0x%lx", ptr_buffer_visited->next_buffer); + log_printf (" buffer . . . . . . . . : %p", ptr_buffer_visited->buffer); + log_printf (" prev_buffer. . . . . . : %p", ptr_buffer_visited->prev_buffer); + log_printf (" next_buffer. . . . . . : %p", ptr_buffer_visited->next_buffer); num++; } } diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 53d029b27..1b8a19408 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -679,8 +679,8 @@ gui_chat_printf_datetime_tags_internal (struct t_gui_buffer *buffer, if (modifier_data && string) { snprintf (modifier_data, length_data, - "0x%lx;%s", - (unsigned long)buffer, + "%p;%s", + buffer, (tags) ? tags : ""); if (display_time) { diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 7250216f0..6239137a9 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -1657,10 +1657,10 @@ gui_completion_list_words_print_log (struct t_arraylist *list, for (i = 0; i < list->size; i++) { ptr_completion_word = (struct t_gui_completion_word *)(list->data[i]); - log_printf ("[%s (addr:0x%lx)]", name, ptr_completion_word); + log_printf ("[%s (addr:%p)]", name, ptr_completion_word); log_printf (" word. . . . . . . . . . : '%s'", ptr_completion_word->word); - log_printf (" nicklist_completion . . : %d", ptr_completion_word->nick_completion); - log_printf (" count . . . . . . . . . : %d", ptr_completion_word->count); + log_printf (" nicklist_completion . . : %d", ptr_completion_word->nick_completion); + log_printf (" count . . . . . . . . . : %d", ptr_completion_word->count); } } @@ -1676,31 +1676,31 @@ gui_completion_print_log () for (ptr_completion = weechat_completions; ptr_completion; ptr_completion = ptr_completion->next_completion) { - log_printf ("[completion (addr:0x%lx)]", ptr_completion); - log_printf (" plugin. . . . . . . . . . : 0x%lx", ptr_completion->plugin); - log_printf (" buffer. . . . . . . . . . : 0x%lx ('%s')", + log_printf ("[completion (addr:%p)]", ptr_completion); + log_printf (" plugin. . . . . . . . . . : %p", ptr_completion->plugin); + log_printf (" buffer. . . . . . . . . . : %p ('%s')", ptr_completion->buffer, ptr_completion->buffer->full_name); - log_printf (" context . . . . . . . . . : %d", ptr_completion->context); - log_printf (" case_sensitive. . . . . . : %d", ptr_completion->case_sensitive); - log_printf (" base_command. . . . . . . : '%s'", ptr_completion->base_command); - log_printf (" base_command_arg_index. . : %d", ptr_completion->base_command_arg_index); - log_printf (" base_word . . . . . . . . : '%s'", ptr_completion->base_word); - log_printf (" base_word_pos . . . . . . : %d", ptr_completion->base_word_pos); - log_printf (" position. . . . . . . . . : %d", ptr_completion->position); - log_printf (" args. . . . . . . . . . . : '%s'", ptr_completion->args); - log_printf (" direction . . . . . . . . : %d", ptr_completion->direction); - log_printf (" add_space . . . . . . . . : %d", ptr_completion->add_space); - log_printf (" force_partial_completion. : %d", ptr_completion->force_partial_completion); - log_printf (" reverse_partial_completion: %d", ptr_completion->reverse_partial_completion); - log_printf (" list. . . . . . . . . . . : 0x%lx", ptr_completion->list); - log_printf (" word_found. . . . . . . . : '%s'", ptr_completion->word_found); - log_printf (" word_found_is_nick. . . . : %d", ptr_completion->word_found_is_nick); - log_printf (" position_replace. . . . . : %d", ptr_completion->position_replace); - log_printf (" diff_size . . . . . . . . : %d", ptr_completion->diff_size); - log_printf (" diff_length . . . . . . . : %d", ptr_completion->diff_length); - log_printf (" prev_completion . . . . . : 0x%lx", ptr_completion->prev_completion); - log_printf (" next_completion . . . . . : 0x%lx", ptr_completion->next_completion); + log_printf (" context . . . . . . . . . : %d", ptr_completion->context); + log_printf (" case_sensitive. . . . . . : %d", ptr_completion->case_sensitive); + log_printf (" base_command. . . . . . . : '%s'", ptr_completion->base_command); + log_printf (" base_command_arg_index. . : %d", ptr_completion->base_command_arg_index); + log_printf (" base_word . . . . . . . . : '%s'", ptr_completion->base_word); + log_printf (" base_word_pos . . . . . . : %d", ptr_completion->base_word_pos); + log_printf (" position. . . . . . . . . : %d", ptr_completion->position); + log_printf (" args. . . . . . . . . . . : '%s'", ptr_completion->args); + log_printf (" direction . . . . . . . . : %d", ptr_completion->direction); + log_printf (" add_space . . . . . . . . : %d", ptr_completion->add_space); + log_printf (" force_partial_completion. : %d", ptr_completion->force_partial_completion); + log_printf (" reverse_partial_completion: %d", ptr_completion->reverse_partial_completion); + log_printf (" list. . . . . . . . . . . : %p", ptr_completion->list); + log_printf (" word_found. . . . . . . . : '%s'", ptr_completion->word_found); + log_printf (" word_found_is_nick. . . . : %d", ptr_completion->word_found_is_nick); + log_printf (" position_replace. . . . . : %d", ptr_completion->position_replace); + log_printf (" diff_size . . . . . . . . : %d", ptr_completion->diff_size); + log_printf (" diff_length . . . . . . . : %d", ptr_completion->diff_length); + log_printf (" prev_completion . . . . . : %p", ptr_completion->prev_completion); + log_printf (" next_completion . . . . . : %p", ptr_completion->next_completion); if (ptr_completion->list && (ptr_completion->list->size > 0)) { log_printf (""); diff --git a/src/gui/gui-cursor.c b/src/gui/gui-cursor.c index 91c40dacf..bc8f387d0 100644 --- a/src/gui/gui-cursor.c +++ b/src/gui/gui-cursor.c @@ -127,15 +127,15 @@ gui_cursor_display_debug_info () if (focus_info) { snprintf (str_info, sizeof (str_info), - "%s(%d,%d) window:0x%lx, buffer:0x%lx (%s), " - "bar_window:0x%lx (bar: %s, item: %s, line: %d, col: %d), " + "%s(%d,%d) window:%p, buffer:%p (%s), " + "bar_window:%p (bar: %s, item: %s, line: %d, col: %d), " "chat: %d, word: \"%s\"", gui_color_get_custom ("yellow,red"), focus_info->x, focus_info->y, - (unsigned long)focus_info->window, - (unsigned long)focus_info->buffer, + focus_info->window, + focus_info->buffer, (focus_info->buffer) ? (focus_info->buffer)->full_name : "-", - (unsigned long)focus_info->bar_window, + focus_info->bar_window, (focus_info->bar_window) ? ((focus_info->bar_window)->bar)->name : "-", (focus_info->bar_item) ? focus_info->bar_item : "-", focus_info->bar_item_line, diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index d8c42418a..e28f8be17 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -692,21 +692,21 @@ gui_filter_print_log () ptr_filter = ptr_filter->next_filter) { log_printf (""); - log_printf ("[filter (addr:0x%lx)]", ptr_filter); - log_printf (" enabled. . . . . . . . : %d", ptr_filter->enabled); - log_printf (" name . . . . . . . . . : '%s'", ptr_filter->name); - log_printf (" buffer_name. . . . . . : '%s'", ptr_filter->buffer_name); - log_printf (" num_buffers. . . . . . : %d", ptr_filter->num_buffers); - log_printf (" buffers. . . . . . . . : 0x%lx", ptr_filter->buffers); + log_printf ("[filter (addr:%p)]", ptr_filter); + log_printf (" enabled. . . . . . . . : %d", ptr_filter->enabled); + log_printf (" name . . . . . . . . . : '%s'", ptr_filter->name); + log_printf (" buffer_name. . . . . . : '%s'", ptr_filter->buffer_name); + log_printf (" num_buffers. . . . . . : %d", ptr_filter->num_buffers); + log_printf (" buffers. . . . . . . . : %p", ptr_filter->buffers); for (i = 0; i < ptr_filter->num_buffers; i++) { log_printf (" buffers[%03d] . . . . . : '%s'", i, ptr_filter->buffers[i]); } - log_printf (" tags . . . . . . . . . : '%s'", ptr_filter->tags); - log_printf (" regex. . . . . . . . . : '%s'", ptr_filter->regex); - log_printf (" regex_prefix . . . . . : 0x%lx", ptr_filter->regex_prefix); - log_printf (" regex_message. . . . . : 0x%lx", ptr_filter->regex_message); - log_printf (" prev_filter. . . . . . : 0x%lx", ptr_filter->prev_filter); - log_printf (" next_filter. . . . . . : 0x%lx", ptr_filter->next_filter); + log_printf (" tags . . . . . . . . . : '%s'", ptr_filter->tags); + log_printf (" regex. . . . . . . . . : '%s'", ptr_filter->regex); + log_printf (" regex_prefix . . . . . : %p", ptr_filter->regex_prefix); + log_printf (" regex_message. . . . . : %p", ptr_filter->regex_message); + log_printf (" prev_filter. . . . . . : %p", ptr_filter->prev_filter); + log_printf (" next_filter. . . . . . : %p", ptr_filter->next_filter); } } diff --git a/src/gui/gui-history.c b/src/gui/gui-history.c index e2696c808..2f6d2ec08 100644 --- a/src/gui/gui-history.c +++ b/src/gui/gui-history.c @@ -194,8 +194,7 @@ gui_history_add (struct t_gui_buffer *buffer, const char *string) { char *string2, str_buffer[128]; - snprintf (str_buffer, sizeof (str_buffer), - "0x%lx", (unsigned long)(buffer)); + snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); string2 = hook_modifier_exec (NULL, "history_add", str_buffer, string); /* diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 9d661ad57..314f72509 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -851,18 +851,18 @@ gui_hotlist_print_log () for (ptr_hotlist = gui_hotlist; ptr_hotlist; ptr_hotlist = ptr_hotlist->next_hotlist) { - log_printf ("[hotlist (addr:0x%lx)]", ptr_hotlist); - log_printf (" priority . . . . . . . : %d", ptr_hotlist->priority); + log_printf ("[hotlist (addr:%p)]", ptr_hotlist); + log_printf (" priority . . . . . . . : %d", ptr_hotlist->priority); log_printf (" creation_time. . . . . : tv_sec:%ld, tv_usec:%ld", ptr_hotlist->creation_time.tv_sec, ptr_hotlist->creation_time.tv_usec); - log_printf (" buffer . . . . . . . . : 0x%lx", ptr_hotlist->buffer); + log_printf (" buffer . . . . . . . . : %p", ptr_hotlist->buffer); for (i = 0; i < GUI_HOTLIST_NUM_PRIORITIES; i++) { log_printf (" count[%02d]. . . . . . . : %d", i, ptr_hotlist->count[i]); } - log_printf (" prev_hotlist . . . . . : 0x%lx", ptr_hotlist->prev_hotlist); - log_printf (" next_hotlist . . . . . : 0x%lx", ptr_hotlist->next_hotlist); + log_printf (" prev_hotlist . . . . . : %p", ptr_hotlist->prev_hotlist); + log_printf (" next_hotlist . . . . . : %p", ptr_hotlist->next_hotlist); } } diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index fe21733a5..72c9cd937 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -158,8 +158,7 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer, gui_buffer_undo_add (buffer); /* send modifier, and change input if needed */ - snprintf (str_buffer, sizeof (str_buffer), - "0x%lx", (unsigned long)buffer); + snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); new_input = hook_modifier_exec (NULL, "input_text_content", str_buffer, diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index 3db67ad7a..6340566ee 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -3191,7 +3191,7 @@ gui_key_print_log_key (struct t_gui_key *key, const char *prefix) { int area; - log_printf ("%s[key (addr:0x%lx)]", prefix, key); + log_printf ("%s[key (addr:%p)]", prefix, key); log_printf ("%s key. . . . . . . . : '%s'", prefix, key->key); for (area = 0; area < 2; area++) { @@ -3201,11 +3201,11 @@ gui_key_print_log_key (struct t_gui_key *key, const char *prefix) log_printf ("%s area_name[%d] . . . : '%s'", prefix, area, key->area_name[area]); } - log_printf ("%s area_key . . . . . : '%s'", prefix, key->area_key); - log_printf ("%s command. . . . . . : '%s'", prefix, key->command); - log_printf ("%s score. . . . . . . : %d", prefix, key->score); - log_printf ("%s prev_key . . . . . : 0x%lx", prefix, key->prev_key); - log_printf ("%s next_key . . . . . : 0x%lx", prefix, key->next_key); + log_printf ("%s area_key . . . . . : '%s'", prefix, key->area_key); + log_printf ("%s command. . . . . . : '%s'", prefix, key->command); + log_printf ("%s score. . . . . . . : %d", prefix, key->score); + log_printf ("%s prev_key . . . . . : %p", prefix, key->prev_key); + log_printf ("%s next_key . . . . . : %p", prefix, key->next_key); } /* @@ -3220,9 +3220,9 @@ gui_key_print_log (struct t_gui_buffer *buffer) if (buffer) { - log_printf (" keys . . . . . . . . : 0x%lx", buffer->keys); - log_printf (" last_key . . . . . . : 0x%lx", buffer->last_key); - log_printf (" keys_count . . . . . : %d", buffer->keys_count); + log_printf (" keys . . . . . . . . : %p", buffer->keys); + log_printf (" last_key . . . . . . : %p", buffer->last_key); + log_printf (" keys_count . . . . . : %d", buffer->keys_count); for (ptr_key = buffer->keys; ptr_key; ptr_key = ptr_key->next_key) { log_printf (""); @@ -3235,9 +3235,9 @@ gui_key_print_log (struct t_gui_buffer *buffer) { log_printf (""); log_printf ("[keys for context: %s]", gui_key_context_string[context]); - log_printf (" keys . . . . . . . . : 0x%lx", gui_keys[context]); - log_printf (" last_key . . . . . . : 0x%lx", last_gui_key[context]); - log_printf (" keys_count . . . . . : %d", gui_keys_count[context]); + log_printf (" keys . . . . . . . . : %p", gui_keys[context]); + log_printf (" last_key . . . . . . : %p", last_gui_key[context]); + log_printf (" keys_count . . . . . : %d", gui_keys_count[context]); for (ptr_key = gui_keys[context]; ptr_key; ptr_key = ptr_key->next_key) diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c index 9436b9836..e95df3b35 100644 --- a/src/gui/gui-layout.c +++ b/src/gui/gui-layout.c @@ -1089,19 +1089,19 @@ gui_layout_print_log_window (struct t_gui_layout_window *layout_window, int level) { log_printf (""); - log_printf (" [layout window (addr:0x%lx) (%s) (level %d)]", + log_printf (" [layout window (addr:%p) (%s) (level %d)]", layout_window, (layout_window->plugin_name) ? "leaf" : "node", level); - log_printf (" internal_id. . . . . : %d", layout_window->internal_id); - log_printf (" parent_node. . . . . : 0x%lx", layout_window->parent_node); - log_printf (" split_pct. . . . . . : %d", layout_window->split_pct); - log_printf (" split_horiz. . . . . : %d", layout_window->split_horiz); - log_printf (" child1 . . . . . . . : 0x%lx", layout_window->child1); - log_printf (" child2 . . . . . . . : 0x%lx", layout_window->child2); - log_printf (" plugin_name. . . . . : '%s'", layout_window->plugin_name); - log_printf (" buffer_name. . . . . : '%s'", layout_window->buffer_name); + log_printf (" internal_id. . . . . : %d", layout_window->internal_id); + log_printf (" parent_node. . . . . : %p", layout_window->parent_node); + log_printf (" split_pct. . . . . . : %d", layout_window->split_pct); + log_printf (" split_horiz. . . . . : %d", layout_window->split_horiz); + log_printf (" child1 . . . . . . . : %p", layout_window->child1); + log_printf (" child2 . . . . . . . : %p", layout_window->child2); + log_printf (" plugin_name. . . . . : '%s'", layout_window->plugin_name); + log_printf (" buffer_name. . . . . : '%s'", layout_window->buffer_name); if (layout_window->child1) gui_layout_print_log_window (layout_window->child1, level + 1); @@ -1121,30 +1121,30 @@ gui_layout_print_log () struct t_gui_layout_buffer *ptr_layout_buffer; log_printf (""); - log_printf ("gui_layouts . . . . . . . . . : 0x%lx", gui_layouts); - log_printf ("last_gui_layout . . . . . . . : 0x%lx", last_gui_layout); - log_printf ("gui_layout_current. . . . . . : 0x%lx", gui_layout_current); + log_printf ("gui_layouts . . . . . . . . . : %p", gui_layouts); + log_printf ("last_gui_layout . . . . . . . : %p", last_gui_layout); + log_printf ("gui_layout_current. . . . . . : %p", gui_layout_current); for (ptr_layout = gui_layouts; ptr_layout; ptr_layout = ptr_layout->next_layout) { log_printf (""); - log_printf ("[layout \"%s\" (addr:0x%lx)]", ptr_layout->name, ptr_layout); - log_printf (" layout_buffers . . . . : 0x%lx", ptr_layout->layout_buffers); - log_printf (" last_layout_buffer . . : 0x%lx", ptr_layout->last_layout_buffer); - log_printf (" layout_windows . . . . : 0x%lx", ptr_layout->layout_windows); - log_printf (" internal_id. . . . . . : %d", ptr_layout->internal_id); - log_printf (" internal_id_current_win: %d", ptr_layout->internal_id_current_window); + log_printf ("[layout \"%s\" (addr:%p)]", ptr_layout->name, ptr_layout); + log_printf (" layout_buffers . . . . : %p", ptr_layout->layout_buffers); + log_printf (" last_layout_buffer . . : %p", ptr_layout->last_layout_buffer); + log_printf (" layout_windows . . . . : %p", ptr_layout->layout_windows); + log_printf (" internal_id. . . . . . : %d", ptr_layout->internal_id); + log_printf (" internal_id_current_win: %d", ptr_layout->internal_id_current_window); for (ptr_layout_buffer = ptr_layout->layout_buffers; ptr_layout_buffer; ptr_layout_buffer = ptr_layout_buffer->next_layout) { log_printf (""); - log_printf (" [layout buffer (addr:0x%lx)]", ptr_layout_buffer); - log_printf (" plugin_name. . . . . : '%s'", ptr_layout_buffer->plugin_name); - log_printf (" buffer_name. . . . . : '%s'", ptr_layout_buffer->buffer_name); - log_printf (" number . . . . . . . : %d", ptr_layout_buffer->number); - log_printf (" prev_layout. . . . . : 0x%lx", ptr_layout_buffer->prev_layout); - log_printf (" next_layout. . . . . : 0x%lx", ptr_layout_buffer->next_layout); + log_printf (" [layout buffer (addr:%p)]", ptr_layout_buffer); + log_printf (" plugin_name. . . . . : '%s'", ptr_layout_buffer->plugin_name); + log_printf (" buffer_name. . . . . : '%s'", ptr_layout_buffer->buffer_name); + log_printf (" number . . . . . . . : %d", ptr_layout_buffer->number); + log_printf (" prev_layout. . . . . : %p", ptr_layout_buffer->prev_layout); + log_printf (" next_layout. . . . . : %p", ptr_layout_buffer->next_layout); } if (ptr_layout->layout_windows) gui_layout_print_log_window (ptr_layout->layout_windows, 0); diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index bfdd2f1d8..675b6d23d 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -2451,15 +2451,15 @@ gui_lines_print_log (struct t_gui_lines *lines) { if (lines) { - log_printf (" first_line . . . . . . . : 0x%lx", lines->first_line); - log_printf (" last_line. . . . . . . . : 0x%lx", lines->last_line); - log_printf (" last_read_line . . . . . : 0x%lx", lines->last_read_line); - log_printf (" lines_count. . . . . . . : %d", lines->lines_count); - log_printf (" first_line_not_read. . . : %d", lines->first_line_not_read); - log_printf (" lines_hidden . . . . . . : %d", lines->lines_hidden); - log_printf (" buffer_max_length. . . . : %d", lines->buffer_max_length); - log_printf (" buffer_max_length_refresh: %d", lines->buffer_max_length_refresh); - log_printf (" prefix_max_length. . . . : %d", lines->prefix_max_length); - log_printf (" prefix_max_length_refresh: %d", lines->prefix_max_length_refresh); + log_printf (" first_line . . . . . . . : %p", lines->first_line); + log_printf (" last_line. . . . . . . . : %p", lines->last_line); + log_printf (" last_read_line . . . . . : %p", lines->last_read_line); + log_printf (" lines_count. . . . . . . : %d", lines->lines_count); + log_printf (" first_line_not_read. . . : %d", lines->first_line_not_read); + log_printf (" lines_hidden . . . . . . : %d", lines->lines_hidden); + log_printf (" buffer_max_length. . . . : %d", lines->buffer_max_length); + log_printf (" buffer_max_length_refresh: %d", lines->buffer_max_length_refresh); + log_printf (" prefix_max_length. . . . : %d", lines->prefix_max_length); + log_printf (" prefix_max_length_refresh: %d", lines->prefix_max_length_refresh); } } diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index 404cf0e86..535c8c6b8 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -69,8 +69,8 @@ gui_nicklist_send_signal (const char *signal, struct t_gui_buffer *buffer, if (str_args) { snprintf (str_args, length, - "0x%lx,%s", - (unsigned long)(buffer), + "%p,%s", + buffer, (arguments) ? arguments : ""); (void) hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_STRING, str_args); @@ -1270,7 +1270,7 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent) struct t_gui_nick *ptr_nick; snprintf (format, sizeof (format), - "%%-%ds=> group (addr:0x%%lx)", + "%%-%ds=> group (addr:%%p)", (indent * 2) + 4); log_printf (format, " ", group); snprintf (format, sizeof (format), @@ -1286,31 +1286,31 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent) (indent * 2) + 6); log_printf (format, " ", group->visible); snprintf (format, sizeof (format), - "%%-%dsparent. . . : 0x%%lx", + "%%-%dsparent. . . : %%p", (indent * 2) + 6); log_printf (format, " ", group->parent); snprintf (format, sizeof (format), - "%%-%dschildren. . : 0x%%lx", + "%%-%dschildren. . : %%p", (indent * 2) + 6); log_printf (format, " ", group->children); snprintf (format, sizeof (format), - "%%-%dslast_child. : 0x%%lx", + "%%-%dslast_child. : %%p", (indent * 2) + 6); log_printf (format, " ", group->last_child); snprintf (format, sizeof (format), - "%%-%dsnicks . . . : 0x%%lx", + "%%-%dsnicks . . . : %%p", (indent * 2) + 6); log_printf (format, " ", group->nicks); snprintf (format, sizeof (format), - "%%-%dslast_nick . : 0x%%lx", + "%%-%dslast_nick . : %%p", (indent * 2) + 6); log_printf (format, " ", group->last_nick); snprintf (format, sizeof (format), - "%%-%dsprev_group. : 0x%%lx", + "%%-%dsprev_group. : %%p", (indent * 2) + 6); log_printf (format, " ", group->prev_group); snprintf (format, sizeof (format), - "%%-%dsnext_group. : 0x%%lx", + "%%-%dsnext_group. : %%p", (indent * 2) + 6); log_printf (format, " ", group->next_group); @@ -1329,11 +1329,11 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent) ptr_nick = ptr_nick->next_nick) { snprintf (format, sizeof (format), - "%%-%ds=> nick (addr:0x%%lx)", + "%%-%ds=> nick (addr:%%p)", (indent * 2) + 4); log_printf (format, " ", ptr_nick); snprintf (format, sizeof (format), - "%%-%dsgroup . . . . . : 0x%%lx", + "%%-%dsgroup . . . . . : %%p", (indent * 2) + 6); log_printf (format, " ", ptr_nick->group); snprintf (format, sizeof (format), @@ -1357,11 +1357,11 @@ gui_nicklist_print_log (struct t_gui_nick_group *group, int indent) (indent * 2) + 6); log_printf (format, " ", ptr_nick->visible); snprintf (format, sizeof (format), - "%%-%dsprev_nick . . . : 0x%%lx", + "%%-%dsprev_nick . . . : %%p", (indent * 2) + 6); log_printf (format, " ", ptr_nick->prev_nick); snprintf (format, sizeof (format), - "%%-%dsnext_nick . . . : 0x%%lx", + "%%-%dsnext_nick . . . : %%p", (indent * 2) + 6); log_printf (format, " ", ptr_nick->next_nick); } diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 1fbd0b8a4..9db71a39e 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -2108,56 +2108,56 @@ gui_window_print_log () struct t_gui_bar_window *ptr_bar_win; log_printf (""); - log_printf ("gui_windows . . . . . . . . . : 0x%lx", gui_windows); - log_printf ("last_gui_window . . . . . . . : 0x%lx", last_gui_window); - log_printf ("gui_current window. . . . . . : 0x%lx", gui_current_window); - log_printf ("gui_windows_tree. . . . . . . : 0x%lx", gui_windows_tree); + log_printf ("gui_windows . . . . . . . . . : %p", gui_windows); + log_printf ("last_gui_window . . . . . . . : %p", last_gui_window); + log_printf ("gui_current window. . . . . . : %p", gui_current_window); + log_printf ("gui_windows_tree. . . . . . . : %p", gui_windows_tree); for (ptr_window = gui_windows; ptr_window; ptr_window = ptr_window->next_window) { log_printf (""); - log_printf ("[window (addr:0x%lx)]", ptr_window); - log_printf (" number. . . . . . . : %d", ptr_window->number); - log_printf (" win_x . . . . . . . : %d", ptr_window->win_x); - log_printf (" win_y . . . . . . . : %d", ptr_window->win_y); - log_printf (" win_width . . . . . : %d", ptr_window->win_width); - log_printf (" win_height. . . . . : %d", ptr_window->win_height); - log_printf (" win_width_pct . . . : %d", ptr_window->win_width_pct); - log_printf (" win_height_pct. . . : %d", ptr_window->win_height_pct); - log_printf (" win_chat_x. . . . . : %d", ptr_window->win_chat_x); - log_printf (" win_chat_y. . . . . : %d", ptr_window->win_chat_y); - log_printf (" win_chat_width. . . : %d", ptr_window->win_chat_width); - log_printf (" win_chat_height . . : %d", ptr_window->win_chat_height); - log_printf (" win_chat_cursor_x . : %d", ptr_window->win_chat_cursor_x); - log_printf (" win_chat_cursor_y . : %d", ptr_window->win_chat_cursor_y); - log_printf (" refresh_needed. . . : %d", ptr_window->refresh_needed); - log_printf (" gui_objects . . . . : 0x%lx", ptr_window->gui_objects); + log_printf ("[window (addr:%p)]", ptr_window); + log_printf (" number. . . . . . . : %d", ptr_window->number); + log_printf (" win_x . . . . . . . : %d", ptr_window->win_x); + log_printf (" win_y . . . . . . . : %d", ptr_window->win_y); + log_printf (" win_width . . . . . : %d", ptr_window->win_width); + log_printf (" win_height. . . . . : %d", ptr_window->win_height); + log_printf (" win_width_pct . . . : %d", ptr_window->win_width_pct); + log_printf (" win_height_pct. . . : %d", ptr_window->win_height_pct); + log_printf (" win_chat_x. . . . . : %d", ptr_window->win_chat_x); + log_printf (" win_chat_y. . . . . : %d", ptr_window->win_chat_y); + log_printf (" win_chat_width. . . : %d", ptr_window->win_chat_width); + log_printf (" win_chat_height . . : %d", ptr_window->win_chat_height); + log_printf (" win_chat_cursor_x . : %d", ptr_window->win_chat_cursor_x); + log_printf (" win_chat_cursor_y . : %d", ptr_window->win_chat_cursor_y); + log_printf (" refresh_needed. . . : %d", ptr_window->refresh_needed); + log_printf (" gui_objects . . . . : %p", ptr_window->gui_objects); gui_window_objects_print_log (ptr_window); - log_printf (" buffer. . . . . . . : 0x%lx", ptr_window->buffer); - log_printf (" layout_plugin_name. : '%s'", ptr_window->layout_plugin_name); - log_printf (" layout_buffer_name. : '%s'", ptr_window->layout_buffer_name); - log_printf (" scroll. . . . . . . : 0x%lx", ptr_window->scroll); - log_printf (" coords_size . . . . : %d", ptr_window->coords_size); - log_printf (" coords. . . . . . . : 0x%lx", ptr_window->coords); - log_printf (" ptr_tree. . . . . . : 0x%lx", ptr_window->ptr_tree); - log_printf (" prev_window . . . . : 0x%lx", ptr_window->prev_window); - log_printf (" next_window . . . . : 0x%lx", ptr_window->next_window); + log_printf (" buffer. . . . . . . : %p", ptr_window->buffer); + log_printf (" layout_plugin_name. : '%s'", ptr_window->layout_plugin_name); + log_printf (" layout_buffer_name. : '%s'", ptr_window->layout_buffer_name); + log_printf (" scroll. . . . . . . : %p", ptr_window->scroll); + log_printf (" coords_size . . . . : %d", ptr_window->coords_size); + log_printf (" coords. . . . . . . : %p", ptr_window->coords); + log_printf (" ptr_tree. . . . . . : %p", ptr_window->ptr_tree); + log_printf (" prev_window . . . . : %p", ptr_window->prev_window); + log_printf (" next_window . . . . : %p", ptr_window->next_window); for (ptr_scroll = ptr_window->scroll; ptr_scroll; ptr_scroll = ptr_scroll->next_scroll) { log_printf (""); - log_printf (" [scroll (addr:0x%lx)]", ptr_scroll); - log_printf (" buffer. . . . . . . . : 0x%lx", ptr_scroll->buffer); - log_printf (" first_line_displayed. : %d", ptr_scroll->first_line_displayed); - log_printf (" start_line. . . . . . : 0x%lx", ptr_scroll->start_line); - log_printf (" start_line_pos. . . . : %d", ptr_scroll->start_line_pos); - log_printf (" scrolling . . . . . . : %d", ptr_scroll->scrolling); - log_printf (" start_col . . . . . . : %d", ptr_scroll->start_col); - log_printf (" lines_after . . . . . : %d", ptr_scroll->lines_after); - log_printf (" text_search_start_line: 0x%lx", ptr_scroll->text_search_start_line); - log_printf (" prev_scroll . . . . . : 0x%lx", ptr_scroll->prev_scroll); - log_printf (" next_scroll . . . . . : 0x%lx", ptr_scroll->next_scroll); + log_printf (" [scroll (addr:%p)]", ptr_scroll); + log_printf (" buffer. . . . . . . . : %p", ptr_scroll->buffer); + log_printf (" first_line_displayed. : %d", ptr_scroll->first_line_displayed); + log_printf (" start_line. . . . . . : %p", ptr_scroll->start_line); + log_printf (" start_line_pos. . . . : %d", ptr_scroll->start_line_pos); + log_printf (" scrolling . . . . . . : %d", ptr_scroll->scrolling); + log_printf (" start_col . . . . . . : %d", ptr_scroll->start_col); + log_printf (" lines_after . . . . . : %d", ptr_scroll->lines_after); + log_printf (" text_search_start_line: %p", ptr_scroll->text_search_start_line); + log_printf (" prev_scroll . . . . . : %p", ptr_scroll->prev_scroll); + log_printf (" next_scroll . . . . . : %p", ptr_scroll->next_scroll); } for (ptr_bar_win = ptr_window->bar_windows; ptr_bar_win; diff --git a/src/plugins/buflist/buflist-mouse.c b/src/plugins/buflist/buflist-mouse.c index 5f349d29d..087a618c6 100644 --- a/src/plugins/buflist/buflist-mouse.c +++ b/src/plugins/buflist/buflist-mouse.c @@ -155,8 +155,7 @@ end: } /* add pointer and plugin name */ - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)ptr_buffer); + snprintf (str_value, sizeof (str_value), "%p", ptr_buffer); weechat_hashtable_set (info, "pointer", str_value); weechat_hashtable_set (info, "plugin", weechat_buffer_get_string (ptr_buffer, "plugin")); diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index a6cf2f937..75ce9379d 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -692,31 +692,31 @@ exec_print_log () ptr_exec_cmd = ptr_exec_cmd->next_cmd) { weechat_log_printf (""); - weechat_log_printf ("[exec command (addr:0x%lx)]", ptr_exec_cmd); - weechat_log_printf (" number. . . . . . . . . . : %ld", ptr_exec_cmd->number); - weechat_log_printf (" name. . . . . . . . . . . : '%s'", ptr_exec_cmd->name); - weechat_log_printf (" hook. . . . . . . . . . . : 0x%lx", ptr_exec_cmd->hook); - weechat_log_printf (" command . . . . . . . . . : '%s'", ptr_exec_cmd->command); - weechat_log_printf (" pid . . . . . . . . . . . : %d", ptr_exec_cmd->pid); - weechat_log_printf (" detached. . . . . . . . . : %d", ptr_exec_cmd->detached); - weechat_log_printf (" start_time. . . . . . . . : %lld", (long long)ptr_exec_cmd->start_time); - weechat_log_printf (" end_time. . . . . . . . . : %lld", (long long)ptr_exec_cmd->end_time); - weechat_log_printf (" output_to_buffer. . . . . : %d", ptr_exec_cmd->output_to_buffer); - weechat_log_printf (" output_to_buffer_exec_cmd : %d", ptr_exec_cmd->output_to_buffer_exec_cmd); - weechat_log_printf (" output_to_buffer_stderr . : %d", ptr_exec_cmd->output_to_buffer_stderr); - weechat_log_printf (" buffer_full_name. . . . . : '%s'", ptr_exec_cmd->buffer_full_name); - weechat_log_printf (" line_numbers. . . . . . . : %d", ptr_exec_cmd->line_numbers); - weechat_log_printf (" display_rc. . . . . . . . : %d", ptr_exec_cmd->display_rc); - weechat_log_printf (" output_line_nb. . . . . . : %d", ptr_exec_cmd->output_line_nb); - weechat_log_printf (" output_size[stdout] . . . : %d", ptr_exec_cmd->output_size[EXEC_STDOUT]); - weechat_log_printf (" output[stdout]. . . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDOUT]); - weechat_log_printf (" output_size[stderr] . . . : %d", ptr_exec_cmd->output_size[EXEC_STDERR]); - weechat_log_printf (" output[stderr]. . . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDERR]); - weechat_log_printf (" return_code . . . . . . . : %d", ptr_exec_cmd->return_code); - weechat_log_printf (" pipe_command. . . . . . . : '%s'", ptr_exec_cmd->pipe_command); - weechat_log_printf (" hsignal . . . . . . . . . : '%s'", ptr_exec_cmd->hsignal); - weechat_log_printf (" prev_cmd. . . . . . . . . : 0x%lx", ptr_exec_cmd->prev_cmd); - weechat_log_printf (" next_cmd. . . . . . . . . : 0x%lx", ptr_exec_cmd->next_cmd); + weechat_log_printf ("[exec command (addr:%p)]", ptr_exec_cmd); + weechat_log_printf (" number. . . . . . . . . . : %ld", ptr_exec_cmd->number); + weechat_log_printf (" name. . . . . . . . . . . : '%s'", ptr_exec_cmd->name); + weechat_log_printf (" hook. . . . . . . . . . . : %p", ptr_exec_cmd->hook); + weechat_log_printf (" command . . . . . . . . . : '%s'", ptr_exec_cmd->command); + weechat_log_printf (" pid . . . . . . . . . . . : %d", ptr_exec_cmd->pid); + weechat_log_printf (" detached. . . . . . . . . : %d", ptr_exec_cmd->detached); + weechat_log_printf (" start_time. . . . . . . . : %lld", (long long)ptr_exec_cmd->start_time); + weechat_log_printf (" end_time. . . . . . . . . : %lld", (long long)ptr_exec_cmd->end_time); + weechat_log_printf (" output_to_buffer. . . . . : %d", ptr_exec_cmd->output_to_buffer); + weechat_log_printf (" output_to_buffer_exec_cmd : %d", ptr_exec_cmd->output_to_buffer_exec_cmd); + weechat_log_printf (" output_to_buffer_stderr . : %d", ptr_exec_cmd->output_to_buffer_stderr); + weechat_log_printf (" buffer_full_name. . . . . : '%s'", ptr_exec_cmd->buffer_full_name); + weechat_log_printf (" line_numbers. . . . . . . : %d", ptr_exec_cmd->line_numbers); + weechat_log_printf (" display_rc. . . . . . . . : %d", ptr_exec_cmd->display_rc); + weechat_log_printf (" output_line_nb. . . . . . : %d", ptr_exec_cmd->output_line_nb); + weechat_log_printf (" output_size[stdout] . . . : %d", ptr_exec_cmd->output_size[EXEC_STDOUT]); + weechat_log_printf (" output[stdout]. . . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDOUT]); + weechat_log_printf (" output_size[stderr] . . . : %d", ptr_exec_cmd->output_size[EXEC_STDERR]); + weechat_log_printf (" output[stderr]. . . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDERR]); + weechat_log_printf (" return_code . . . . . . . : %d", ptr_exec_cmd->return_code); + weechat_log_printf (" pipe_command. . . . . . . : '%s'", ptr_exec_cmd->pipe_command); + weechat_log_printf (" hsignal . . . . . . . . . : '%s'", ptr_exec_cmd->hsignal); + weechat_log_printf (" prev_cmd. . . . . . . . . : %p", ptr_exec_cmd->prev_cmd); + weechat_log_printf (" next_cmd. . . . . . . . . : %p", ptr_exec_cmd->next_cmd); } } diff --git a/src/plugins/fset/fset-mouse.c b/src/plugins/fset/fset-mouse.c index fb7d61312..795acce10 100644 --- a/src/plugins/fset/fset-mouse.c +++ b/src/plugins/fset/fset-mouse.c @@ -82,8 +82,7 @@ fset_mouse_focus_cb (const void *pointer, void *data, struct t_hashtable *info) if (!ptr_fset_option) return info; - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)ptr_fset_option); + snprintf (str_value, sizeof (str_value), "%p", ptr_fset_option); weechat_hashtable_set (info, "fset_option", str_value); snprintf (str_value, sizeof (str_value), "%ld", option_index); weechat_hashtable_set (info, "fset_option_index", str_value); diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 22661e16f..6b4fbea3a 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -1861,25 +1861,25 @@ fset_option_print_log () if (!ptr_fset_option) continue; weechat_log_printf (""); - weechat_log_printf ("[fset option (addr:0x%lx)]", ptr_fset_option); - weechat_log_printf (" index . . . . . . . . : %d", ptr_fset_option->index); - weechat_log_printf (" file. . . . . . . . . : '%s'", ptr_fset_option->file); - weechat_log_printf (" section . . . . . . . : '%s'", ptr_fset_option->section); - weechat_log_printf (" option. . . . . . . . : '%s'", ptr_fset_option->option); - weechat_log_printf (" name. . . . . . . . . : '%s'", ptr_fset_option->name); - weechat_log_printf (" parent_name . . . . . : '%s'", ptr_fset_option->parent_name); + weechat_log_printf ("[fset option (addr:%p)]", ptr_fset_option); + weechat_log_printf (" index . . . . . . . . : %d", ptr_fset_option->index); + weechat_log_printf (" file. . . . . . . . . : '%s'", ptr_fset_option->file); + weechat_log_printf (" section . . . . . . . : '%s'", ptr_fset_option->section); + weechat_log_printf (" option. . . . . . . . : '%s'", ptr_fset_option->option); + weechat_log_printf (" name. . . . . . . . . : '%s'", ptr_fset_option->name); + weechat_log_printf (" parent_name . . . . . : '%s'", ptr_fset_option->parent_name); weechat_log_printf (" type. . . . . . . . . : %d ('%s')", ptr_fset_option->type, fset_option_type_string[ptr_fset_option->type]); - weechat_log_printf (" default_value . . . . : '%s'", ptr_fset_option->default_value); - weechat_log_printf (" value . . . . . . . . : '%s'", ptr_fset_option->value); - weechat_log_printf (" parent_value. . . . . : '%s'", ptr_fset_option->parent_value); - weechat_log_printf (" min . . . . . . . . . : '%s'", ptr_fset_option->min); - weechat_log_printf (" max . . . . . . . . . : '%s'", ptr_fset_option->max); - weechat_log_printf (" description . . . . . : '%s'", ptr_fset_option->description); - weechat_log_printf (" string_values . . . . : '%s'", ptr_fset_option->string_values); - weechat_log_printf (" allowed_values. . . . : '%s'", ptr_fset_option->allowed_values); - weechat_log_printf (" marked. . . . . . . . : %d", ptr_fset_option->marked); + weechat_log_printf (" default_value . . . . : '%s'", ptr_fset_option->default_value); + weechat_log_printf (" value . . . . . . . . : '%s'", ptr_fset_option->value); + weechat_log_printf (" parent_value. . . . . : '%s'", ptr_fset_option->parent_value); + weechat_log_printf (" min . . . . . . . . . : '%s'", ptr_fset_option->min); + weechat_log_printf (" max . . . . . . . . . : '%s'", ptr_fset_option->max); + weechat_log_printf (" description . . . . . : '%s'", ptr_fset_option->description); + weechat_log_printf (" string_values . . . . : '%s'", ptr_fset_option->string_values); + weechat_log_printf (" allowed_values. . . . : '%s'", ptr_fset_option->allowed_values); + weechat_log_printf (" marked. . . . . . . . : %d", ptr_fset_option->marked); } } diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index d53f80235..4587c6153 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -806,8 +806,7 @@ irc_bar_item_focus_buffer_nicklist (const void *pointer, void *data, ptr_nick = irc_nick_search (ptr_server, ptr_channel, nick); if (ptr_nick) { - snprintf (str_value, sizeof (str_value), - "0x%lx", (unsigned long)ptr_nick); + snprintf (str_value, sizeof (str_value), "%p", ptr_nick); weechat_hashtable_set (info, "irc_nick", str_value); if (ptr_nick->host) diff --git a/src/plugins/irc/irc-batch.c b/src/plugins/irc/irc-batch.c index 0257872e7..8ad01b90d 100644 --- a/src/plugins/irc/irc-batch.c +++ b/src/plugins/irc/irc-batch.c @@ -565,22 +565,22 @@ irc_batch_print_log (struct t_irc_server *server) ptr_batch = ptr_batch->next_batch) { weechat_log_printf (""); - weechat_log_printf (" => batch (addr:0x%lx):", ptr_batch); - weechat_log_printf (" reference . . . . . : '%s'", ptr_batch->reference); - weechat_log_printf (" parent_ref. . . . . : '%s'", ptr_batch->parent_ref); - weechat_log_printf (" type. . . . . . . . : '%s'", ptr_batch->type); - weechat_log_printf (" parameters. . . . . : '%s'", ptr_batch->parameters); - weechat_log_printf (" tags. . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" => batch (addr:%p):", ptr_batch); + weechat_log_printf (" reference . . . . . : '%s'", ptr_batch->reference); + weechat_log_printf (" parent_ref. . . . . : '%s'", ptr_batch->parent_ref); + weechat_log_printf (" type. . . . . . . . : '%s'", ptr_batch->type); + weechat_log_printf (" parameters. . . . . : '%s'", ptr_batch->parameters); + weechat_log_printf (" tags. . . . . . . . : %p (hashtable: '%s')", ptr_batch->tags, weechat_hashtable_get_string (ptr_batch->tags, "keys_values")); - weechat_log_printf (" start_time. . . . . : %lld", (long long)ptr_batch->start_time); - weechat_log_printf (" message . . . . . . : 0x%lx ('%s')", + weechat_log_printf (" start_time. . . . . : %lld", (long long)ptr_batch->start_time); + weechat_log_printf (" message . . . . . . : %p ('%s')", ptr_batch->messages, (ptr_batch->messages) ? *(ptr_batch->messages) : NULL); - weechat_log_printf (" end_received. . . . : %d", ptr_batch->end_received); - weechat_log_printf (" messages_processed. : %d", ptr_batch->messages_processed); - weechat_log_printf (" prev_batch. . . . . : 0x%lx", ptr_batch->prev_batch); - weechat_log_printf (" next_batch. . . . . : 0x%lx", ptr_batch->next_batch); + weechat_log_printf (" end_received. . . . : %d", ptr_batch->end_received); + weechat_log_printf (" messages_processed. : %d", ptr_batch->messages_processed); + weechat_log_printf (" prev_batch. . . . . : %p", ptr_batch->prev_batch); + weechat_log_printf (" next_batch. . . . . : %p", ptr_batch->next_batch); } } diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index ddb7fb5da..1b45f17df 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -1790,43 +1790,43 @@ irc_channel_print_log (struct t_irc_channel *channel) struct t_irc_modelist *ptr_modelist; weechat_log_printf (""); - weechat_log_printf (" => channel %s (addr:0x%lx):", channel->name, channel); - weechat_log_printf (" type . . . . . . . . . . : %d", channel->type); - weechat_log_printf (" topic. . . . . . . . . . : '%s'", channel->topic); - weechat_log_printf (" modes. . . . . . . . . . : '%s'", channel->modes); - weechat_log_printf (" limit. . . . . . . . . . : %d", channel->limit); - weechat_log_printf (" key. . . . . . . . . . . : '%s'", channel->key); - weechat_log_printf (" join_msg_received. . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" => channel %s (addr:%p):", channel->name, channel); + weechat_log_printf (" type . . . . . . . . . . : %d", channel->type); + weechat_log_printf (" topic. . . . . . . . . . : '%s'", channel->topic); + weechat_log_printf (" modes. . . . . . . . . . : '%s'", channel->modes); + weechat_log_printf (" limit. . . . . . . . . . : %d", channel->limit); + weechat_log_printf (" key. . . . . . . . . . . : '%s'", channel->key); + weechat_log_printf (" join_msg_received. . . . : %p (hashtable: '%s')", channel->join_msg_received, weechat_hashtable_get_string (channel->join_msg_received, "keys_values")); - weechat_log_printf (" checking_whox. . . . . . : %d", channel->checking_whox); - weechat_log_printf (" away_message . . . . . . : '%s'", channel->away_message); - weechat_log_printf (" has_quit_server. . . . . : %d", channel->has_quit_server); - weechat_log_printf (" cycle. . . . . . . . . . : %d", channel->cycle); - weechat_log_printf (" part . . . . . . . . . . : %d", channel->part); - weechat_log_printf (" nick_completion_reset. . : %d", channel->nick_completion_reset); - weechat_log_printf (" pv_remote_nick_color . . : '%s'", channel->pv_remote_nick_color); - weechat_log_printf (" hook_autorejoin. . . . . : 0x%lx", channel->hook_autorejoin); - weechat_log_printf (" nicks_count. . . . . . . : %d", channel->nicks_count); - weechat_log_printf (" nicks. . . . . . . . . . : 0x%lx", channel->nicks); - weechat_log_printf (" last_nick. . . . . . . . : 0x%lx", channel->last_nick); - weechat_log_printf (" nicks_speaking[0]. . . . : 0x%lx", channel->nicks_speaking[0]); - weechat_log_printf (" nicks_speaking[1]. . . . : 0x%lx", channel->nicks_speaking[1]); - weechat_log_printf (" nicks_speaking_time. . . : 0x%lx", channel->nicks_speaking_time); - weechat_log_printf (" last_nick_speaking_time. : 0x%lx", channel->last_nick_speaking_time); - weechat_log_printf (" modelists. . . . . . . . : 0x%lx", channel->modelists); - weechat_log_printf (" last_modelist. . . . . . : 0x%lx", channel->last_modelist); - weechat_log_printf (" join_smart_filtered. . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" checking_whox. . . . . . : %d", channel->checking_whox); + weechat_log_printf (" away_message . . . . . . : '%s'", channel->away_message); + weechat_log_printf (" has_quit_server. . . . . : %d", channel->has_quit_server); + weechat_log_printf (" cycle. . . . . . . . . . : %d", channel->cycle); + weechat_log_printf (" part . . . . . . . . . . : %d", channel->part); + weechat_log_printf (" nick_completion_reset. . : %d", channel->nick_completion_reset); + weechat_log_printf (" pv_remote_nick_color . . : '%s'", channel->pv_remote_nick_color); + weechat_log_printf (" hook_autorejoin. . . . . : %p", channel->hook_autorejoin); + weechat_log_printf (" nicks_count. . . . . . . : %d", channel->nicks_count); + weechat_log_printf (" nicks. . . . . . . . . . : %p", channel->nicks); + weechat_log_printf (" last_nick. . . . . . . . : %p", channel->last_nick); + weechat_log_printf (" nicks_speaking[0]. . . . : %p", channel->nicks_speaking[0]); + weechat_log_printf (" nicks_speaking[1]. . . . : %p", channel->nicks_speaking[1]); + weechat_log_printf (" nicks_speaking_time. . . : %p", channel->nicks_speaking_time); + weechat_log_printf (" last_nick_speaking_time. : %p", channel->last_nick_speaking_time); + weechat_log_printf (" modelists. . . . . . . . : %p", channel->modelists); + weechat_log_printf (" last_modelist. . . . . . : %p", channel->last_modelist); + weechat_log_printf (" join_smart_filtered. . . : %p (hashtable: '%s')", channel->join_smart_filtered, weechat_hashtable_get_string (channel->join_smart_filtered, "keys_values")); - weechat_log_printf (" typing_state . . . . . . : %d", channel->typing_state); - weechat_log_printf (" typing_status_sent . . . : %lld", (long long)channel->typing_status_sent); - weechat_log_printf (" buffer . . . . . . . . . : 0x%lx", channel->buffer); - weechat_log_printf (" buffer_as_string . . . . : '%s'", channel->buffer_as_string); - weechat_log_printf (" prev_channel . . . . . . : 0x%lx", channel->prev_channel); - weechat_log_printf (" next_channel . . . . . . : 0x%lx", channel->next_channel); + weechat_log_printf (" typing_state . . . . . . : %d", channel->typing_state); + weechat_log_printf (" typing_status_sent . . . : %lld", (long long)channel->typing_status_sent); + weechat_log_printf (" buffer . . . . . . . . . : %p", channel->buffer); + weechat_log_printf (" buffer_as_string . . . . : '%s'", channel->buffer_as_string); + weechat_log_printf (" prev_channel . . . . . . : %p", channel->prev_channel); + weechat_log_printf (" next_channel . . . . . . : %p", channel->next_channel); for (i = 0; i < 2; i++) { if (channel->nicks_speaking[i]) diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c index 92b4adaf7..57d408ee8 100644 --- a/src/plugins/irc/irc-ignore.c +++ b/src/plugins/irc/irc-ignore.c @@ -425,13 +425,13 @@ irc_ignore_print_log () ptr_ignore = ptr_ignore->next_ignore) { weechat_log_printf (""); - weechat_log_printf ("[ignore (addr:0x%lx)]", ptr_ignore); - weechat_log_printf (" number . . . . . . . : %d", ptr_ignore->number); - weechat_log_printf (" mask . . . . . . . . : '%s'", ptr_ignore->mask); - weechat_log_printf (" regex_mask . . . . . : 0x%lx", ptr_ignore->regex_mask); - weechat_log_printf (" server . . . . . . . : '%s'", ptr_ignore->server); - weechat_log_printf (" channel. . . . . . . : '%s'", ptr_ignore->channel); - weechat_log_printf (" prev_ignore. . . . . : 0x%lx", ptr_ignore->prev_ignore); - weechat_log_printf (" next_ignore. . . . . : 0x%lx", ptr_ignore->next_ignore); + weechat_log_printf ("[ignore (addr:%p)]", ptr_ignore); + weechat_log_printf (" number . . . . . . . : %d", ptr_ignore->number); + weechat_log_printf (" mask . . . . . . . . : '%s'", ptr_ignore->mask); + weechat_log_printf (" regex_mask . . . . . : %p", ptr_ignore->regex_mask); + weechat_log_printf (" server . . . . . . . : '%s'", ptr_ignore->server); + weechat_log_printf (" channel. . . . . . . : '%s'", ptr_ignore->channel); + weechat_log_printf (" prev_ignore. . . . . : %p", ptr_ignore->prev_ignore); + weechat_log_printf (" next_ignore. . . . . : %p", ptr_ignore->next_ignore); } } diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index ea7329b98..cada8c375 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -57,7 +57,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer) *string = malloc (64); if (*string) { - snprintf (*string, 64, "0x%lx", (unsigned long)pointer); + snprintf (*string, 64, "%p", pointer); } } } diff --git a/src/plugins/irc/irc-modelist.c b/src/plugins/irc/irc-modelist.c index 48910efa8..72fa0ade6 100644 --- a/src/plugins/irc/irc-modelist.c +++ b/src/plugins/irc/irc-modelist.c @@ -478,13 +478,13 @@ void irc_modelist_item_print_log (struct t_irc_modelist_item *item) { weechat_log_printf (""); - weechat_log_printf (" => modelist item %d (addr:0x%lx):", item->number, item); + weechat_log_printf (" => modelist item %d (addr:%p):", item->number, item); weechat_log_printf (" mask . . . . . . . . . . : '%s'", item->mask); weechat_log_printf (" setter . . . . . . . . . : '%s'", item->setter); weechat_log_printf (" datetime . . . . . . . . : %lld", (long long)(item->datetime)); - weechat_log_printf (" prev_item . . . . . . . : 0x%lx", item->prev_item); - weechat_log_printf (" next_item . . . . . . . : 0x%lx", item->next_item); + weechat_log_printf (" prev_item . . . . . . . : %p", item->prev_item); + weechat_log_printf (" next_item . . . . . . . : %p", item->next_item); } /* @@ -497,10 +497,10 @@ irc_modelist_print_log (struct t_irc_modelist *modelist) struct t_irc_modelist_item *ptr_item; weechat_log_printf (""); - weechat_log_printf (" => modelist \"%c\" (addr:0x%lx):", modelist->type, modelist); - weechat_log_printf (" state. . . . . . . . . . : %d", modelist->state); - weechat_log_printf (" prev_modelist . . . . . : 0x%lx", modelist->prev_modelist); - weechat_log_printf (" next_modelist . . . . . : 0x%lx", modelist->next_modelist); + weechat_log_printf (" => modelist \"%c\" (addr:%p):", modelist->type, modelist); + weechat_log_printf (" state. . . . . . . . . . : %d", modelist->state); + weechat_log_printf (" prev_modelist . . . . . : %p", modelist->prev_modelist); + weechat_log_printf (" next_modelist . . . . . : %p", modelist->next_modelist); for (ptr_item = modelist->items; ptr_item; ptr_item = ptr_item->next_item) { irc_modelist_item_print_log (ptr_item); diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index d6b1ce08e..f00bbc006 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -1200,14 +1200,14 @@ void irc_nick_print_log (struct t_irc_nick *nick) { weechat_log_printf (""); - weechat_log_printf (" => nick %s (addr:0x%lx):", nick->name, nick); - weechat_log_printf (" host . . . . . : '%s'", nick->host); - weechat_log_printf (" prefixes . . . : '%s'", nick->prefixes); - weechat_log_printf (" prefix . . . . : '%s'", nick->prefix); - weechat_log_printf (" away . . . . . : %d", nick->away); - weechat_log_printf (" account. . . . : '%s'", nick->account); - weechat_log_printf (" realname . . . : '%s'", nick->realname); - weechat_log_printf (" color. . . . . : '%s'", nick->color); - weechat_log_printf (" prev_nick. . . : 0x%lx", nick->prev_nick); - weechat_log_printf (" next_nick. . . : 0x%lx", nick->next_nick); + weechat_log_printf (" => nick %s (addr:%p):", nick->name, nick); + weechat_log_printf (" host . . . . . : '%s'", nick->host); + weechat_log_printf (" prefixes . . . : '%s'", nick->prefixes); + weechat_log_printf (" prefix . . . . : '%s'", nick->prefix); + weechat_log_printf (" away . . . . . : %d", nick->away); + weechat_log_printf (" account. . . . : '%s'", nick->account); + weechat_log_printf (" realname . . . : '%s'", nick->realname); + weechat_log_printf (" color. . . . . : '%s'", nick->color); + weechat_log_printf (" prev_nick. . . : %p", nick->prev_nick); + weechat_log_printf (" next_nick. . . : %p", nick->next_nick); } diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c index 836b71d5c..a5cafafbe 100644 --- a/src/plugins/irc/irc-notify.c +++ b/src/plugins/irc/irc-notify.c @@ -1242,15 +1242,15 @@ irc_notify_print_log (struct t_irc_server *server) ptr_notify = ptr_notify->next_notify) { weechat_log_printf (""); - weechat_log_printf (" => notify (addr:0x%lx):", ptr_notify); - weechat_log_printf (" server. . . . . . . : 0x%lx", ptr_notify->server); - weechat_log_printf (" nick. . . . . . . . : '%s'", ptr_notify->nick); - weechat_log_printf (" check_away. . . . . : %d", ptr_notify->check_away); - weechat_log_printf (" is_on_server. . . . : %d", ptr_notify->is_on_server); - weechat_log_printf (" away_message. . . . : '%s'", ptr_notify->away_message); - weechat_log_printf (" ison_received . . . : %d", ptr_notify->ison_received); - weechat_log_printf (" prev_notify . . . . : 0x%lx", ptr_notify->prev_notify); - weechat_log_printf (" next_notify . . . . : 0x%lx", ptr_notify->next_notify); + weechat_log_printf (" => notify (addr:%p):", ptr_notify); + weechat_log_printf (" server. . . . . . . : %p", ptr_notify->server); + weechat_log_printf (" nick. . . . . . . . : '%s'", ptr_notify->nick); + weechat_log_printf (" check_away. . . . . : %d", ptr_notify->check_away); + weechat_log_printf (" is_on_server. . . . : %d", ptr_notify->is_on_server); + weechat_log_printf (" away_message. . . . : '%s'", ptr_notify->away_message); + weechat_log_printf (" ison_received . . . : %d", ptr_notify->ison_received); + weechat_log_printf (" prev_notify . . . . : %p", ptr_notify->prev_notify); + weechat_log_printf (" next_notify . . . . : %p", ptr_notify->next_notify); } } diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index 6a6c8e36f..ae417e089 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -1201,15 +1201,15 @@ irc_redirect_pattern_print_log () ptr_redirect_pattern = ptr_redirect_pattern->next_redirect) { weechat_log_printf (""); - weechat_log_printf ("[redirect_pattern (addr:0x%lx)]", ptr_redirect_pattern); - weechat_log_printf (" name . . . . . . . . : '%s'", ptr_redirect_pattern->name); - weechat_log_printf (" temp_pattern . . . . : %d", ptr_redirect_pattern->temp_pattern); - weechat_log_printf (" timeout. . . . . . . : %d", ptr_redirect_pattern->timeout); - weechat_log_printf (" cmd_start. . . . . . : '%s'", ptr_redirect_pattern->cmd_start); - weechat_log_printf (" cmd_stop . . . . . . : '%s'", ptr_redirect_pattern->cmd_stop); - weechat_log_printf (" cmd_extra. . . . . . : '%s'", ptr_redirect_pattern->cmd_extra); - weechat_log_printf (" prev_redirect. . . . : 0x%lx", ptr_redirect_pattern->prev_redirect); - weechat_log_printf (" next_redirect. . . . : 0x%lx", ptr_redirect_pattern->next_redirect); + weechat_log_printf ("[redirect_pattern (addr:%p)]", ptr_redirect_pattern); + weechat_log_printf (" name . . . . . . . . : '%s'", ptr_redirect_pattern->name); + weechat_log_printf (" temp_pattern . . . . : %d", ptr_redirect_pattern->temp_pattern); + weechat_log_printf (" timeout. . . . . . . : %d", ptr_redirect_pattern->timeout); + weechat_log_printf (" cmd_start. . . . . . : '%s'", ptr_redirect_pattern->cmd_start); + weechat_log_printf (" cmd_stop . . . . . . : '%s'", ptr_redirect_pattern->cmd_stop); + weechat_log_printf (" cmd_extra. . . . . . : '%s'", ptr_redirect_pattern->cmd_extra); + weechat_log_printf (" prev_redirect. . . . : %p", ptr_redirect_pattern->prev_redirect); + weechat_log_printf (" next_redirect. . . . : %p", ptr_redirect_pattern->next_redirect); } } @@ -1226,36 +1226,36 @@ irc_redirect_print_log (struct t_irc_server *server) ptr_redirect = ptr_redirect->next_redirect) { weechat_log_printf (""); - weechat_log_printf (" => redirect (addr:0x%lx):", ptr_redirect); - weechat_log_printf (" server. . . . . . . : 0x%lx ('%s')", + weechat_log_printf (" => redirect (addr:%p):", ptr_redirect); + weechat_log_printf (" server. . . . . . . : %p ('%s')", ptr_redirect->server, ptr_redirect->server->name); - weechat_log_printf (" pattern . . . . . . : '%s'", ptr_redirect->pattern); - weechat_log_printf (" signal. . . . . . . : '%s'", ptr_redirect->signal); - weechat_log_printf (" count . . . . . . . : %d", ptr_redirect->count); - weechat_log_printf (" current_count . . . : %d", ptr_redirect->current_count); - weechat_log_printf (" string. . . . . . . : '%s'", ptr_redirect->string); - weechat_log_printf (" timeout . . . . . . : %d", ptr_redirect->timeout); - weechat_log_printf (" command . . . . . . : '%s'", ptr_redirect->command); - weechat_log_printf (" assigned_to_command : %d", ptr_redirect->assigned_to_command); - weechat_log_printf (" start_time. . . . . : %lld", (long long)ptr_redirect->start_time); - weechat_log_printf (" cmd_start . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" pattern . . . . . . : '%s'", ptr_redirect->pattern); + weechat_log_printf (" signal. . . . . . . : '%s'", ptr_redirect->signal); + weechat_log_printf (" count . . . . . . . : %d", ptr_redirect->count); + weechat_log_printf (" current_count . . . : %d", ptr_redirect->current_count); + weechat_log_printf (" string. . . . . . . : '%s'", ptr_redirect->string); + weechat_log_printf (" timeout . . . . . . : %d", ptr_redirect->timeout); + weechat_log_printf (" command . . . . . . : '%s'", ptr_redirect->command); + weechat_log_printf (" assigned_to_command : %d", ptr_redirect->assigned_to_command); + weechat_log_printf (" start_time. . . . . : %lld", (long long)ptr_redirect->start_time); + weechat_log_printf (" cmd_start . . . . . : %p (hashtable: '%s')", ptr_redirect->cmd_start, weechat_hashtable_get_string (ptr_redirect->cmd_start, "keys_values")); - weechat_log_printf (" cmd_stop. . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" cmd_stop. . . . . . : %p (hashtable: '%s')", ptr_redirect->cmd_stop, weechat_hashtable_get_string (ptr_redirect->cmd_stop, "keys_values")); - weechat_log_printf (" cmd_extra . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" cmd_extra . . . . . : %p (hashtable: '%s')", ptr_redirect->cmd_extra, weechat_hashtable_get_string (ptr_redirect->cmd_extra, "keys_values")); - weechat_log_printf (" cmd_start_received. : %d", ptr_redirect->cmd_start_received); - weechat_log_printf (" cmd_stop_received . : %d", ptr_redirect->cmd_stop_received); - weechat_log_printf (" cmd_filter. . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" cmd_start_received. : %d", ptr_redirect->cmd_start_received); + weechat_log_printf (" cmd_stop_received . : %d", ptr_redirect->cmd_stop_received); + weechat_log_printf (" cmd_filter. . . . . : %p (hashtable: '%s')", ptr_redirect->cmd_filter, weechat_hashtable_get_string (ptr_redirect->cmd_filter, "keys_values")); - weechat_log_printf (" output. . . . . . . : '%s'", ptr_redirect->output); - weechat_log_printf (" output_size . . . . : %d", ptr_redirect->output_size); - weechat_log_printf (" prev_redirect . . . : 0x%lx", ptr_redirect->prev_redirect); - weechat_log_printf (" next_redirect . . . : 0x%lx", ptr_redirect->next_redirect); + weechat_log_printf (" output. . . . . . . : '%s'", ptr_redirect->output); + weechat_log_printf (" output_size . . . . : %d", ptr_redirect->output_size); + weechat_log_printf (" prev_redirect . . . : %p", ptr_redirect->prev_redirect); + weechat_log_printf (" next_redirect . . . : %p", ptr_redirect->next_redirect); } } diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index a7ab847b4..d403b714d 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -7044,7 +7044,7 @@ irc_server_print_log () ptr_server = ptr_server->next_server) { weechat_log_printf (""); - weechat_log_printf ("[server %s (addr:0x%lx)]", ptr_server->name, ptr_server); + weechat_log_printf ("[server %s (addr:%p)]", ptr_server->name, ptr_server); /* addresses */ if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_ADDRESSES])) weechat_log_printf (" addresses . . . . . . . . : null ('%s')", @@ -7334,139 +7334,139 @@ irc_server_print_log () weechat_log_printf (" msg_quit. . . . . . . . . : '%s'", weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_MSG_QUIT])); /* other server variables */ - weechat_log_printf (" temp_server . . . . . . . : %d", ptr_server->temp_server); - weechat_log_printf (" fake_server . . . . . . . : %d", ptr_server->fake_server); - weechat_log_printf (" reloading_from_config . . : %d", ptr_server->reloaded_from_config); - weechat_log_printf (" reloaded_from_config. . . : %d", ptr_server->reloaded_from_config); - weechat_log_printf (" addresses_eval. . . . . . : '%s'", ptr_server->addresses_eval); - weechat_log_printf (" addresses_count . . . . . : %d", ptr_server->addresses_count); - weechat_log_printf (" addresses_array . . . . . : 0x%lx", ptr_server->addresses_array); - weechat_log_printf (" ports_array . . . . . . . : 0x%lx", ptr_server->ports_array); - weechat_log_printf (" retry_array . . . . . . . : 0x%lx", ptr_server->retry_array); - weechat_log_printf (" index_current_address . . : %d", ptr_server->index_current_address); - weechat_log_printf (" current_address . . . . . : '%s'", ptr_server->current_address); - weechat_log_printf (" current_ip. . . . . . . . : '%s'", ptr_server->current_ip); - weechat_log_printf (" current_port. . . . . . . : %d", ptr_server->current_port); - weechat_log_printf (" current_retry . . . . . . : %d", ptr_server->current_retry); - weechat_log_printf (" sock. . . . . . . . . . . : %d", ptr_server->sock); - weechat_log_printf (" hook_connect. . . . . . . : 0x%lx", ptr_server->hook_connect); - weechat_log_printf (" hook_fd . . . . . . . . . : 0x%lx", ptr_server->hook_fd); - weechat_log_printf (" hook_timer_connection . . : 0x%lx", ptr_server->hook_timer_connection); - weechat_log_printf (" hook_timer_sasl . . . . . : 0x%lx", ptr_server->hook_timer_sasl); - weechat_log_printf (" hook_timer_anti_flood . . : 0x%lx", ptr_server->hook_timer_anti_flood); - weechat_log_printf (" sasl_scram_client_first . : '%s'", ptr_server->sasl_scram_client_first); + weechat_log_printf (" temp_server . . . . . . . : %d", ptr_server->temp_server); + weechat_log_printf (" fake_server . . . . . . . : %d", ptr_server->fake_server); + weechat_log_printf (" reloading_from_config . . : %d", ptr_server->reloaded_from_config); + weechat_log_printf (" reloaded_from_config. . . : %d", ptr_server->reloaded_from_config); + weechat_log_printf (" addresses_eval. . . . . . : '%s'", ptr_server->addresses_eval); + weechat_log_printf (" addresses_count . . . . . : %d", ptr_server->addresses_count); + weechat_log_printf (" addresses_array . . . . . : %p", ptr_server->addresses_array); + weechat_log_printf (" ports_array . . . . . . . : %p", ptr_server->ports_array); + weechat_log_printf (" retry_array . . . . . . . : %p", ptr_server->retry_array); + weechat_log_printf (" index_current_address . . : %d", ptr_server->index_current_address); + weechat_log_printf (" current_address . . . . . : '%s'", ptr_server->current_address); + weechat_log_printf (" current_ip. . . . . . . . : '%s'", ptr_server->current_ip); + weechat_log_printf (" current_port. . . . . . . : %d", ptr_server->current_port); + weechat_log_printf (" current_retry . . . . . . : %d", ptr_server->current_retry); + weechat_log_printf (" sock. . . . . . . . . . . : %d", ptr_server->sock); + weechat_log_printf (" hook_connect. . . . . . . : %p", ptr_server->hook_connect); + weechat_log_printf (" hook_fd . . . . . . . . . : %p", ptr_server->hook_fd); + weechat_log_printf (" hook_timer_connection . . : %p", ptr_server->hook_timer_connection); + weechat_log_printf (" hook_timer_sasl . . . . . : %p", ptr_server->hook_timer_sasl); + weechat_log_printf (" hook_timer_anti_flood . . : %p", ptr_server->hook_timer_anti_flood); + weechat_log_printf (" sasl_scram_client_first . : '%s'", ptr_server->sasl_scram_client_first); weechat_log_printf (" sasl_scram_salted_pwd . . : (hidden)"); - weechat_log_printf (" sasl_scram_salted_pwd_size: %d", ptr_server->sasl_scram_salted_pwd_size); + weechat_log_printf (" sasl_scram_salted_pwd_size: %d", ptr_server->sasl_scram_salted_pwd_size); weechat_log_printf (" sasl_scram_auth_message . : (hidden)"); - weechat_log_printf (" sasl_temp_username. . . . : '%s'", ptr_server->sasl_temp_username); + weechat_log_printf (" sasl_temp_username. . . . : '%s'", ptr_server->sasl_temp_username); weechat_log_printf (" sasl_temp_password. . . . : (hidden)"); - weechat_log_printf (" authentication_method . . : %d", ptr_server->authentication_method); - weechat_log_printf (" sasl_mechanism_used . . . : %d", ptr_server->sasl_mechanism_used); - weechat_log_printf (" is_connected. . . . . . . : %d", ptr_server->is_connected); - weechat_log_printf (" tls_connected . . . . . . : %d", ptr_server->tls_connected); - weechat_log_printf (" disconnected. . . . . . . : %d", ptr_server->disconnected); - weechat_log_printf (" gnutls_sess . . . . . . . : 0x%lx", ptr_server->gnutls_sess); - weechat_log_printf (" tls_cert. . . . . . . . . : 0x%lx", ptr_server->tls_cert); - weechat_log_printf (" tls_cert_key. . . . . . . : 0x%lx", ptr_server->tls_cert_key); - weechat_log_printf (" unterminated_message. . . : '%s'", ptr_server->unterminated_message); - weechat_log_printf (" nicks_count . . . . . . . : %d", ptr_server->nicks_count); - weechat_log_printf (" nicks_array . . . . . . . : 0x%lx", ptr_server->nicks_array); - weechat_log_printf (" nick_first_tried. . . . . : %d", ptr_server->nick_first_tried); - weechat_log_printf (" nick_alternate_number . . : %d", ptr_server->nick_alternate_number); - weechat_log_printf (" nick. . . . . . . . . . . : '%s'", ptr_server->nick); - weechat_log_printf (" nick_modes. . . . . . . . : '%s'", ptr_server->nick_modes); - weechat_log_printf (" host. . . . . . . . . . . : '%s'", ptr_server->host); - weechat_log_printf (" checking_cap_ls . . . . . : %d", ptr_server->checking_cap_ls); - weechat_log_printf (" cap_ls. . . . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" authentication_method . . : %d", ptr_server->authentication_method); + weechat_log_printf (" sasl_mechanism_used . . . : %d", ptr_server->sasl_mechanism_used); + weechat_log_printf (" is_connected. . . . . . . : %d", ptr_server->is_connected); + weechat_log_printf (" tls_connected . . . . . . : %d", ptr_server->tls_connected); + weechat_log_printf (" disconnected. . . . . . . : %d", ptr_server->disconnected); + weechat_log_printf (" gnutls_sess . . . . . . . : %p", ptr_server->gnutls_sess); + weechat_log_printf (" tls_cert. . . . . . . . . : %p", ptr_server->tls_cert); + weechat_log_printf (" tls_cert_key. . . . . . . : %p", ptr_server->tls_cert_key); + weechat_log_printf (" unterminated_message. . . : '%s'", ptr_server->unterminated_message); + weechat_log_printf (" nicks_count . . . . . . . : %d", ptr_server->nicks_count); + weechat_log_printf (" nicks_array . . . . . . . : %p", ptr_server->nicks_array); + weechat_log_printf (" nick_first_tried. . . . . : %d", ptr_server->nick_first_tried); + weechat_log_printf (" nick_alternate_number . . : %d", ptr_server->nick_alternate_number); + weechat_log_printf (" nick. . . . . . . . . . . : '%s'", ptr_server->nick); + weechat_log_printf (" nick_modes. . . . . . . . : '%s'", ptr_server->nick_modes); + weechat_log_printf (" host. . . . . . . . . . . : '%s'", ptr_server->host); + weechat_log_printf (" checking_cap_ls . . . . . : %d", ptr_server->checking_cap_ls); + weechat_log_printf (" cap_ls. . . . . . . . . . : %p (hashtable: '%s')", ptr_server->cap_ls, weechat_hashtable_get_string (ptr_server->cap_ls, "keys_values")); - weechat_log_printf (" checking_cap_list . . . . : %d", ptr_server->checking_cap_list); - weechat_log_printf (" cap_list. . . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" checking_cap_list . . . . : %d", ptr_server->checking_cap_list); + weechat_log_printf (" cap_list. . . . . . . . . : %p (hashtable: '%s')", ptr_server->cap_list, weechat_hashtable_get_string (ptr_server->cap_list, "keys_values")); - weechat_log_printf (" multiline_max_bytes . . . : %d", ptr_server->multiline_max_bytes); - weechat_log_printf (" multiline_max_lines . . . : %d", ptr_server->multiline_max_lines); - weechat_log_printf (" isupport. . . . . . . . . : '%s'", ptr_server->isupport); - weechat_log_printf (" prefix_modes. . . . . . . : '%s'", ptr_server->prefix_modes); - weechat_log_printf (" prefix_chars. . . . . . . : '%s'", ptr_server->prefix_chars); - weechat_log_printf (" msg_max_length. . . . . . : %d", ptr_server->msg_max_length); - weechat_log_printf (" nick_max_length . . . . . : %d", ptr_server->nick_max_length); - weechat_log_printf (" user_max_length . . . . . : %d", ptr_server->user_max_length); - weechat_log_printf (" host_max_length . . . . . : %d", ptr_server->host_max_length); + weechat_log_printf (" multiline_max_bytes . . . : %d", ptr_server->multiline_max_bytes); + weechat_log_printf (" multiline_max_lines . . . : %d", ptr_server->multiline_max_lines); + weechat_log_printf (" isupport. . . . . . . . . : '%s'", ptr_server->isupport); + weechat_log_printf (" prefix_modes. . . . . . . : '%s'", ptr_server->prefix_modes); + weechat_log_printf (" prefix_chars. . . . . . . : '%s'", ptr_server->prefix_chars); + weechat_log_printf (" msg_max_length. . . . . . : %d", ptr_server->msg_max_length); + weechat_log_printf (" nick_max_length . . . . . : %d", ptr_server->nick_max_length); + weechat_log_printf (" user_max_length . . . . . : %d", ptr_server->user_max_length); + weechat_log_printf (" host_max_length . . . . . : %d", ptr_server->host_max_length); weechat_log_printf (" casemapping . . . . . . . : %d (%s)", ptr_server->casemapping, irc_server_casemapping_string[ptr_server->casemapping]); weechat_log_printf (" utf8mapping . . . . . . . : %d (%s)", ptr_server->utf8mapping, irc_server_utf8mapping_string[ptr_server->utf8mapping]); - weechat_log_printf (" utf8only. . . . . . . . . : %d", ptr_server->utf8only); - weechat_log_printf (" chantypes . . . . . . . . : '%s'", ptr_server->chantypes); - weechat_log_printf (" chanmodes . . . . . . . . : '%s'", ptr_server->chanmodes); - weechat_log_printf (" monitor . . . . . . . . . : %d", ptr_server->monitor); - weechat_log_printf (" monitor_time. . . . . . . : %lld", (long long)ptr_server->monitor_time); - weechat_log_printf (" clienttagdeny . . . . . . : '%s'", ptr_server->clienttagdeny); - weechat_log_printf (" clienttagdeny_count . . . : %d", ptr_server->clienttagdeny_count); - weechat_log_printf (" clienttagdeny_array . . . : 0x%lx", ptr_server->clienttagdeny_array); - weechat_log_printf (" typing_allowed . . . . . : %d", ptr_server->typing_allowed); - weechat_log_printf (" reconnect_delay . . . . . : %d", ptr_server->reconnect_delay); - weechat_log_printf (" reconnect_start . . . . . : %lld", (long long)ptr_server->reconnect_start); - weechat_log_printf (" command_time. . . . . . . : %lld", (long long)ptr_server->command_time); - weechat_log_printf (" autojoin_time . . . . . . : %lld", (long long)ptr_server->autojoin_time); - weechat_log_printf (" autojoin_done . . . . . . : %d", ptr_server->autojoin_done); - weechat_log_printf (" disable_autojoin. . . . . : %d", ptr_server->disable_autojoin); - weechat_log_printf (" is_away . . . . . . . . . : %d", ptr_server->is_away); - weechat_log_printf (" away_message. . . . . . . : '%s'", ptr_server->away_message); - weechat_log_printf (" away_time . . . . . . . . : %lld", (long long)ptr_server->away_time); - weechat_log_printf (" lag . . . . . . . . . . . : %d", ptr_server->lag); - weechat_log_printf (" lag_displayed . . . . . . : %d", ptr_server->lag_displayed); + weechat_log_printf (" utf8only. . . . . . . . . : %d", ptr_server->utf8only); + weechat_log_printf (" chantypes . . . . . . . . : '%s'", ptr_server->chantypes); + weechat_log_printf (" chanmodes . . . . . . . . : '%s'", ptr_server->chanmodes); + weechat_log_printf (" monitor . . . . . . . . . : %d", ptr_server->monitor); + weechat_log_printf (" monitor_time. . . . . . . : %lld", (long long)ptr_server->monitor_time); + weechat_log_printf (" clienttagdeny . . . . . . : '%s'", ptr_server->clienttagdeny); + weechat_log_printf (" clienttagdeny_count . . . : %d", ptr_server->clienttagdeny_count); + weechat_log_printf (" clienttagdeny_array . . . : %p", ptr_server->clienttagdeny_array); + weechat_log_printf (" typing_allowed . . . . . : %d", ptr_server->typing_allowed); + weechat_log_printf (" reconnect_delay . . . . . : %d", ptr_server->reconnect_delay); + weechat_log_printf (" reconnect_start . . . . . : %lld", (long long)ptr_server->reconnect_start); + weechat_log_printf (" command_time. . . . . . . : %lld", (long long)ptr_server->command_time); + weechat_log_printf (" autojoin_time . . . . . . : %lld", (long long)ptr_server->autojoin_time); + weechat_log_printf (" autojoin_done . . . . . . : %d", ptr_server->autojoin_done); + weechat_log_printf (" disable_autojoin. . . . . : %d", ptr_server->disable_autojoin); + weechat_log_printf (" is_away . . . . . . . . . : %d", ptr_server->is_away); + weechat_log_printf (" away_message. . . . . . . : '%s'", ptr_server->away_message); + weechat_log_printf (" away_time . . . . . . . . : %lld", (long long)ptr_server->away_time); + weechat_log_printf (" lag . . . . . . . . . . . : %d", ptr_server->lag); + weechat_log_printf (" lag_displayed . . . . . . : %d", ptr_server->lag_displayed); weechat_log_printf (" lag_check_time. . . . . . : tv_sec:%d, tv_usec:%d", ptr_server->lag_check_time.tv_sec, ptr_server->lag_check_time.tv_usec); - weechat_log_printf (" lag_next_check. . . . . . : %lld", (long long)ptr_server->lag_next_check); - weechat_log_printf (" lag_last_refresh. . . . . : %lld", (long long)ptr_server->lag_last_refresh); - weechat_log_printf (" cmd_list_regexp . . . . . : 0x%lx", ptr_server->cmd_list_regexp); - weechat_log_printf (" list. . . . . . . . . . . : 0x%lx", ptr_server->list); + weechat_log_printf (" lag_next_check. . . . . . : %lld", (long long)ptr_server->lag_next_check); + weechat_log_printf (" lag_last_refresh. . . . . : %lld", (long long)ptr_server->lag_last_refresh); + weechat_log_printf (" cmd_list_regexp . . . . . : %p", ptr_server->cmd_list_regexp); + weechat_log_printf (" list. . . . . . . . . . . : %p", ptr_server->list); if (ptr_server->list) { - weechat_log_printf (" buffer. . . . . . . . . : 0x%lx", ptr_server->list->buffer); - weechat_log_printf (" channels. . . . . . . . : 0x%lx", ptr_server->list->channels); - weechat_log_printf (" filter_channels . . . . : 0x%lx", ptr_server->list->filter_channels); + weechat_log_printf (" buffer. . . . . . . . . : %p", ptr_server->list->buffer); + weechat_log_printf (" channels. . . . . . . . : %p", ptr_server->list->channels); + weechat_log_printf (" filter_channels . . . . : %p", ptr_server->list->filter_channels); } - weechat_log_printf (" last_away_check . . . . . : %lld", (long long)ptr_server->last_away_check); - weechat_log_printf (" last_data_purge . . . . . : %lld", (long long)ptr_server->last_data_purge); + weechat_log_printf (" last_away_check . . . . . : %lld", (long long)ptr_server->last_away_check); + weechat_log_printf (" last_data_purge . . . . . : %lld", (long long)ptr_server->last_data_purge); for (i = 0; i < IRC_SERVER_NUM_OUTQUEUES_PRIO; i++) { - weechat_log_printf (" outqueue[%02d]. . . . . . . : 0x%lx", i, ptr_server->outqueue[i]); - weechat_log_printf (" last_outqueue[%02d] . . . . : 0x%lx", i, ptr_server->last_outqueue[i]); + weechat_log_printf (" outqueue[%02d]. . . . . . . : %p", i, ptr_server->outqueue[i]); + weechat_log_printf (" last_outqueue[%02d] . . . . : %p", i, ptr_server->last_outqueue[i]); } - weechat_log_printf (" redirects . . . . . . . . : 0x%lx", ptr_server->redirects); - weechat_log_printf (" last_redirect . . . . . . : 0x%lx", ptr_server->last_redirect); - weechat_log_printf (" notify_list . . . . . . . : 0x%lx", ptr_server->notify_list); - weechat_log_printf (" last_notify . . . . . . . : 0x%lx", ptr_server->last_notify); - weechat_log_printf (" notify_count. . . . . . . : %d", ptr_server->notify_count); - weechat_log_printf (" join_manual . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" redirects . . . . . . . . : %p", ptr_server->redirects); + weechat_log_printf (" last_redirect . . . . . . : %p", ptr_server->last_redirect); + weechat_log_printf (" notify_list . . . . . . . : %p", ptr_server->notify_list); + weechat_log_printf (" last_notify . . . . . . . : %p", ptr_server->last_notify); + weechat_log_printf (" notify_count. . . . . . . : %d", ptr_server->notify_count); + weechat_log_printf (" join_manual . . . . . . . : %p (hashtable: '%s')", ptr_server->join_manual, weechat_hashtable_get_string (ptr_server->join_manual, "keys_values")); - weechat_log_printf (" join_channel_key. . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" join_channel_key. . . . . : %p (hashtable: '%s')", ptr_server->join_channel_key, weechat_hashtable_get_string (ptr_server->join_channel_key, "keys_values")); - weechat_log_printf (" join_noswitch . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" join_noswitch . . . . . . : %p (hashtable: '%s')", ptr_server->join_noswitch, weechat_hashtable_get_string (ptr_server->join_noswitch, "keys_values")); - weechat_log_printf (" echo_msg_recv . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" echo_msg_recv . . . . . . : %p (hashtable: '%s')", ptr_server->echo_msg_recv, weechat_hashtable_get_string (ptr_server->echo_msg_recv, "keys_values")); - weechat_log_printf (" names_channel_filter. . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" names_channel_filter. . . : %p (hashtable: '%s')", ptr_server->names_channel_filter, weechat_hashtable_get_string (ptr_server->names_channel_filter, "keys_values")); - weechat_log_printf (" batches . . . . . . . . . : 0x%lx", ptr_server->batches); - weechat_log_printf (" last_batch. . . . . . . . : 0x%lx", ptr_server->last_batch); - weechat_log_printf (" buffer. . . . . . . . . . : 0x%lx", ptr_server->buffer); - weechat_log_printf (" buffer_as_string. . . . . : 0x%lx", ptr_server->buffer_as_string); - weechat_log_printf (" channels. . . . . . . . . : 0x%lx", ptr_server->channels); - weechat_log_printf (" last_channel. . . . . . . : 0x%lx", ptr_server->last_channel); - weechat_log_printf (" prev_server . . . . . . . : 0x%lx", ptr_server->prev_server); - weechat_log_printf (" next_server . . . . . . . : 0x%lx", ptr_server->next_server); + weechat_log_printf (" batches . . . . . . . . . : %p", ptr_server->batches); + weechat_log_printf (" last_batch. . . . . . . . : %p", ptr_server->last_batch); + weechat_log_printf (" buffer. . . . . . . . . . : %p", ptr_server->buffer); + weechat_log_printf (" buffer_as_string. . . . . : %p", ptr_server->buffer_as_string); + weechat_log_printf (" channels. . . . . . . . . : %p", ptr_server->channels); + weechat_log_printf (" last_channel. . . . . . . : %p", ptr_server->last_channel); + weechat_log_printf (" prev_server . . . . . . . : %p", ptr_server->prev_server); + weechat_log_printf (" next_server . . . . . . . : %p", ptr_server->next_server); irc_redirect_print_log (ptr_server); diff --git a/src/plugins/irc/irc-typing.c b/src/plugins/irc/irc-typing.c index fcc1cf9eb..296fc31bc 100644 --- a/src/plugins/irc/irc-typing.c +++ b/src/plugins/irc/irc-typing.c @@ -143,8 +143,8 @@ irc_typing_channel_set_nick (struct t_irc_channel *channel, const char *nick, char signal_data[1024]; snprintf (signal_data, sizeof (signal_data), - "0x%lx;%s;%s", - (unsigned long)channel->buffer, + "%p;%s;%s", + channel->buffer, (state == IRC_CHANNEL_TYPING_STATE_ACTIVE) ? "typing" : ((state == IRC_CHANNEL_TYPING_STATE_PAUSED) ? "paused" : "off"), nick); diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index 870c9caae..9c6a81dbd 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -494,7 +494,7 @@ plugin_api_info_buffer_cb (const void *pointer, void *data, if (!ptr_buffer) return NULL; - snprintf (value, sizeof (value), "0x%lx", (unsigned long)ptr_buffer); + snprintf (value, sizeof (value), "%p", ptr_buffer); return strdup (value); } diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c index 40fe368ce..6ea597f57 100644 --- a/src/plugins/plugin-script.c +++ b/src/plugins/plugin-script.c @@ -381,7 +381,7 @@ plugin_script_ptr2str (void *pointer) return str_pointer[index_pointer]; snprintf (str_pointer[index_pointer], sizeof (str_pointer[index_pointer]), - "0x%lx", (unsigned long)pointer); + "%p", pointer); return str_pointer[index_pointer]; } @@ -1869,19 +1869,19 @@ plugin_script_print_log (struct t_weechat_plugin *weechat_plugin, ptr_script = ptr_script->next_script) { weechat_log_printf (""); - weechat_log_printf ("[script %s (addr:0x%lx)]", ptr_script->name, ptr_script); - weechat_log_printf (" filename. . . . . . : '%s'", ptr_script->filename); - weechat_log_printf (" interpreter . . . . : 0x%lx", ptr_script->interpreter); - weechat_log_printf (" name. . . . . . . . : '%s'", ptr_script->name); - weechat_log_printf (" author. . . . . . . : '%s'", ptr_script->author); - weechat_log_printf (" version . . . . . . : '%s'", ptr_script->version); - weechat_log_printf (" license . . . . . . : '%s'", ptr_script->license); - weechat_log_printf (" description . . . . : '%s'", ptr_script->description); - weechat_log_printf (" shutdown_func . . . : '%s'", ptr_script->shutdown_func); - weechat_log_printf (" charset . . . . . . : '%s'", ptr_script->charset); - weechat_log_printf (" unloading . . . . . : %d", ptr_script->unloading); - weechat_log_printf (" prev_script . . . . : 0x%lx", ptr_script->prev_script); - weechat_log_printf (" next_script . . . . : 0x%lx", ptr_script->next_script); + weechat_log_printf ("[script %s (addr:%p)]", ptr_script->name, ptr_script); + weechat_log_printf (" filename. . . . . . : '%s'", ptr_script->filename); + weechat_log_printf (" interpreter . . . . : %p", ptr_script->interpreter); + weechat_log_printf (" name. . . . . . . . : '%s'", ptr_script->name); + weechat_log_printf (" author. . . . . . . : '%s'", ptr_script->author); + weechat_log_printf (" version . . . . . . : '%s'", ptr_script->version); + weechat_log_printf (" license . . . . . . : '%s'", ptr_script->license); + weechat_log_printf (" description . . . . : '%s'", ptr_script->description); + weechat_log_printf (" shutdown_func . . . : '%s'", ptr_script->shutdown_func); + weechat_log_printf (" charset . . . . . . : '%s'", ptr_script->charset); + weechat_log_printf (" unloading . . . . . : %d", ptr_script->unloading); + weechat_log_printf (" prev_script . . . . : %p", ptr_script->prev_script); + weechat_log_printf (" next_script . . . . : %p", ptr_script->next_script); } weechat_log_printf (""); diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index c166c8462..90227fd25 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -1546,21 +1546,21 @@ plugin_print_log () ptr_plugin = ptr_plugin->next_plugin) { log_printf (""); - log_printf ("[plugin (addr:0x%lx)]", ptr_plugin); - log_printf (" filename . . . . . . . : '%s'", ptr_plugin->filename); - log_printf (" handle . . . . . . . . : 0x%lx", ptr_plugin->handle); - log_printf (" name . . . . . . . . . : '%s'", ptr_plugin->name); - log_printf (" description. . . . . . : '%s'", ptr_plugin->description); - log_printf (" author . . . . . . . . : '%s'", ptr_plugin->author); - log_printf (" version. . . . . . . . : '%s'", ptr_plugin->version); - log_printf (" license. . . . . . . . : '%s'", ptr_plugin->license); - log_printf (" charset. . . . . . . . : '%s'", ptr_plugin->charset); - log_printf (" priority . . . . . . . : %d", ptr_plugin->priority); - log_printf (" initialized. . . . . . : %d", ptr_plugin->initialized); - log_printf (" debug. . . . . . . . . : %d", ptr_plugin->debug); - log_printf (" upgrading. . . . . . . : %d", ptr_plugin->upgrading); + log_printf ("[plugin (addr:%p)]", ptr_plugin); + log_printf (" filename . . . . . . . : '%s'", ptr_plugin->filename); + log_printf (" handle . . . . . . . . : %p", ptr_plugin->handle); + log_printf (" name . . . . . . . . . : '%s'", ptr_plugin->name); + log_printf (" description. . . . . . : '%s'", ptr_plugin->description); + log_printf (" author . . . . . . . . : '%s'", ptr_plugin->author); + log_printf (" version. . . . . . . . : '%s'", ptr_plugin->version); + log_printf (" license. . . . . . . . : '%s'", ptr_plugin->license); + log_printf (" charset. . . . . . . . : '%s'", ptr_plugin->charset); + log_printf (" priority . . . . . . . : %d", ptr_plugin->priority); + log_printf (" initialized. . . . . . : %d", ptr_plugin->initialized); + log_printf (" debug. . . . . . . . . : %d", ptr_plugin->debug); + log_printf (" upgrading. . . . . . . : %d", ptr_plugin->upgrading); hashtable_print_log (ptr_plugin->variables, "variables"); - log_printf (" prev_plugin. . . . . . : 0x%lx", ptr_plugin->prev_plugin); - log_printf (" next_plugin. . . . . . : 0x%lx", ptr_plugin->next_plugin); + log_printf (" prev_plugin. . . . . . : %p", ptr_plugin->prev_plugin); + log_printf (" next_plugin. . . . . . : %p", ptr_plugin->next_plugin); } } diff --git a/src/plugins/relay/api/relay-api.c b/src/plugins/relay/api/relay-api.c index f2cac0c02..054ddbf29 100644 --- a/src/plugins/relay/api/relay-api.c +++ b/src/plugins/relay/api/relay-api.c @@ -300,11 +300,11 @@ relay_api_print_log (struct t_relay_client *client) { if (client->protocol_data) { - weechat_log_printf (" hook_signal_buffer. . . : 0x%lx", RELAY_API_DATA(client, hook_signal_buffer)); - weechat_log_printf (" hook_hsignal_nicklist . : 0x%lx", RELAY_API_DATA(client, hook_hsignal_nicklist)); - weechat_log_printf (" hook_signal_upgrade . . : 0x%lx", RELAY_API_DATA(client, hook_signal_upgrade)); - weechat_log_printf (" sync_enabled. . . . . . : %d", RELAY_API_DATA(client, sync_enabled)); - weechat_log_printf (" sync_nicks. . . . . . . : %d", RELAY_API_DATA(client, sync_nicks)); - weechat_log_printf (" sync_colors . . . . . . : %d", RELAY_API_DATA(client, sync_colors)); + weechat_log_printf (" hook_signal_buffer. . . : %p", RELAY_API_DATA(client, hook_signal_buffer)); + weechat_log_printf (" hook_hsignal_nicklist . : %p", RELAY_API_DATA(client, hook_hsignal_nicklist)); + weechat_log_printf (" hook_signal_upgrade . . : %p", RELAY_API_DATA(client, hook_signal_upgrade)); + weechat_log_printf (" sync_enabled. . . . . . : %d", RELAY_API_DATA(client, sync_enabled)); + weechat_log_printf (" sync_nicks. . . . . . . : %d", RELAY_API_DATA(client, sync_nicks)); + weechat_log_printf (" sync_colors . . . . . . : %d", RELAY_API_DATA(client, sync_colors)); } } diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index 9b4642e34..0c406488b 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -217,8 +217,7 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...) hashtable_in = NULL; hashtable_out = NULL; - snprintf (modifier_data, sizeof (modifier_data), - "0x%lx", (unsigned long)client); + snprintf (modifier_data, sizeof (modifier_data), "%p", client); new_msg1 = weechat_hook_modifier_exec ("relay_client_irc_out1", modifier_data, vbuffer); @@ -1659,8 +1658,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data) data); } - snprintf (modifier_data, sizeof (modifier_data), - "0x%lx", (unsigned long)client); + snprintf (modifier_data, sizeof (modifier_data), "%p", client); new_data = weechat_hook_modifier_exec ("relay_client_irc_in", modifier_data, data); @@ -2409,18 +2407,18 @@ relay_irc_print_log (struct t_relay_client *client) { if (client->protocol_data) { - weechat_log_printf (" address . . . . . . . . : '%s'", RELAY_IRC_DATA(client, address)); - weechat_log_printf (" password_ok . . . . . . : %d", RELAY_IRC_DATA(client, password_ok)); - weechat_log_printf (" nick. . . . . . . . . . : '%s'", RELAY_IRC_DATA(client, nick)); - weechat_log_printf (" user_received . . . . . : %d", RELAY_IRC_DATA(client, user_received)); - weechat_log_printf (" cap_ls_received . . . . : %d", RELAY_IRC_DATA(client, cap_ls_received)); - weechat_log_printf (" cap_end_received. . . . : %d", RELAY_IRC_DATA(client, cap_end_received)); - weechat_log_printf (" connected . . . . . . . : %d", RELAY_IRC_DATA(client, connected)); - weechat_log_printf (" irc_cap_echo_message. . : %d", RELAY_IRC_DATA(client, irc_cap_echo_message)); - weechat_log_printf (" server_capabilities . . : %d", RELAY_IRC_DATA(client, server_capabilities)); - weechat_log_printf (" hook_signal_irc_in2 . . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_in2)); - weechat_log_printf (" hook_signal_irc_outtags : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_outtags)); - weechat_log_printf (" hook_signal_irc_disc. . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_disc)); - weechat_log_printf (" hook_hsignal_irc_redir. : 0x%lx", RELAY_IRC_DATA(client, hook_hsignal_irc_redir)); + weechat_log_printf (" address . . . . . . . . : '%s'", RELAY_IRC_DATA(client, address)); + weechat_log_printf (" password_ok . . . . . . : %d", RELAY_IRC_DATA(client, password_ok)); + weechat_log_printf (" nick. . . . . . . . . . : '%s'", RELAY_IRC_DATA(client, nick)); + weechat_log_printf (" user_received . . . . . : %d", RELAY_IRC_DATA(client, user_received)); + weechat_log_printf (" cap_ls_received . . . . : %d", RELAY_IRC_DATA(client, cap_ls_received)); + weechat_log_printf (" cap_end_received. . . . : %d", RELAY_IRC_DATA(client, cap_end_received)); + weechat_log_printf (" connected . . . . . . . : %d", RELAY_IRC_DATA(client, connected)); + weechat_log_printf (" irc_cap_echo_message. . : %d", RELAY_IRC_DATA(client, irc_cap_echo_message)); + weechat_log_printf (" server_capabilities . . : %d", RELAY_IRC_DATA(client, server_capabilities)); + weechat_log_printf (" hook_signal_irc_in2 . . : %p", RELAY_IRC_DATA(client, hook_signal_irc_in2)); + weechat_log_printf (" hook_signal_irc_outtags : %p", RELAY_IRC_DATA(client, hook_signal_irc_outtags)); + weechat_log_printf (" hook_signal_irc_disc. . : %p", RELAY_IRC_DATA(client, hook_signal_irc_disc)); + weechat_log_printf (" hook_hsignal_irc_redir. : %p", RELAY_IRC_DATA(client, hook_hsignal_irc_redir)); } } diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c index 79a3fb409..a5b8eac0b 100644 --- a/src/plugins/relay/relay-client.c +++ b/src/plugins/relay/relay-client.c @@ -2227,53 +2227,53 @@ relay_client_print_log () ptr_client = ptr_client->next_client) { weechat_log_printf (""); - weechat_log_printf ("[relay client (addr:0x%lx)]", ptr_client); - weechat_log_printf (" id. . . . . . . . . . . . : %d", ptr_client->id); - weechat_log_printf (" desc. . . . . . . . . . . : '%s'", ptr_client->desc); - weechat_log_printf (" sock. . . . . . . . . . . : %d", ptr_client->sock); - weechat_log_printf (" server_port . . . . . . . : %d", ptr_client->server_port); - weechat_log_printf (" tls . . . . . . . . . . . : %d", ptr_client->tls); - weechat_log_printf (" gnutls_sess . . . . . . . : 0x%lx", ptr_client->gnutls_sess); - weechat_log_printf (" fake_send_func. . . . . . : 0x%lx", ptr_client->fake_send_func); - weechat_log_printf (" hook_timer_handshake. . . : 0x%lx", ptr_client->hook_timer_handshake); - weechat_log_printf (" gnutls_handshake_ok . . . : 0x%lx", ptr_client->gnutls_handshake_ok); - weechat_log_printf (" websocket . . . . . . . . ; %d", ptr_client->websocket); + weechat_log_printf ("[relay client (addr:%p)]", ptr_client); + weechat_log_printf (" id. . . . . . . . . . . . : %d", ptr_client->id); + weechat_log_printf (" desc. . . . . . . . . . . : '%s'", ptr_client->desc); + weechat_log_printf (" sock. . . . . . . . . . . : %d", ptr_client->sock); + weechat_log_printf (" server_port . . . . . . . : %d", ptr_client->server_port); + weechat_log_printf (" tls . . . . . . . . . . . : %d", ptr_client->tls); + weechat_log_printf (" gnutls_sess . . . . . . . : %p", ptr_client->gnutls_sess); + weechat_log_printf (" fake_send_func. . . . . . : %p", ptr_client->fake_send_func); + weechat_log_printf (" hook_timer_handshake. . . : %p", ptr_client->hook_timer_handshake); + weechat_log_printf (" gnutls_handshake_ok . . . : %p", ptr_client->gnutls_handshake_ok); + weechat_log_printf (" websocket . . . . . . . . ; %d", ptr_client->websocket); relay_websocket_deflate_print_log (ptr_client->ws_deflate, ""); relay_http_print_log (ptr_client->http_req); - weechat_log_printf (" address . . . . . . . . . : '%s'", ptr_client->address); - weechat_log_printf (" real_ip . . . . . . . . . : '%s'", ptr_client->real_ip); + weechat_log_printf (" address . . . . . . . . . : '%s'", ptr_client->address); + weechat_log_printf (" real_ip . . . . . . . . . : '%s'", ptr_client->real_ip); weechat_log_printf (" status. . . . . . . . . . : %d (%s)", ptr_client->status, relay_client_status_string[ptr_client->status]); weechat_log_printf (" protocol. . . . . . . . . : %d (%s)", ptr_client->protocol, relay_protocol_string[ptr_client->protocol]); - weechat_log_printf (" protocol_string . . . . . : '%s'", ptr_client->protocol_string); - weechat_log_printf (" protocol_args . . . . . . : '%s'", ptr_client->protocol_args); - weechat_log_printf (" nonce . . . . . . . . . . : '%s'", ptr_client->nonce); + weechat_log_printf (" protocol_string . . . . . : '%s'", ptr_client->protocol_string); + weechat_log_printf (" protocol_args . . . . . . : '%s'", ptr_client->protocol_args); + weechat_log_printf (" nonce . . . . . . . . . . : '%s'", ptr_client->nonce); weechat_log_printf (" password_hash_algo. . . . : %d (%s)", ptr_client->password_hash_algo, (ptr_client->password_hash_algo >= 0) ? relay_auth_password_hash_algo_name[ptr_client->password_hash_algo] : ""); - weechat_log_printf (" listen_start_time . . . . : %lld", (long long)ptr_client->listen_start_time); - weechat_log_printf (" start_time. . . . . . . . : %lld", (long long)ptr_client->start_time); - weechat_log_printf (" end_time. . . . . . . . . : %lld", (long long)ptr_client->end_time); - weechat_log_printf (" hook_fd . . . . . . . . . : 0x%lx", ptr_client->hook_fd); - weechat_log_printf (" hook_timer_send . . . . . : 0x%lx", ptr_client->hook_timer_send); - weechat_log_printf (" last_activity . . . . . . : %lld", (long long)ptr_client->last_activity); - weechat_log_printf (" bytes_recv. . . . . . . . : %llu", ptr_client->bytes_recv); - weechat_log_printf (" bytes_sent. . . . . . . . : %llu", ptr_client->bytes_sent); + weechat_log_printf (" listen_start_time . . . . : %lld", (long long)ptr_client->listen_start_time); + weechat_log_printf (" start_time. . . . . . . . : %lld", (long long)ptr_client->start_time); + weechat_log_printf (" end_time. . . . . . . . . : %lld", (long long)ptr_client->end_time); + weechat_log_printf (" hook_fd . . . . . . . . . : %p", ptr_client->hook_fd); + weechat_log_printf (" hook_timer_send . . . . . : %p", ptr_client->hook_timer_send); + weechat_log_printf (" last_activity . . . . . . : %lld", (long long)ptr_client->last_activity); + weechat_log_printf (" bytes_recv. . . . . . . . : %llu", ptr_client->bytes_recv); + weechat_log_printf (" bytes_sent. . . . . . . . : %llu", ptr_client->bytes_sent); weechat_log_printf (" recv_data_type. . . . . . : %d (%s)", ptr_client->recv_data_type, relay_client_data_type_string[ptr_client->recv_data_type]); weechat_log_printf (" send_data_type. . . . . . : %d (%s)", ptr_client->send_data_type, relay_client_data_type_string[ptr_client->send_data_type]); - weechat_log_printf (" partial_ws_frame. . . . . : 0x%lx (%d bytes)", + weechat_log_printf (" partial_ws_frame. . . . . : %p (%d bytes)", ptr_client->partial_ws_frame, ptr_client->partial_ws_frame_size); - weechat_log_printf (" partial_message . . . . . : '%s'", ptr_client->partial_message); - weechat_log_printf (" protocol_data . . . . . . : 0x%lx", ptr_client->protocol_data); + weechat_log_printf (" partial_message . . . . . : '%s'", ptr_client->partial_message); + weechat_log_printf (" protocol_data . . . . . . : %p", ptr_client->protocol_data); switch (ptr_client->protocol) { case RELAY_PROTOCOL_WEECHAT: @@ -2290,9 +2290,9 @@ relay_client_print_log () case RELAY_NUM_PROTOCOLS: break; } - weechat_log_printf (" outqueue. . . . . . . . . : 0x%lx", ptr_client->outqueue); - weechat_log_printf (" last_outqueue . . . . . . : 0x%lx", ptr_client->last_outqueue); - weechat_log_printf (" prev_client . . . . . . . : 0x%lx", ptr_client->prev_client); - weechat_log_printf (" next_client . . . . . . . : 0x%lx", ptr_client->next_client); + weechat_log_printf (" outqueue. . . . . . . . . : %p", ptr_client->outqueue); + weechat_log_printf (" last_outqueue . . . . . . : %p", ptr_client->last_outqueue); + weechat_log_printf (" prev_client . . . . . . . : %p", ptr_client->prev_client); + weechat_log_printf (" next_client . . . . . . . : %p", ptr_client->next_client); } } diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c index b539d26e4..e44cbc9c6 100644 --- a/src/plugins/relay/relay-http.c +++ b/src/plugins/relay/relay-http.c @@ -1387,7 +1387,7 @@ relay_http_print_log (struct t_relay_http_request *request) weechat_log_printf (" status. . . . . . . . . : %d", request->status); weechat_log_printf (" method. . . . . . . . . : '%s'", request->method); weechat_log_printf (" path. . . . . . . . . . : '%s'", request->path); - weechat_log_printf (" path_items. . . . . . . : 0x%lx", request->path_items); + weechat_log_printf (" path_items. . . . . . . : %p", request->path_items); if (request->path_items) { for (i = 0; request->path_items[0]; i++) @@ -1396,14 +1396,14 @@ relay_http_print_log (struct t_relay_http_request *request) } } weechat_log_printf (" num_path_items. . . . . : %d", request->num_path_items); - weechat_log_printf (" params. . . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" params. . . . . . . . . : %p (hashtable: '%s')", request->params, weechat_hashtable_get_string (request->params, "keys_values")); weechat_log_printf (" http_version. . . . . . : '%s'", request->http_version); - weechat_log_printf (" headers . . . . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" headers . . . . . . . . : %p (hashtable: '%s')", request->headers, weechat_hashtable_get_string (request->headers, "keys_values")); - weechat_log_printf (" accept_encoding . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" accept_encoding . . . . : %p (hashtable: '%s')", request->accept_encoding, weechat_hashtable_get_string (request->accept_encoding, "keys_values")); diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c index b47df8b6f..fac396da3 100644 --- a/src/plugins/relay/relay-server.c +++ b/src/plugins/relay/relay-server.c @@ -1054,23 +1054,23 @@ relay_server_print_log () ptr_server = ptr_server->next_server) { weechat_log_printf (""); - weechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server); - weechat_log_printf (" protocol_string . . . : '%s'", ptr_server->protocol_string); + weechat_log_printf ("[relay server (addr:%p)]", ptr_server); + weechat_log_printf (" protocol_string . . . : '%s'", ptr_server->protocol_string); weechat_log_printf (" protocol. . . . . . . : %d (%s)", ptr_server->protocol, relay_protocol_string[ptr_server->protocol]); - weechat_log_printf (" protocol_args . . . . : '%s'", ptr_server->protocol_args); - weechat_log_printf (" port. . . . . . . . . : %d", ptr_server->port); - weechat_log_printf (" path. . . . . . . . . : %s", ptr_server->path); - weechat_log_printf (" ipv4. . . . . . . . . : %d", ptr_server->ipv4); - weechat_log_printf (" ipv6. . . . . . . . . : %d", ptr_server->ipv6); - weechat_log_printf (" tls . . . . . . . . . : %d", ptr_server->tls); - weechat_log_printf (" unix_socket . . . . . : %d", ptr_server->unix_socket); - weechat_log_printf (" sock. . . . . . . . . : %d", ptr_server->sock); - weechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_server->hook_fd); - weechat_log_printf (" start_time. . . . . . : %lld", (long long)ptr_server->start_time); - weechat_log_printf (" last_client_disconnect: %lld", (long long)ptr_server->last_client_disconnect); - weechat_log_printf (" prev_server . . . . . : 0x%lx", ptr_server->prev_server); - weechat_log_printf (" next_server . . . . . : 0x%lx", ptr_server->next_server); + weechat_log_printf (" protocol_args . . . . : '%s'", ptr_server->protocol_args); + weechat_log_printf (" port. . . . . . . . . : %d", ptr_server->port); + weechat_log_printf (" path. . . . . . . . . : %s", ptr_server->path); + weechat_log_printf (" ipv4. . . . . . . . . : %d", ptr_server->ipv4); + weechat_log_printf (" ipv6. . . . . . . . . : %d", ptr_server->ipv6); + weechat_log_printf (" tls . . . . . . . . . : %d", ptr_server->tls); + weechat_log_printf (" unix_socket . . . . . : %d", ptr_server->unix_socket); + weechat_log_printf (" sock. . . . . . . . . : %d", ptr_server->sock); + weechat_log_printf (" hook_fd . . . . . . . : %p", ptr_server->hook_fd); + weechat_log_printf (" start_time. . . . . . : %lld", (long long)ptr_server->start_time); + weechat_log_printf (" last_client_disconnect: %lld", (long long)ptr_server->last_client_disconnect); + weechat_log_printf (" prev_server . . . . . : %p", ptr_server->prev_server); + weechat_log_printf (" next_server . . . . . : %p", ptr_server->next_server); } } diff --git a/src/plugins/relay/relay-websocket.c b/src/plugins/relay/relay-websocket.c index fa14abca1..3ba4d408e 100644 --- a/src/plugins/relay/relay-websocket.c +++ b/src/plugins/relay/relay-websocket.c @@ -909,6 +909,6 @@ relay_websocket_deflate_print_log (struct t_relay_websocket_deflate *ws_deflate, weechat_log_printf ("%s client_context_takeover : %d", prefix, ws_deflate->client_context_takeover); weechat_log_printf ("%s window_bits_deflate . . : %d", prefix, ws_deflate->window_bits_deflate); weechat_log_printf ("%s window_bits_inflate . . : %d", prefix, ws_deflate->window_bits_inflate); - weechat_log_printf ("%s strm_deflate. . . . . . : 0x%lx", prefix, ws_deflate->strm_deflate); - weechat_log_printf ("%s strm_inflate. . . . . . : 0x%lx", prefix, ws_deflate->strm_inflate); + weechat_log_printf ("%s strm_deflate. . . . . . : %p", prefix, ws_deflate->strm_deflate); + weechat_log_printf ("%s strm_inflate. . . . . . : %p", prefix, ws_deflate->strm_inflate); } diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index ce313d073..9340d9453 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -878,8 +878,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name,short_name," "nicklist,title,local_variables," @@ -903,8 +902,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name,type"); relay_weechat_msg_send (ptr_client, msg); @@ -926,8 +924,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name," "prev_buffer,next_buffer"); @@ -951,8 +948,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name," "prev_buffer,next_buffer"); @@ -976,8 +972,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name," "prev_buffer,next_buffer"); @@ -1021,8 +1016,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name,short_name," "local_variables"); @@ -1045,8 +1039,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name,title"); relay_weechat_msg_send (ptr_client, msg); @@ -1068,8 +1061,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name,local_variables"); relay_weechat_msg_send (ptr_client, msg); @@ -1090,8 +1082,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name"); relay_weechat_msg_send (ptr_client, msg); @@ -1122,8 +1113,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, if (msg) { snprintf (cmd_hdata, sizeof (cmd_hdata), - "line_data:0x%lx", - (unsigned long)ptr_line_data); + "line_data:%p", + ptr_line_data); relay_weechat_msg_add_hdata ( msg, cmd_hdata, "buffer,date,date_usec,date_printed,date_usec_printed," @@ -1148,8 +1139,7 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, msg = relay_weechat_msg_new (str_signal); if (msg) { - snprintf (cmd_hdata, sizeof (cmd_hdata), - "buffer:0x%lx", (unsigned long)ptr_buffer); + snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); relay_weechat_msg_add_hdata (msg, cmd_hdata, "id,number,full_name"); relay_weechat_msg_send (ptr_client, msg); diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c index 2e65939ce..b217c3d04 100644 --- a/src/plugins/relay/weechat/relay-weechat.c +++ b/src/plugins/relay/weechat/relay-weechat.c @@ -384,22 +384,22 @@ relay_weechat_print_log (struct t_relay_client *client) { if (client->protocol_data) { - weechat_log_printf (" handshake_done. . . . . : %d", RELAY_WEECHAT_DATA(client, handshake_done)); - weechat_log_printf (" password_ok . . . . . . : %d", RELAY_WEECHAT_DATA(client, password_ok)); - weechat_log_printf (" totp_ok . . . . . . . . : %d", RELAY_WEECHAT_DATA(client, totp_ok)); - weechat_log_printf (" compression . . . . . . : %d", RELAY_WEECHAT_DATA(client, compression)); - weechat_log_printf (" escape_commands . . . . : %d", RELAY_WEECHAT_DATA(client, escape_commands)); - weechat_log_printf (" buffers_sync. . . . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" handshake_done. . . . . : %d", RELAY_WEECHAT_DATA(client, handshake_done)); + weechat_log_printf (" password_ok . . . . . . : %d", RELAY_WEECHAT_DATA(client, password_ok)); + weechat_log_printf (" totp_ok . . . . . . . . : %d", RELAY_WEECHAT_DATA(client, totp_ok)); + weechat_log_printf (" compression . . . . . . : %d", RELAY_WEECHAT_DATA(client, compression)); + weechat_log_printf (" escape_commands . . . . : %d", RELAY_WEECHAT_DATA(client, escape_commands)); + weechat_log_printf (" buffers_sync. . . . . . : %p (hashtable: '%s')", RELAY_WEECHAT_DATA(client, buffers_sync), weechat_hashtable_get_string (RELAY_WEECHAT_DATA(client, buffers_sync), "keys_values")); - weechat_log_printf (" hook_signal_buffer. . . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_signal_buffer)); - weechat_log_printf (" hook_hsignal_nicklist . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_hsignal_nicklist)); - weechat_log_printf (" hook_signal_upgrade . . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_signal_upgrade)); - weechat_log_printf (" buffers_nicklist. . . . : 0x%lx (hashtable: '%s')", + weechat_log_printf (" hook_signal_buffer. . . : %p", RELAY_WEECHAT_DATA(client, hook_signal_buffer)); + weechat_log_printf (" hook_hsignal_nicklist . : %p", RELAY_WEECHAT_DATA(client, hook_hsignal_nicklist)); + weechat_log_printf (" hook_signal_upgrade . . : %p", RELAY_WEECHAT_DATA(client, hook_signal_upgrade)); + weechat_log_printf (" buffers_nicklist. . . . : %p (hashtable: '%s')", RELAY_WEECHAT_DATA(client, buffers_nicklist), weechat_hashtable_get_string (RELAY_WEECHAT_DATA(client, buffers_nicklist), "keys_values")); - weechat_log_printf (" hook_timer_nicklist . . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_timer_nicklist)); + weechat_log_printf (" hook_timer_nicklist . . : %p", RELAY_WEECHAT_DATA(client, hook_timer_nicklist)); } } diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index 5c45ab5a0..fc6f5655e 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -1648,24 +1648,24 @@ script_repo_print_log () ptr_script = ptr_script->next_script) { weechat_log_printf (""); - weechat_log_printf ("[script (addr:0x%lx)]", ptr_script); - weechat_log_printf (" name. . . . . . . . . : '%s'", ptr_script->name); - weechat_log_printf (" name_with_extension . : '%s'", ptr_script->name_with_extension); - weechat_log_printf (" language. . . . . . . : %d", ptr_script->language); - weechat_log_printf (" author. . . . . . . . : '%s'", ptr_script->author); - weechat_log_printf (" mail. . . . . . . . . : '%s'", ptr_script->mail); - weechat_log_printf (" version . . . . . . . : '%s'", ptr_script->version); - weechat_log_printf (" license . . . . . . . : '%s'", ptr_script->license); - weechat_log_printf (" description . . . . . : '%s'", ptr_script->description); - weechat_log_printf (" tags. . . . . . . . . : '%s'", ptr_script->tags); - weechat_log_printf (" requirements. . . . . : '%s'", ptr_script->requirements); - weechat_log_printf (" min_weechat . . . . . : '%s'", ptr_script->min_weechat); - weechat_log_printf (" max_weechat . . . . . : '%s'", ptr_script->max_weechat); - weechat_log_printf (" sha512sum . . . . . . : '%s'", ptr_script->sha512sum); - weechat_log_printf (" url . . . . . . . . . : '%s'", ptr_script->url); - weechat_log_printf (" popularity. . . . . . : %d", ptr_script->popularity); - weechat_log_printf (" date_added. . . . . . : %lld", (long long)ptr_script->date_added); - weechat_log_printf (" date_updated. . . . . : %lld", (long long)ptr_script->date_updated); + weechat_log_printf ("[script (addr:%p)]", ptr_script); + weechat_log_printf (" name. . . . . . . . . : '%s'", ptr_script->name); + weechat_log_printf (" name_with_extension . : '%s'", ptr_script->name_with_extension); + weechat_log_printf (" language. . . . . . . : %d", ptr_script->language); + weechat_log_printf (" author. . . . . . . . : '%s'", ptr_script->author); + weechat_log_printf (" mail. . . . . . . . . : '%s'", ptr_script->mail); + weechat_log_printf (" version . . . . . . . : '%s'", ptr_script->version); + weechat_log_printf (" license . . . . . . . : '%s'", ptr_script->license); + weechat_log_printf (" description . . . . . : '%s'", ptr_script->description); + weechat_log_printf (" tags. . . . . . . . . : '%s'", ptr_script->tags); + weechat_log_printf (" requirements. . . . . : '%s'", ptr_script->requirements); + weechat_log_printf (" min_weechat . . . . . : '%s'", ptr_script->min_weechat); + weechat_log_printf (" max_weechat . . . . . : '%s'", ptr_script->max_weechat); + weechat_log_printf (" sha512sum . . . . . . : '%s'", ptr_script->sha512sum); + weechat_log_printf (" url . . . . . . . . . : '%s'", ptr_script->url); + weechat_log_printf (" popularity. . . . . . : %d", ptr_script->popularity); + weechat_log_printf (" date_added. . . . . . : %lld", (long long)ptr_script->date_added); + weechat_log_printf (" date_updated. . . . . : %lld", (long long)ptr_script->date_updated); weechat_log_printf (" status. . . . . . . . : %d (%s%s%s%s%s )", ptr_script->status, (ptr_script->status & SCRIPT_STATUS_INSTALLED) ? " installed": "", @@ -1673,10 +1673,10 @@ script_repo_print_log () (ptr_script->status & SCRIPT_STATUS_HELD) ? " held": "", (ptr_script->status & SCRIPT_STATUS_RUNNING) ? " running": "", (ptr_script->status & SCRIPT_STATUS_NEW_VERSION) ? " new_version": ""); - weechat_log_printf (" version_loaded. . . . : '%s'", ptr_script->version_loaded); - weechat_log_printf (" displayed . . . . . . : %d", ptr_script->displayed); - weechat_log_printf (" install_order . . . . : %d", ptr_script->install_order); - weechat_log_printf (" prev_script . . . . . : 0x%lx", ptr_script->prev_script); - weechat_log_printf (" next_script . . . . . : 0x%lx", ptr_script->next_script); + weechat_log_printf (" version_loaded. . . . : '%s'", ptr_script->version_loaded); + weechat_log_printf (" displayed . . . . . . : %d", ptr_script->displayed); + weechat_log_printf (" install_order . . . . : %d", ptr_script->install_order); + weechat_log_printf (" prev_script . . . . . : %p", ptr_script->prev_script); + weechat_log_printf (" next_script . . . . . : %p", ptr_script->next_script); } } diff --git a/src/plugins/trigger/trigger-buffer.c b/src/plugins/trigger/trigger-buffer.c index c996eebf6..d96ec1d24 100644 --- a/src/plugins/trigger/trigger-buffer.c +++ b/src/plugins/trigger/trigger-buffer.c @@ -294,7 +294,7 @@ trigger_buffer_hashtable_map_cb (void *data, { weechat_printf_date_tags ( trigger_buffer, 0, "no_trigger", - "%s%lu\t %s: 0x%lx", + "%s%lu\t %s: %p", weechat_color (weechat_config_string (trigger_config_color_identifier)), context->id, (char *)key, diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index 79202fbee..6cb12b672 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -737,10 +737,7 @@ trigger_callback_signal_cb (const void *pointer, void *data, { str_data[0] = '\0'; if (signal_data) - { - snprintf (str_data, sizeof (str_data), - "0x%lx", (unsigned long)signal_data); - } + snprintf (str_data, sizeof (str_data), "%p", signal_data); ptr_signal_data = str_data; } weechat_hashtable_set (ctx.extra_vars, "tg_signal_data", ptr_signal_data); @@ -817,7 +814,7 @@ trigger_callback_modifier_cb (const void *pointer, void *data, char *str_tags, **tags, *prefix, *string_no_color; int length, num_tags, rc; void *ptr_irc_server, *ptr_irc_channel; - unsigned long value; + struct t_gui_buffer *ptr_buffer; TRIGGER_CALLBACK_CB_INIT(NULL); @@ -930,10 +927,10 @@ trigger_callback_modifier_cb (const void *pointer, void *data, pos - modifier_data); if (buffer_pointer) { - rc = sscanf (buffer_pointer, "0x%lx", &value); + rc = sscanf (buffer_pointer, "%p", &ptr_buffer); if ((rc != EOF) && (rc != 0)) { - ctx.buffer = (struct t_gui_buffer *)value; + ctx.buffer = ptr_buffer; weechat_hashtable_set ( ctx.extra_vars, "tg_plugin", diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index cc54681a7..06fc663f8 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -1285,8 +1285,8 @@ trigger_print_log () ptr_trigger = ptr_trigger->next_trigger) { weechat_log_printf (""); - weechat_log_printf ("[trigger (addr:0x%lx)]", ptr_trigger); - weechat_log_printf (" name. . . . . . . . . . : '%s'", ptr_trigger->name); + weechat_log_printf ("[trigger (addr:%p)]", ptr_trigger); + weechat_log_printf (" name. . . . . . . . . . : '%s'", ptr_trigger->name); weechat_log_printf (" enabled . . . . . . . . : %d", weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_ENABLED])); weechat_log_printf (" hook . . . . . . . . . : %d ('%s')", @@ -1306,34 +1306,34 @@ trigger_print_log () weechat_log_printf (" post_action . . . . . . : %d ('%s')", weechat_config_enum (ptr_trigger->options[TRIGGER_OPTION_POST_ACTION]), trigger_post_action_string[weechat_config_enum (ptr_trigger->options[TRIGGER_OPTION_POST_ACTION])]); - weechat_log_printf (" hooks_count . . . . . . : %d", ptr_trigger->hooks_count); - weechat_log_printf (" hooks . . . . . . . . . : 0x%lx", ptr_trigger->hooks); + weechat_log_printf (" hooks_count . . . . . . : %d", ptr_trigger->hooks_count); + weechat_log_printf (" hooks . . . . . . . . . : %p", ptr_trigger->hooks); for (i = 0; i < ptr_trigger->hooks_count; i++) { - weechat_log_printf (" hooks[%03d]. . . . . . : 0x%lx", + weechat_log_printf (" hooks[%03d]. . . . . . : %p", i, ptr_trigger->hooks[i]); } - weechat_log_printf (" hook_count_cb . . . . . : %llu", ptr_trigger->hook_count_cb); - weechat_log_printf (" hook_count_cmd. . . . . : %llu", ptr_trigger->hook_count_cmd); - weechat_log_printf (" hook_running. . . . . . : %d", ptr_trigger->hook_running); - weechat_log_printf (" hook_print_buffers. . . : '%s'", ptr_trigger->hook_print_buffers); - weechat_log_printf (" regex_count . . . . . . : %d", ptr_trigger->regex_count); - weechat_log_printf (" regex . . . . . . . . . : 0x%lx", ptr_trigger->regex); + weechat_log_printf (" hook_count_cb . . . . . : %llu", ptr_trigger->hook_count_cb); + weechat_log_printf (" hook_count_cmd. . . . . : %llu", ptr_trigger->hook_count_cmd); + weechat_log_printf (" hook_running. . . . . . : %d", ptr_trigger->hook_running); + weechat_log_printf (" hook_print_buffers. . . : '%s'", ptr_trigger->hook_print_buffers); + weechat_log_printf (" regex_count . . . . . . : %d", ptr_trigger->regex_count); + weechat_log_printf (" regex . . . . . . . . . : %p", ptr_trigger->regex); for (i = 0; i < ptr_trigger->regex_count; i++) { weechat_log_printf (" regex[%03d].variable . . . : '%s'", i, ptr_trigger->regex[i].variable); weechat_log_printf (" regex[%03d].str_regex. . . : '%s'", i, ptr_trigger->regex[i].str_regex); - weechat_log_printf (" regex[%03d].regex. . . . . : 0x%lx", + weechat_log_printf (" regex[%03d].regex. . . . . : %p", i, ptr_trigger->regex[i].regex); weechat_log_printf (" regex[%03d].replace. . . . : '%s'", i, ptr_trigger->regex[i].replace); weechat_log_printf (" regex[%03d].replace_escaped: '%s'", i, ptr_trigger->regex[i].replace_escaped); } - weechat_log_printf (" commands_count. . . . . : %d", ptr_trigger->commands_count); - weechat_log_printf (" commands. . . . . . . . : 0x%lx", ptr_trigger->commands); + weechat_log_printf (" commands_count. . . . . : %d", ptr_trigger->commands_count); + weechat_log_printf (" commands. . . . . . . . : %p", ptr_trigger->commands); if (ptr_trigger->commands) { for (i = 0; ptr_trigger->commands[i]; i++) @@ -1342,8 +1342,8 @@ trigger_print_log () i, ptr_trigger->commands[i]); } } - weechat_log_printf (" prev_trigger. . . . . . : 0x%lx", ptr_trigger->prev_trigger); - weechat_log_printf (" next_trigger. . . . . . : 0x%lx", ptr_trigger->next_trigger); + weechat_log_printf (" prev_trigger. . . . . . : %p", ptr_trigger->prev_trigger); + weechat_log_printf (" next_trigger. . . . . . : %p", ptr_trigger->next_trigger); } } diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index da23fb4e9..7096edb55 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1732,65 +1732,65 @@ xfer_print_log () for (ptr_xfer = xfer_list; ptr_xfer; ptr_xfer = ptr_xfer->next_xfer) { weechat_log_printf (""); - weechat_log_printf ("[xfer (addr:0x%lx)]", ptr_xfer); - weechat_log_printf (" plugin_name . . . . . . : '%s'", ptr_xfer->plugin_name); - weechat_log_printf (" plugin_id . . . . . . . : '%s'", ptr_xfer->plugin_id); + weechat_log_printf ("[xfer (addr:%p)]", ptr_xfer); + weechat_log_printf (" plugin_name . . . . . . : '%s'", ptr_xfer->plugin_name); + weechat_log_printf (" plugin_id . . . . . . . : '%s'", ptr_xfer->plugin_id); weechat_log_printf (" type. . . . . . . . . . : %d (%s)", ptr_xfer->type, xfer_type_string[ptr_xfer->type]); weechat_log_printf (" protocol. . . . . . . . : %d (%s)", ptr_xfer->protocol, xfer_protocol_string[ptr_xfer->protocol]); - weechat_log_printf (" remote_nick . . . . . . : '%s'", ptr_xfer->remote_nick); - weechat_log_printf (" local_nick. . . . . . . : '%s'", ptr_xfer->local_nick); - weechat_log_printf (" charset_modifier. . . . : '%s'", ptr_xfer->charset_modifier); - weechat_log_printf (" filename. . . . . . . . : '%s'", ptr_xfer->filename); - weechat_log_printf (" size. . . . . . . . . . : %llu", ptr_xfer->size); - weechat_log_printf (" proxy . . . . . . . . . : '%s'", ptr_xfer->proxy); - weechat_log_printf (" local_address . . . . . : 0x%lx", ptr_xfer->local_address); - weechat_log_printf (" local_address_length. . : %d", ptr_xfer->local_address_length); - weechat_log_printf (" local_address_str . . . : '%s'" , ptr_xfer->local_address_str); - weechat_log_printf (" remote_address. . . . . : 0x%lx", ptr_xfer->remote_address); - weechat_log_printf (" remote_address_length . : %d", ptr_xfer->remote_address_length); - weechat_log_printf (" remote_address_str. . . : '%s'", ptr_xfer->remote_address_str); - weechat_log_printf (" port. . . . . . . . . . : %d", ptr_xfer->port); - weechat_log_printf (" token . . . . . . . . . : %s", ptr_xfer->token); + weechat_log_printf (" remote_nick . . . . . . : '%s'", ptr_xfer->remote_nick); + weechat_log_printf (" local_nick. . . . . . . : '%s'", ptr_xfer->local_nick); + weechat_log_printf (" charset_modifier. . . . : '%s'", ptr_xfer->charset_modifier); + weechat_log_printf (" filename. . . . . . . . : '%s'", ptr_xfer->filename); + weechat_log_printf (" size. . . . . . . . . . : %llu", ptr_xfer->size); + weechat_log_printf (" proxy . . . . . . . . . : '%s'", ptr_xfer->proxy); + weechat_log_printf (" local_address . . . . . : %p", ptr_xfer->local_address); + weechat_log_printf (" local_address_length. . : %d", ptr_xfer->local_address_length); + weechat_log_printf (" local_address_str . . . : '%s'", ptr_xfer->local_address_str); + weechat_log_printf (" remote_address. . . . . : %p", ptr_xfer->remote_address); + weechat_log_printf (" remote_address_length . : %d", ptr_xfer->remote_address_length); + weechat_log_printf (" remote_address_str. . . : '%s'", ptr_xfer->remote_address_str); + weechat_log_printf (" port. . . . . . . . . . : %d", ptr_xfer->port); + weechat_log_printf (" token . . . . . . . . . : %s", ptr_xfer->token); weechat_log_printf (" status. . . . . . . . . : %d (%s)", ptr_xfer->status, xfer_status_string[ptr_xfer->status]); - weechat_log_printf (" buffer. . . . . . . . . : 0x%lx", ptr_xfer->buffer); - weechat_log_printf (" remote_nick_color . . . : '%s'", ptr_xfer->remote_nick_color); - weechat_log_printf (" fast_send . . . . . . . : %d", ptr_xfer->fast_send); - weechat_log_printf (" blocksize . . . . . . . : %d", ptr_xfer->blocksize); - weechat_log_printf (" start_time. . . . . . . : %lld", (long long)ptr_xfer->start_time); - weechat_log_printf (" start_transfer. . . . . : %lld", (long long)ptr_xfer->start_transfer); - weechat_log_printf (" sock. . . . . . . . . . : %d", ptr_xfer->sock); - weechat_log_printf (" child_pid . . . . . . . : %d", ptr_xfer->child_pid); - weechat_log_printf (" child_read. . . . . . . : %d", ptr_xfer->child_read); - weechat_log_printf (" child_write . . . . . . : %d", ptr_xfer->child_write); - weechat_log_printf (" hook_fd . . . . . . . . : 0x%lx", ptr_xfer->hook_fd); - weechat_log_printf (" hook_timer. . . . . . . : 0x%lx", ptr_xfer->hook_timer); - weechat_log_printf (" hook_connect. . . . . . : 0x%lx", ptr_xfer->hook_connect); - weechat_log_printf (" unterminated_message. . : '%s'", ptr_xfer->unterminated_message); - weechat_log_printf (" file. . . . . . . . . . : %d", ptr_xfer->file); - weechat_log_printf (" local_filename. . . . . : '%s'", ptr_xfer->local_filename); - weechat_log_printf (" temp_local_filename . . : '%s'", ptr_xfer->temp_local_filename); - weechat_log_printf (" filename_suffix . . . . : %d", ptr_xfer->filename_suffix); - weechat_log_printf (" pos . . . . . . . . . . : %llu", ptr_xfer->pos); - weechat_log_printf (" ack . . . . . . . . . . : %llu", ptr_xfer->ack); - weechat_log_printf (" start_resume. . . . . . : %llu", ptr_xfer->start_resume); - weechat_log_printf (" last_check_time . . . . : %lld", (long long)ptr_xfer->last_check_time); - weechat_log_printf (" last_check_pos. . . . . : %llu", ptr_xfer->last_check_pos); - weechat_log_printf (" last_activity . . . . . : %lld", (long long)ptr_xfer->last_activity); - weechat_log_printf (" bytes_per_sec . . . . . : %llu", ptr_xfer->bytes_per_sec); - weechat_log_printf (" eta . . . . . . . . . . : %llu", ptr_xfer->eta); - weechat_log_printf (" hash_target . . . . . . : '%s'", ptr_xfer->hash_target); + weechat_log_printf (" buffer. . . . . . . . . : %p", ptr_xfer->buffer); + weechat_log_printf (" remote_nick_color . . . : '%s'", ptr_xfer->remote_nick_color); + weechat_log_printf (" fast_send . . . . . . . : %d", ptr_xfer->fast_send); + weechat_log_printf (" blocksize . . . . . . . : %d", ptr_xfer->blocksize); + weechat_log_printf (" start_time. . . . . . . : %lld", (long long)ptr_xfer->start_time); + weechat_log_printf (" start_transfer. . . . . : %lld", (long long)ptr_xfer->start_transfer); + weechat_log_printf (" sock. . . . . . . . . . : %d", ptr_xfer->sock); + weechat_log_printf (" child_pid . . . . . . . : %d", ptr_xfer->child_pid); + weechat_log_printf (" child_read. . . . . . . : %d", ptr_xfer->child_read); + weechat_log_printf (" child_write . . . . . . : %d", ptr_xfer->child_write); + weechat_log_printf (" hook_fd . . . . . . . . : %p", ptr_xfer->hook_fd); + weechat_log_printf (" hook_timer. . . . . . . : %p", ptr_xfer->hook_timer); + weechat_log_printf (" hook_connect. . . . . . : %p", ptr_xfer->hook_connect); + weechat_log_printf (" unterminated_message. . : '%s'", ptr_xfer->unterminated_message); + weechat_log_printf (" file. . . . . . . . . . : %d", ptr_xfer->file); + weechat_log_printf (" local_filename. . . . . : '%s'", ptr_xfer->local_filename); + weechat_log_printf (" temp_local_filename . . : '%s'", ptr_xfer->temp_local_filename); + weechat_log_printf (" filename_suffix . . . . : %d", ptr_xfer->filename_suffix); + weechat_log_printf (" pos . . . . . . . . . . : %llu", ptr_xfer->pos); + weechat_log_printf (" ack . . . . . . . . . . : %llu", ptr_xfer->ack); + weechat_log_printf (" start_resume. . . . . . : %llu", ptr_xfer->start_resume); + weechat_log_printf (" last_check_time . . . . : %lld", (long long)ptr_xfer->last_check_time); + weechat_log_printf (" last_check_pos. . . . . : %llu", ptr_xfer->last_check_pos); + weechat_log_printf (" last_activity . . . . . : %lld", (long long)ptr_xfer->last_activity); + weechat_log_printf (" bytes_per_sec . . . . . : %llu", ptr_xfer->bytes_per_sec); + weechat_log_printf (" eta . . . . . . . . . . : %llu", ptr_xfer->eta); + weechat_log_printf (" hash_target . . . . . . : '%s'", ptr_xfer->hash_target); weechat_log_printf (" hash_status . . . . . . : %d (%s)", ptr_xfer->hash_status, xfer_hash_status_string[ptr_xfer->hash_status]); - weechat_log_printf (" prev_xfer . . . . . . . : 0x%lx", ptr_xfer->prev_xfer); - weechat_log_printf (" next_xfer . . . . . . . : 0x%lx", ptr_xfer->next_xfer); + weechat_log_printf (" prev_xfer . . . . . . . : %p", ptr_xfer->prev_xfer); + weechat_log_printf (" next_xfer . . . . . . . : %p", ptr_xfer->next_xfer); } } diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index f01b5c41a..1b9616d1e 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -1014,8 +1014,7 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL("", "${buffer[unknown_list].full_name}"); WEE_CHECK_EVAL("", "${unknown_pointer}"); WEE_CHECK_EVAL("", "${my_null_pointer}"); - snprintf (str_value, sizeof (str_value), - "0x%lx", (long unsigned int)gui_buffers); + snprintf (str_value, sizeof (str_value), "%p", gui_buffers); WEE_CHECK_EVAL(str_value, "${my_buffer_pointer}"); WEE_CHECK_EVAL("0x1234abcd", "${my_other_pointer}"); WEE_CHECK_EVAL("", "${buffer[unknown_pointer].full_name}"); @@ -1024,7 +1023,7 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL("", "${buffer[my_other_pointer].full_name}"); WEE_CHECK_EVAL("core.weechat", "${buffer[gui_buffers].full_name}"); snprintf (str_value, sizeof (str_value), - "${buffer[0x%lx].full_name}", (long unsigned int)gui_buffers); + "${buffer[%p].full_name}", gui_buffers); WEE_CHECK_EVAL("core.weechat", str_value); snprintf (str_value, sizeof (str_value), "%c", 1); WEE_CHECK_EVAL(str_value, @@ -1036,7 +1035,7 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL(str_value, "${window.buffer.own_lines.first_line.data.date}"); snprintf (str_value, sizeof (str_value), - "0x%lx", (long unsigned int)(gui_buffers->local_variables)); + "%p", gui_buffers->local_variables); WEE_CHECK_EVAL(str_value, "${window.buffer.local_variables}"); WEE_CHECK_EVAL("core", "${window.buffer.local_variables.plugin}"); WEE_CHECK_EVAL("weechat", "${window.buffer.local_variables.name}"); diff --git a/tests/unit/core/test-core-hashtable.cpp b/tests/unit/core/test-core-hashtable.cpp index 26c41a237..2e8e92a1c 100644 --- a/tests/unit/core/test-core-hashtable.cpp +++ b/tests/unit/core/test-core-hashtable.cpp @@ -540,8 +540,8 @@ TEST(CoreHashtable, MapString) value_buffer, sizeof (value_buffer)); hashtable_map_string (hashtable, &test_hashtable_map_string_cb, NULL); snprintf (result, sizeof (result), - "1624693124:0x%lx", - (unsigned long)(hashtable->newest_item->value)); + "1624693124:%p", + hashtable->newest_item->value); STRCMP_EQUAL(result, test_map_string); free (test_map_string); diff --git a/tests/unit/core/test-core-hook.cpp b/tests/unit/core/test-core-hook.cpp index b7535658d..2416591cd 100644 --- a/tests/unit/core/test-core-hook.cpp +++ b/tests/unit/core/test-core-hook.cpp @@ -176,7 +176,6 @@ test_modifier_cb (const void *pointer, void *data, char **items, *new_string; const char *ptr_plugin, *ptr_tags, *ptr_msg; int num_items, length, rc; - unsigned long value; struct t_gui_buffer *ptr_buffer; /* make C++ compiler happy */ @@ -197,10 +196,9 @@ test_modifier_cb (const void *pointer, void *data, ptr_tags = (num_items >= 2) ? items[1] : NULL; - rc = sscanf (items[0], "0x%lx", &value); + rc = sscanf (items[0], "%p", &ptr_buffer); if ((rc == EOF) || (rc == 0)) goto error; - ptr_buffer = (struct t_gui_buffer *)value; ptr_plugin = gui_buffer_get_plugin_name (ptr_buffer); if (!ptr_plugin) diff --git a/tests/unit/plugins/irc/test-irc-info.cpp b/tests/unit/plugins/irc/test-irc-info.cpp index 235a5b953..70b3b30bd 100644 --- a/tests/unit/plugins/irc/test-irc-info.cpp +++ b/tests/unit/plugins/irc/test-irc-info.cpp @@ -234,12 +234,10 @@ TEST(IrcInfo, InfoIrcBufferCb) WEE_TEST_STR(NULL, hook_info_get (NULL, "irc_buffer", "local")); - snprintf (str_pointer, sizeof (str_pointer), - "0x%lx", (unsigned long)channel->buffer); + snprintf (str_pointer, sizeof (str_pointer), "%p", channel->buffer); WEE_TEST_STR(str_pointer, hook_info_get (NULL, "irc_buffer", "local,#test")); - snprintf (str_pointer, sizeof (str_pointer), - "0x%lx", (unsigned long)channel->buffer); + snprintf (str_pointer, sizeof (str_pointer), "%p", channel->buffer); WEE_TEST_STR(str_pointer, hook_info_get (NULL, "irc_buffer", "local,#test,bob")); irc_nick_free (server, channel, nick); diff --git a/tests/unit/plugins/test-plugin-api-info.cpp b/tests/unit/plugins/test-plugin-api-info.cpp index 6324d260f..914d5c1c7 100644 --- a/tests/unit/plugins/test-plugin-api-info.cpp +++ b/tests/unit/plugins/test-plugin-api-info.cpp @@ -337,7 +337,7 @@ TEST(PluginApiInfo, BufferCb) POINTERS_EQUAL(NULL, hook_info_get (NULL, "buffer", "zzz")); - snprintf (str_buffer, sizeof (str_buffer), "0x%lx", (unsigned long)gui_buffers); + snprintf (str_buffer, sizeof (str_buffer), "%p", gui_buffers); WEE_TEST_STR(str_buffer, hook_info_get (NULL, "buffer", "core.weechat")); }