mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
Merge pull request #1246 from ailin-nemui/wrong-prefixes
correct wrong function prefixes
Module authors will have to adapt these changes:
[M] 'constant I_INPUT_READ' {G_INPUT_READ}
[M] 'constant I_INPUT_WRITE' {G_INPUT_WRITE}
[M] 'function int i_input_add(GIOChannel*, int, GInputFunction, void*)' {g_input_add}
[M] 'function int i_input_add_full(GIOChannel*, int, int, GInputFunction, void*)' {g_input_add_full}
[M] 'function int i_input_add_poll(int, int, int, GInputFunction, void*)' {g_input_add_poll}
[M] 'function GIOChannel* i_io_channel_new(int)' {g_io_channel_new}
[M] 'function int i_io_channel_read_block(GIOChannel*, void*, int)' {g_io_channel_read_block}
[M] 'function int i_io_channel_write_block(GIOChannel*, void*, int)' {g_io_channel_write_block}
[M] 'function int i_istr_cmp(gconstpointer, gconstpointer)' {g_istr_cmp}
[M] 'function int i_istr_equal(gconstpointer, gconstpointer)' {g_istr_equal}
[M] 'function guint i_istr_hash(gconstpointer)' {g_istr_hash}
[M] 'function void i_log_func(const char*, GLogLevelFlags, const char*)' {glog_func}
[M] 'function GSList* i_slist_delete_string(GSList*, const char*, GDestroyNotify)' {gslist_delete_string}
[M] 'function GSList* i_slist_find_icase_string(GSList*, const char*)' {gslist_find_icase_string}
[M] 'function GSList* i_slist_find_string(GSList*, const char*)' {gslist_find_string}
[M] 'function void* i_slist_foreach_find(GSList*, FOREACH_FIND_FUNC, void*)' {gslist_foreach_find}
[M] 'function void i_slist_free_full(GSList*, GDestroyNotify)' {gslist_free_full}
[M] 'function GSList* i_slist_remove_string(GSList*, const char*)' {gslist_remove_string}
[M] 'function char* i_slist_to_string(GSList*, const char*)' {gslist_to_string}
This commit is contained in:
commit
db9aa817d5
46 changed files with 181 additions and 231 deletions
|
|
@ -425,7 +425,8 @@ static GList *completion_get_settings(const char *key, SettingType type)
|
|||
SETTINGS_REC *rec = tmp->data;
|
||||
|
||||
if ((type == SETTING_TYPE_ANY || rec->type == type) && g_ascii_strncasecmp(rec->key, key, len) == 0)
|
||||
complist = g_list_insert_sorted(complist, g_strdup(rec->key), (GCompareFunc) g_istr_cmp);
|
||||
complist = g_list_insert_sorted(complist, g_strdup(rec->key),
|
||||
(GCompareFunc) i_istr_cmp);
|
||||
}
|
||||
g_slist_free(sets);
|
||||
return complist;
|
||||
|
|
@ -460,7 +461,8 @@ static GList *completion_get_aliases(const char *alias, char cmdchar)
|
|||
be appended after command completions and kept in
|
||||
uppercase to show it's an alias */
|
||||
if (glist_find_icase_string(complist, word) == NULL)
|
||||
complist = g_list_insert_sorted(complist, word, (GCompareFunc) g_istr_cmp);
|
||||
complist =
|
||||
g_list_insert_sorted(complist, word, (GCompareFunc) i_istr_cmp);
|
||||
else
|
||||
g_free(word);
|
||||
}
|
||||
|
|
@ -489,7 +491,8 @@ static GList *completion_get_commands(const char *cmd, char cmdchar)
|
|||
word = cmdchar == '\0' ? g_strdup(rec->cmd) :
|
||||
g_strdup_printf("%c%s", cmdchar, rec->cmd);
|
||||
if (glist_find_icase_string(complist, word) == NULL)
|
||||
complist = g_list_insert_sorted(complist, word, (GCompareFunc) g_istr_cmp);
|
||||
complist =
|
||||
g_list_insert_sorted(complist, word, (GCompareFunc) i_istr_cmp);
|
||||
else
|
||||
g_free(word);
|
||||
}
|
||||
|
|
@ -523,7 +526,8 @@ static GList *completion_get_subcommands(const char *cmd)
|
|||
continue;
|
||||
|
||||
if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0)
|
||||
complist = g_list_insert_sorted(complist, g_strdup(rec->cmd+skip), (GCompareFunc) g_istr_cmp);
|
||||
complist = g_list_insert_sorted(complist, g_strdup(rec->cmd + skip),
|
||||
(GCompareFunc) i_istr_cmp);
|
||||
}
|
||||
return complist;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,8 +254,7 @@ void fe_common_core_deinit(void)
|
|||
signal_remove("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);
|
||||
}
|
||||
|
||||
void glog_func(const char *log_domain, GLogLevelFlags log_level,
|
||||
const char *message)
|
||||
void i_log_func(const char *log_domain, GLogLevelFlags log_level, const char *message)
|
||||
{
|
||||
const char *reason;
|
||||
|
||||
|
|
@ -357,7 +356,7 @@ static void autoconnect_servers(void)
|
|||
|
||||
if (rec->autoconnect &&
|
||||
(rec->chatnet == NULL ||
|
||||
gslist_find_icase_string(chatnets, rec->chatnet) == NULL)) {
|
||||
i_slist_find_icase_string(chatnets, rec->chatnet) == NULL)) {
|
||||
if (rec->chatnet != NULL) {
|
||||
chatnets = g_slist_append(chatnets, rec->chatnet);
|
||||
str = g_strdup_printf("-network %s %s %d", rec->chatnet, rec->address, rec->port);
|
||||
|
|
@ -459,7 +458,7 @@ void fe_common_core_finish_init(void)
|
|||
signal_add_first("setup changed", (SIGNAL_FUNC) sig_setup_changed);
|
||||
|
||||
/* _after_ windows are created.. */
|
||||
g_log_set_default_handler((GLogFunc) glog_func, NULL);
|
||||
g_log_set_default_handler((GLogFunc) i_log_func, NULL);
|
||||
|
||||
if (setup_changed)
|
||||
signal_emit("setup changed", 0);
|
||||
|
|
|
|||
|
|
@ -302,9 +302,9 @@ static void process_exec(PROCESS_REC *rec, const char *cmd)
|
|||
|
||||
if (rec->pid != 0) {
|
||||
/* parent process */
|
||||
GIOChannel *outio = g_io_channel_new(in[1]);
|
||||
GIOChannel *outio = i_io_channel_new(in[1]);
|
||||
|
||||
rec->in = g_io_channel_new(out[0]);
|
||||
rec->in = i_io_channel_new(out[0]);
|
||||
rec->out = net_sendbuffer_create(outio, 0);
|
||||
|
||||
close(out[1]);
|
||||
|
|
@ -524,9 +524,8 @@ static void handle_exec(const char *args, GHashTable *optlist,
|
|||
level = g_hash_table_lookup(optlist, "level");
|
||||
rec->level = level == NULL ? MSGLEVEL_CLIENTCRAP : level2bits(level, NULL);
|
||||
|
||||
rec->read_tag = g_input_add(rec->in, G_INPUT_READ,
|
||||
(GInputFunction) sig_exec_input_reader,
|
||||
rec);
|
||||
rec->read_tag =
|
||||
i_input_add(rec->in, I_INPUT_READ, (GInputFunction) sig_exec_input_reader, rec);
|
||||
processes = g_slist_append(processes, rec);
|
||||
|
||||
if (rec->target == NULL && interactive)
|
||||
|
|
|
|||
|
|
@ -774,7 +774,7 @@ static void sig_channel_joined(CHANNEL_REC *channel)
|
|||
}
|
||||
}
|
||||
|
||||
static void g_hash_free_value(void *key, void *value)
|
||||
static void i_hash_free_value(void *key, void *value)
|
||||
{
|
||||
g_free(value);
|
||||
}
|
||||
|
|
@ -825,7 +825,7 @@ void fe_messages_init(void)
|
|||
|
||||
void fe_messages_deinit(void)
|
||||
{
|
||||
g_hash_table_foreach(printnicks, (GHFunc) g_hash_free_value, NULL);
|
||||
g_hash_table_foreach(printnicks, (GHFunc) i_hash_free_value, NULL);
|
||||
g_hash_table_destroy(printnicks);
|
||||
|
||||
signal_remove("message public", (SIGNAL_FUNC) sig_message_public);
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ THEME_REC *theme_create(const char *path, const char *name)
|
|||
rec->name = g_strdup(name);
|
||||
rec->abstracts = g_hash_table_new((GHashFunc) g_str_hash,
|
||||
(GCompareFunc) g_str_equal);
|
||||
rec->modules = g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
rec->modules = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal);
|
||||
themes = g_slist_append(themes, rec);
|
||||
signal_emit("theme created", 1, rec);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ static void print_mode(MODE_REC *rec)
|
|||
|
||||
tmp = modes; modes = NULL;
|
||||
|
||||
nicks = gslist_to_string(rec->nicks, ", ");
|
||||
nicks = i_slist_to_string(rec->nicks, ", ");
|
||||
printformat(rec->channel->server, rec->channel->visible_name, rec->level,
|
||||
IRCTXT_CHANMODE_CHANGE, rec->channel->visible_name, rec->mode, nicks, "");
|
||||
g_free(nicks);
|
||||
|
|
|
|||
|
|
@ -176,8 +176,7 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channe
|
|||
|
||||
/* save nicks to string, clear now_channels and remove the same
|
||||
channels from old_channels list */
|
||||
channels = g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
channels = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal);
|
||||
for (tmp = server->netjoins; tmp != NULL; tmp = next) {
|
||||
NETJOIN_REC *rec = tmp->data;
|
||||
|
||||
|
|
@ -213,8 +212,7 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channe
|
|||
}
|
||||
|
||||
/* remove the channel from old_channels too */
|
||||
old = gslist_find_icase_string(rec->old_channels,
|
||||
realchannel);
|
||||
old = i_slist_find_icase_string(rec->old_channels, realchannel);
|
||||
if (old != NULL) {
|
||||
void *data = old->data;
|
||||
rec->old_channels =
|
||||
|
|
@ -341,7 +339,7 @@ static void msg_join(IRC_SERVER_REC *server, const char *channel,
|
|||
|
||||
/* if this was not a channel they split from, treat it normally */
|
||||
if (netjoin != NULL) {
|
||||
if (!gslist_find_icase_string(netjoin->old_channels, channel))
|
||||
if (!i_slist_find_icase_string(netjoin->old_channels, channel))
|
||||
return;
|
||||
} else {
|
||||
channels = split->channels;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static GSList *mask_add_once(GSList *list, const char *mask)
|
|||
str = ptr == NULL ? g_strdup(mask) :
|
||||
g_strndup(mask, (int) (ptr-mask));
|
||||
|
||||
if (gslist_find_icase_string(list, str) == NULL)
|
||||
if (i_slist_find_icase_string(list, str) == NULL)
|
||||
return g_slist_append(list, str);
|
||||
|
||||
g_free(str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue