diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-01 21:08:52 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-01 21:08:52 +0200 |
commit | 965beb37dede0ac0f6e1be961acfbc15ee7e46cf (patch) | |
tree | 428ff5cb61b17b8de339316e65ed4a70aea10dca /src/plugins/fset | |
parent | a7c92e2d2471c1442c65e5ea95a7dce8061f5784 (diff) | |
download | weechat-965beb37dede0ac0f6e1be961acfbc15ee7e46cf.zip |
core: fix print of pointer values
Diffstat (limited to 'src/plugins/fset')
-rw-r--r-- | src/plugins/fset/fset-mouse.c | 3 | ||||
-rw-r--r-- | src/plugins/fset/fset-option.c | 32 |
2 files changed, 17 insertions, 18 deletions
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); } } |