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

Fix bug with pointer conversions on 64 bits architecture

This commit is contained in:
Sebastien Helleu
2008-11-04 15:34:44 +01:00
parent e2a1966095
commit d32b22f76f
32 changed files with 504 additions and 506 deletions
+1 -3
View File
@@ -713,7 +713,6 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
const char *modifier_data, const char *string)
{
struct t_gui_buffer *buffer;
unsigned int value;
char *result, *ptr_string, *pos_space, *color_normal, *color_error;
int length, index_result, length_word, word_ok;
int length_color_normal, length_color_error;
@@ -725,8 +724,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
if (!string || !string[0])
return NULL;
sscanf (modifier_data, "%x", &value);
buffer = (struct t_gui_buffer *)value;
sscanf (modifier_data, "%lx", (long unsigned int *)&buffer);
if (!weechat_aspell_spellers)
return NULL;
+13 -13
View File
@@ -91,9 +91,9 @@ demo_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
(void) data;
weechat_printf (buffer,
"buffer_input_data_cb: buffer = %x (%s), "
"buffer_input_data_cb: buffer = %lx (%s), "
"input_data = \"%s\"",
buffer,
(long unsigned int)buffer,
weechat_buffer_get_string (buffer, "name"),
input_data);
@@ -113,8 +113,8 @@ demo_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
if (weechat_demo_plugin->debug)
{
weechat_printf (NULL,
"buffer_close_cb: buffer = %x (%s)",
buffer,
"buffer_close_cb: buffer = %lx (%s)",
(long unsigned int)buffer,
weechat_buffer_get_string (buffer, "name"));
}
@@ -213,18 +213,18 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name)
argv[j] + 2));
break;
case 'p':
weechat_printf (NULL, " %s: %X",
weechat_printf (NULL, " %s: %lx",
argv[j] + 2,
weechat_infolist_pointer (infolist,
argv[j] + 2));
(long unsigned int)weechat_infolist_pointer (infolist,
argv[j] + 2));
break;
case 'b':
pointer = weechat_infolist_buffer (infolist,
argv[j] + 2,
&size);
weechat_printf (NULL, " %s: %X (size: %d)",
weechat_printf (NULL, " %s: %lx (size: %d)",
argv[j] + 2,
pointer,
(long unsigned int)pointer,
size);
break;
case 't':
@@ -359,15 +359,15 @@ demo_signal_cb (void *data, const char *signal, const char *type_data,
{
weechat_printf (NULL,
_("demo_signal: signal: %s, type_data: %s, "
"signal_data: 0x%x"),
signal, type_data, signal_data);
"signal_data: 0x%lx"),
signal, type_data, (long unsigned int)signal_data);
}
else
{
weechat_printf (NULL,
_("demo_signal: signal: %s, type_data: %s, "
"signal_data: 0x%x (unknown type)"),
signal, type_data, signal_data);
"signal_data: 0x%lx (unknown type)"),
signal, type_data, (long unsigned int)signal_data);
}
}
+18 -18
View File
@@ -684,24 +684,24 @@ irc_channel_print_log (struct t_irc_channel *channel)
struct t_irc_nick *ptr_nick;
weechat_log_printf ("");
weechat_log_printf (" => channel %s (addr:0x%x)]", 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 (" checking_away. . . . . . : %d", channel->checking_away);
weechat_log_printf (" away_message . . . . . . : '%s'", channel->away_message);
weechat_log_printf (" cycle. . . . . . . . . . : %d", channel->cycle);
weechat_log_printf (" display_creation_date. . : %d", channel->display_creation_date);
weechat_log_printf (" nicks. . . . . . . . . . : 0x%x", channel->nicks);
weechat_log_printf (" last_nick. . . . . . . . : 0x%x", channel->last_nick);
weechat_log_printf (" buffer . . . . . . . . . : 0x%x", channel->buffer);
weechat_log_printf (" nicks_speaking . . . . . : 0x%x", channel->nicks_speaking);
weechat_log_printf (" nicks_speaking_time. . . : 0x%x", channel->nicks_speaking_time);
weechat_log_printf (" last_nick_speaking_time. : 0x%x", channel->last_nick_speaking_time);
weechat_log_printf (" prev_channel . . . . . . : 0x%x", channel->prev_channel);
weechat_log_printf (" next_channel . . . . . . : 0x%x", channel->next_channel);
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 (" checking_away. . . . . . : %d", channel->checking_away);
weechat_log_printf (" away_message . . . . . . : '%s'", channel->away_message);
weechat_log_printf (" cycle. . . . . . . . . . : %d", channel->cycle);
weechat_log_printf (" display_creation_date. . : %d", channel->display_creation_date);
weechat_log_printf (" nicks. . . . . . . . . . : 0x%lx", channel->nicks);
weechat_log_printf (" last_nick. . . . . . . . : 0x%lx", channel->last_nick);
weechat_log_printf (" buffer . . . . . . . . . : 0x%lx", channel->buffer);
weechat_log_printf (" nicks_speaking . . . . . : 0x%lx", channel->nicks_speaking);
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 (" prev_channel . . . . . . : 0x%lx", channel->prev_channel);
weechat_log_printf (" next_channel . . . . . . : 0x%lx", channel->next_channel);
if (channel->nicks_speaking)
{
weechat_log_printf ("");
+2 -2
View File
@@ -931,7 +931,7 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)ptr_server);
"%lx", (long unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_send");
weechat_infolist_new_var_string (item, "protocol", "dcc");
@@ -963,7 +963,7 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)ptr_server);
"%lx", (long unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "chat_send");
weechat_infolist_new_var_string (item, "remote_nick", argv[2]);
+1 -1
View File
@@ -50,7 +50,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer)
*string = malloc (64);
if (*string)
{
snprintf (*string, 64 - 1, "0x%x", (unsigned int)pointer);
snprintf (*string, 64 - 1, "0x%lx", (long unsigned int)pointer);
}
}
}
+6 -6
View File
@@ -609,10 +609,10 @@ void
irc_nick_print_log (struct t_irc_nick *nick)
{
weechat_log_printf ("");
weechat_log_printf (" => nick %s (addr:0x%x):", nick->name, nick);
weechat_log_printf (" host . . . . . : %s", nick->host);
weechat_log_printf (" flags. . . . . : %d", nick->flags);
weechat_log_printf (" color. . . . . : '%s'", nick->color);
weechat_log_printf (" prev_nick. . . : 0x%x", nick->prev_nick);
weechat_log_printf (" next_nick. . . : 0x%x", nick->next_nick);
weechat_log_printf (" => nick %s (addr:0x%lx):", nick->name, nick);
weechat_log_printf (" host . . . . . : %s", nick->host);
weechat_log_printf (" flags. . . . . : %d", nick->flags);
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);
}
+4 -4
View File
@@ -1562,7 +1562,7 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, const char *command,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)server);
"%lx", (long unsigned int)server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_recv");
weechat_infolist_new_var_string (item, "protocol", "dcc");
@@ -1672,7 +1672,7 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, const char *command,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)server);
"%lx", (long unsigned int)server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_recv");
weechat_infolist_new_var_string (item, "filename", pos_file);
@@ -1778,7 +1778,7 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, const char *command,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)server);
"%lx", (long unsigned int)server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_recv");
weechat_infolist_new_var_string (item, "filename", pos_file);
@@ -1897,7 +1897,7 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, const char *command,
{
weechat_infolist_new_var_string (item, "plugin_name", weechat_plugin->name);
snprintf (plugin_id, sizeof (plugin_id),
"%x", (unsigned int)server);
"%lx", (long unsigned int)server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "chat_recv");
weechat_infolist_new_var_string (item, "remote_nick", nick);
+48 -48
View File
@@ -2688,7 +2688,7 @@ irc_server_xfer_send_ready_cb (void *data, const char *signal,
plugin_id = weechat_infolist_string (infolist, "plugin_id");
if (plugin_name && (strcmp (plugin_name, IRC_PLUGIN_NAME) == 0) && plugin_id)
{
sscanf (plugin_id, "%x", (unsigned int *)&server);
sscanf (plugin_id, "%lx", (long unsigned int *)&server);
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -2761,7 +2761,7 @@ irc_server_xfer_resume_ready_cb (void *data, const char *signal,
plugin_id = weechat_infolist_string (infolist, "plugin_id");
if (plugin_name && (strcmp (plugin_name, IRC_PLUGIN_NAME) == 0) && plugin_id)
{
sscanf (plugin_id, "%x", (unsigned int *)&server);
sscanf (plugin_id, "%lx", (long unsigned int *)&server);
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -2818,7 +2818,7 @@ irc_server_xfer_send_accept_resume_cb (void *data, const char *signal,
plugin_id = weechat_infolist_string (infolist, "plugin_id");
if (plugin_name && (strcmp (plugin_name, IRC_PLUGIN_NAME) == 0) && plugin_id)
{
sscanf (plugin_id, "%x", (unsigned int *)&server);
sscanf (plugin_id, "%lx", (long unsigned int *)&server);
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -2968,60 +2968,60 @@ irc_server_print_log ()
ptr_server = ptr_server->next_server)
{
weechat_log_printf ("");
weechat_log_printf ("[server %s (addr:0x%x)]", ptr_server->name, ptr_server);
weechat_log_printf (" autoconnect . . . . : %d", ptr_server->autoconnect);
weechat_log_printf (" autoreconnect . . . : %d", ptr_server->autoreconnect);
weechat_log_printf (" autoreconnect_delay : %d", ptr_server->autoreconnect_delay);
weechat_log_printf (" addresses . . . . . : '%s'", ptr_server->addresses);
weechat_log_printf (" ipv6. . . . . . . . : %d", ptr_server->ipv6);
weechat_log_printf (" ssl . . . . . . . . : %d", ptr_server->ssl);
weechat_log_printf ("[server %s (addr:0x%lx)]", ptr_server->name, ptr_server);
weechat_log_printf (" autoconnect . . . . : %d", ptr_server->autoconnect);
weechat_log_printf (" autoreconnect . . . : %d", ptr_server->autoreconnect);
weechat_log_printf (" autoreconnect_delay : %d", ptr_server->autoreconnect_delay);
weechat_log_printf (" addresses . . . . . : '%s'", ptr_server->addresses);
weechat_log_printf (" ipv6. . . . . . . . : %d", ptr_server->ipv6);
weechat_log_printf (" ssl . . . . . . . . : %d", ptr_server->ssl);
weechat_log_printf (" password. . . . . . : '%s'",
(ptr_server->password && ptr_server->password[0]) ?
"(hidden)" : ptr_server->password);
weechat_log_printf (" nicks . . . . . . . : '%s'", ptr_server->nicks);
weechat_log_printf (" username. . . . . . : '%s'", ptr_server->username);
weechat_log_printf (" realname. . . . . . : '%s'", ptr_server->realname);
weechat_log_printf (" nicks . . . . . . . : '%s'", ptr_server->nicks);
weechat_log_printf (" username. . . . . . : '%s'", ptr_server->username);
weechat_log_printf (" realname. . . . . . : '%s'", ptr_server->realname);
weechat_log_printf (" command . . . . . . : '%s'",
(ptr_server->command && ptr_server->command[0]) ?
"(hidden)" : ptr_server->command);
weechat_log_printf (" command_delay . . . : %d", ptr_server->command_delay);
weechat_log_printf (" autojoin. . . . . . : '%s'", ptr_server->autojoin);
weechat_log_printf (" autorejoin. . . . . : %d", ptr_server->autorejoin);
weechat_log_printf (" reloaded_from_config: %d", ptr_server->reloaded_from_config);
weechat_log_printf (" addresses_count . . : %d", ptr_server->addresses_count);
weechat_log_printf (" addresses_array . . : 0x%x", ptr_server->addresses_array);
weechat_log_printf (" ports_array . . . . : 0x%x", ptr_server->ports_array);
weechat_log_printf (" sock. . . . . . . . : %d", ptr_server->sock);
weechat_log_printf (" hook_connect. . . . : 0x%x", ptr_server->hook_connect);
weechat_log_printf (" hook_fd . . . . . . : 0x%x", ptr_server->hook_fd);
weechat_log_printf (" is_connected. . . . : %d", ptr_server->is_connected);
weechat_log_printf (" ssl_connected . . . : %d", ptr_server->ssl_connected);
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%x", ptr_server->nicks_array);
weechat_log_printf (" nick. . . . . . . . : '%s'", ptr_server->nick);
weechat_log_printf (" nick_modes. . . . . : '%s'", ptr_server->nick_modes);
weechat_log_printf (" prefix. . . . . . . : '%s'", ptr_server->prefix);
weechat_log_printf (" reconnect_start . . : %ld", ptr_server->reconnect_start);
weechat_log_printf (" command_time. . . . : %ld", ptr_server->command_time);
weechat_log_printf (" reconnect_join. . . : %d", ptr_server->reconnect_join);
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 . . . . . : %ld", ptr_server->away_time);
weechat_log_printf (" lag . . . . . . . . : %d", ptr_server->lag);
weechat_log_printf (" command_delay . . . : %d", ptr_server->command_delay);
weechat_log_printf (" autojoin. . . . . . : '%s'", ptr_server->autojoin);
weechat_log_printf (" autorejoin. . . . . : %d", ptr_server->autorejoin);
weechat_log_printf (" reloaded_from_config: %d", ptr_server->reloaded_from_config);
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 (" 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 (" is_connected. . . . : %d", ptr_server->is_connected);
weechat_log_printf (" ssl_connected . . . : %d", ptr_server->ssl_connected);
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. . . . . . . . : '%s'", ptr_server->nick);
weechat_log_printf (" nick_modes. . . . . : '%s'", ptr_server->nick_modes);
weechat_log_printf (" prefix. . . . . . . : '%s'", ptr_server->prefix);
weechat_log_printf (" reconnect_start . . : %ld", ptr_server->reconnect_start);
weechat_log_printf (" command_time. . . . : %ld", ptr_server->command_time);
weechat_log_printf (" reconnect_join. . . : %d", ptr_server->reconnect_join);
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 . . . . . : %ld", ptr_server->away_time);
weechat_log_printf (" lag . . . . . . . . : %d", ptr_server->lag);
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. . . : %ld", ptr_server->lag_next_check);
weechat_log_printf (" last_user_message . : %ld", ptr_server->last_user_message);
weechat_log_printf (" outqueue. . . . . . : 0x%x", ptr_server->outqueue);
weechat_log_printf (" last_outqueue . . . : 0x%x", ptr_server->last_outqueue);
weechat_log_printf (" buffer. . . . . . . : 0x%x", ptr_server->buffer);
weechat_log_printf (" channels. . . . . . : 0x%x", ptr_server->channels);
weechat_log_printf (" last_channel. . . . : 0x%x", ptr_server->last_channel);
weechat_log_printf (" prev_server . . . . : 0x%x", ptr_server->prev_server);
weechat_log_printf (" next_server . . . . : 0x%x", ptr_server->next_server);
weechat_log_printf (" lag_next_check. . . : %ld", ptr_server->lag_next_check);
weechat_log_printf (" last_user_message . : %ld", ptr_server->last_user_message);
weechat_log_printf (" outqueue. . . . . . : 0x%lx", ptr_server->outqueue);
weechat_log_printf (" last_outqueue . . . : 0x%lx", ptr_server->last_outqueue);
weechat_log_printf (" buffer. . . . . . . : 0x%lx", ptr_server->buffer);
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);
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
+10 -10
View File
@@ -945,15 +945,15 @@ plugin_print_log ()
ptr_plugin = ptr_plugin->next_plugin)
{
log_printf ("");
log_printf ("[plugin (addr:0x%x)]", ptr_plugin);
log_printf (" filename . . . . . . . : '%s'", ptr_plugin->filename);
log_printf (" handle . . . . . . . . : 0x%x", ptr_plugin->handle);
log_printf (" name . . . . . . . . . : '%s'", ptr_plugin->name);
log_printf (" description. . . . . . : '%s'", ptr_plugin->description);
log_printf (" version. . . . . . . . : '%s'", ptr_plugin->version);
log_printf (" charset. . . . . . . . : '%s'", ptr_plugin->charset);
log_printf (" debug. . . . . . . . . : %d", ptr_plugin->debug);
log_printf (" prev_plugin. . . . . . : 0x%x", ptr_plugin->prev_plugin);
log_printf (" next_plugin. . . . . . : 0x%x", ptr_plugin->next_plugin);
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 (" version. . . . . . . . : '%s'", ptr_plugin->version);
log_printf (" charset. . . . . . . . : '%s'", ptr_plugin->charset);
log_printf (" debug. . . . . . . . . : %d", ptr_plugin->debug);
log_printf (" prev_plugin. . . . . . : 0x%lx", ptr_plugin->prev_plugin);
log_printf (" next_plugin. . . . . . : 0x%lx", ptr_plugin->next_plugin);
}
}
+11 -11
View File
@@ -124,15 +124,15 @@ script_callback_print_log (struct t_weechat_plugin *weechat_plugin,
struct t_script_callback *script_callback)
{
weechat_log_printf ("");
weechat_log_printf (" [callback (addr:0x%x)]", script_callback);
weechat_log_printf (" script. . . . . . . : 0x%x", script_callback->script);
weechat_log_printf (" function. . . . . . : '%s'", script_callback->function);
weechat_log_printf (" config_file . . . . : 0x%x", script_callback->config_file);
weechat_log_printf (" config_section. . . : 0x%x", script_callback->config_section);
weechat_log_printf (" config_option . . . : 0x%x", script_callback->config_option);
weechat_log_printf (" hook. . . . . . . . : 0x%x", script_callback->hook);
weechat_log_printf (" buffer. . . . . . . : 0x%x", script_callback->buffer);
weechat_log_printf (" bar_item. . . . . . : 0x%x", script_callback->bar_item);
weechat_log_printf (" prev_callback . . . : 0x%x", script_callback->prev_callback);
weechat_log_printf (" next_callback . . . : 0x%x", script_callback->next_callback);
weechat_log_printf (" [callback (addr:0x%lx)]", script_callback);
weechat_log_printf (" script. . . . . . . : 0x%lx", script_callback->script);
weechat_log_printf (" function. . . . . . : '%s'", script_callback->function);
weechat_log_printf (" config_file . . . . : 0x%lx", script_callback->config_file);
weechat_log_printf (" config_section. . . : 0x%lx", script_callback->config_section);
weechat_log_printf (" config_option . . . : 0x%lx", script_callback->config_option);
weechat_log_printf (" hook. . . . . . . . : 0x%lx", script_callback->hook);
weechat_log_printf (" buffer. . . . . . . : 0x%lx", script_callback->buffer);
weechat_log_printf (" bar_item. . . . . . : 0x%lx", script_callback->bar_item);
weechat_log_printf (" prev_callback . . . : 0x%lx", script_callback->prev_callback);
weechat_log_printf (" next_callback . . . : 0x%lx", script_callback->next_callback);
}
+16 -16
View File
@@ -180,7 +180,7 @@ script_ptr2str (void *pointer)
return strdup ("");
snprintf (pointer_str, sizeof (pointer_str),
"0x%x", (unsigned int)pointer);
"0x%lx", (long unsigned int)pointer);
return strdup (pointer_str);
}
@@ -192,12 +192,12 @@ script_ptr2str (void *pointer)
void *
script_str2ptr (const char *pointer_str)
{
unsigned int value;
long unsigned int value;
if (!pointer_str || (pointer_str[0] != '0') || (pointer_str[1] != 'x'))
return NULL;
sscanf (pointer_str + 2, "%x", &value);
sscanf (pointer_str + 2, "%lx", &value);
return (void *)value;
}
@@ -604,19 +604,19 @@ 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%x)]", ptr_script->name, ptr_script);
weechat_log_printf (" filename. . . . . . : '%s'", ptr_script->filename);
weechat_log_printf (" interpreter . . . . : 0x%x", 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 (" callbacks . . . . . : 0x%x", ptr_script->callbacks);
weechat_log_printf (" prev_script . . . . : 0x%x", ptr_script->prev_script);
weechat_log_printf (" next_script . . . . : 0x%x", ptr_script->next_script);
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 (" callbacks . . . . . : 0x%lx", ptr_script->callbacks);
weechat_log_printf (" prev_script . . . . : 0x%lx", ptr_script->prev_script);
weechat_log_printf (" next_script . . . . : 0x%lx", ptr_script->next_script);
for (ptr_script_callback = ptr_script->callbacks; ptr_script_callback;
ptr_script_callback = ptr_script_callback->next_callback)
+32 -32
View File
@@ -1283,45 +1283,45 @@ 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%x)]", 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: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 (" type. . . . . . . . : %d (%s)",
ptr_xfer->type,
xfer_type_string[ptr_xfer->type]);
weechat_log_printf (" remote_nick . . . . : '%s'", ptr_xfer->remote_nick);
weechat_log_printf (" local_nick. . . . . : '%s'", ptr_xfer->local_nick);
weechat_log_printf (" filename. . . . . . : '%s'", ptr_xfer->filename);
weechat_log_printf (" size. . . . . . . . : %lu", ptr_xfer->size);
weechat_log_printf (" address . . . . . . : %lu", ptr_xfer->address);
weechat_log_printf (" port. . . . . . . . : %d", ptr_xfer->port);
weechat_log_printf (" remote_nick . . . . : '%s'", ptr_xfer->remote_nick);
weechat_log_printf (" local_nick. . . . . : '%s'", ptr_xfer->local_nick);
weechat_log_printf (" filename. . . . . . : '%s'", ptr_xfer->filename);
weechat_log_printf (" size. . . . . . . . : %lu", ptr_xfer->size);
weechat_log_printf (" address . . . . . . : %lu", ptr_xfer->address);
weechat_log_printf (" port. . . . . . . . : %d", ptr_xfer->port);
weechat_log_printf (" status. . . . . . . : %d (%s)",
ptr_xfer->status,
xfer_status_string[ptr_xfer->status]);
weechat_log_printf (" buffer. . . . . . . : 0x%x", ptr_xfer->buffer);
weechat_log_printf (" fast_send . . . . . : %d", ptr_xfer->fast_send);
weechat_log_printf (" blocksize . . . . . : %d", ptr_xfer->blocksize);
weechat_log_printf (" start_time. . . . . : %ld", ptr_xfer->start_time);
weechat_log_printf (" start_transfer. . . : %ld", 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 (" 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 (" filename_suffix . . : %d", ptr_xfer->filename_suffix);
weechat_log_printf (" pos . . . . . . . . : %lu", ptr_xfer->pos);
weechat_log_printf (" ack . . . . . . . . : %lu", ptr_xfer->ack);
weechat_log_printf (" start_resume. . . . : %lu", ptr_xfer->start_resume);
weechat_log_printf (" last_check_time . . : %ld", ptr_xfer->last_check_time);
weechat_log_printf (" last_check_pos. . . : %lu", ptr_xfer->last_check_pos);
weechat_log_printf (" last_activity . . . : %ld", ptr_xfer->last_activity);
weechat_log_printf (" bytes_per_sec . . . : %lu", ptr_xfer->bytes_per_sec);
weechat_log_printf (" eta . . . . . . . . : %lu", ptr_xfer->eta);
weechat_log_printf (" prev_xfer . . . . . : 0x%x", ptr_xfer->prev_xfer);
weechat_log_printf (" next_xfer . . . . . : 0x%x", ptr_xfer->next_xfer);
weechat_log_printf (" buffer. . . . . . . : 0x%lx", ptr_xfer->buffer);
weechat_log_printf (" fast_send . . . . . : %d", ptr_xfer->fast_send);
weechat_log_printf (" blocksize . . . . . : %d", ptr_xfer->blocksize);
weechat_log_printf (" start_time. . . . . : %ld", ptr_xfer->start_time);
weechat_log_printf (" start_transfer. . . : %ld", 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 (" 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 (" filename_suffix . . : %d", ptr_xfer->filename_suffix);
weechat_log_printf (" pos . . . . . . . . : %lu", ptr_xfer->pos);
weechat_log_printf (" ack . . . . . . . . : %lu", ptr_xfer->ack);
weechat_log_printf (" start_resume. . . . : %lu", ptr_xfer->start_resume);
weechat_log_printf (" last_check_time . . : %ld", ptr_xfer->last_check_time);
weechat_log_printf (" last_check_pos. . . : %lu", ptr_xfer->last_check_pos);
weechat_log_printf (" last_activity . . . : %ld", ptr_xfer->last_activity);
weechat_log_printf (" bytes_per_sec . . . : %lu", ptr_xfer->bytes_per_sec);
weechat_log_printf (" eta . . . . . . . . : %lu", ptr_xfer->eta);
weechat_log_printf (" prev_xfer . . . . . : 0x%lx", ptr_xfer->prev_xfer);
weechat_log_printf (" next_xfer . . . . . : 0x%lx", ptr_xfer->next_xfer);
}
}