mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Some signed/unsigned warnings removed. Don't call fe_exec_init/deinit in win32
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1104 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
348060073d
commit
1a3c700838
@ -180,7 +180,11 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip)
|
|||||||
sin_set_port(&so, port);
|
sin_set_port(&so, port);
|
||||||
ret = connect(handle, &so.sa, SIZEOF_SOCKADDR(so));
|
ret = connect(handle, &so.sa, SIZEOF_SOCKADDR(so));
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
if (ret < 0 && errno != EINPROGRESS) {
|
if (ret < 0 && errno != EINPROGRESS) {
|
||||||
|
#else
|
||||||
|
if (ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) {
|
||||||
|
#endif
|
||||||
close(handle);
|
close(handle);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -228,12 +228,12 @@ void nicklist_update_flags(SERVER_REC *server, const char *nick,
|
|||||||
|
|
||||||
rec->last_check = time(NULL);
|
rec->last_check = time(NULL);
|
||||||
|
|
||||||
if (gone != -1 && rec->gone != gone) {
|
if (gone != -1 && (int)rec->gone != gone) {
|
||||||
rec->gone = gone;
|
rec->gone = gone;
|
||||||
signal_emit("nick gone changed", 2, channel, rec);
|
signal_emit("nick gone changed", 2, channel, rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serverop != -1 && rec->serverop != serverop) {
|
if (serverop != -1 && (int)rec->serverop != serverop) {
|
||||||
rec->serverop = serverop;
|
rec->serverop = serverop;
|
||||||
signal_emit("nick serverop changed", 2, channel, rec);
|
signal_emit("nick serverop changed", 2, channel, rec);
|
||||||
}
|
}
|
||||||
|
@ -442,7 +442,8 @@ static CONFIG_REC *parse_configfile(const char *fname)
|
|||||||
char *real_fname;
|
char *real_fname;
|
||||||
|
|
||||||
real_fname = fname != NULL ? g_strdup(fname) :
|
real_fname = fname != NULL ? g_strdup(fname) :
|
||||||
g_strdup_printf("%s/.irssi/config", g_get_home_dir());
|
g_strdup_printf("%s"G_DIR_SEPARATOR_S".irssi"
|
||||||
|
G_DIR_SEPARATOR_S"config", g_get_home_dir());
|
||||||
config = config_open(real_fname, -1);
|
config = config_open(real_fname, -1);
|
||||||
|
|
||||||
if (config != NULL)
|
if (config != NULL)
|
||||||
@ -473,17 +474,16 @@ static void init_configfile(void)
|
|||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
str = g_strdup_printf("%s/.irssi", g_get_home_dir());
|
str = g_strdup_printf("%s"G_DIR_SEPARATOR_S".irssi", g_get_home_dir());
|
||||||
if (stat(str, &statbuf) != 0) {
|
if (stat(str, &statbuf) != 0) {
|
||||||
/* ~/.irssi not found, create it. */
|
/* ~/.irssi not found, create it. */
|
||||||
if (mkpath(str, 0700) != 0) {
|
if (mkpath(str, 0700) != 0) {
|
||||||
g_error(_("Couldn't create %s/.irssi directory"),
|
g_error(_("Couldn't create %s directory"), str);
|
||||||
g_get_home_dir());
|
|
||||||
}
|
}
|
||||||
} else if (!S_ISDIR(statbuf.st_mode)) {
|
} else if (!S_ISDIR(statbuf.st_mode)) {
|
||||||
g_error(_("%s/.irssi is not a directory.\n"
|
g_error(_("%s is not a directory.\n"
|
||||||
"You should remove it with command: rm ~/.irssi"),
|
"You should remove it with command: rm ~/.irssi"),
|
||||||
g_get_home_dir());
|
str);
|
||||||
}
|
}
|
||||||
g_free(str);
|
g_free(str);
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max)
|
|||||||
rec = g_new(LAST_MSG_REC, 1);
|
rec = g_new(LAST_MSG_REC, 1);
|
||||||
rec->nick = g_strdup(nick);
|
rec->nick = g_strdup(nick);
|
||||||
|
|
||||||
if (g_slist_length(*list) == max) {
|
if ((int)g_slist_length(*list) == max) {
|
||||||
*list = g_slist_remove(*list,
|
*list = g_slist_remove(*list,
|
||||||
g_slist_last(*list)->data);
|
g_slist_last(*list)->data);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,9 @@ void fe_common_core_init(void)
|
|||||||
keyboard_init();
|
keyboard_init();
|
||||||
printtext_init();
|
printtext_init();
|
||||||
formats_init();
|
formats_init();
|
||||||
|
#ifndef WIN32
|
||||||
fe_exec_init();
|
fe_exec_init();
|
||||||
|
#endif
|
||||||
fe_expandos_init();
|
fe_expandos_init();
|
||||||
fe_ignore_init();
|
fe_ignore_init();
|
||||||
fe_log_init();
|
fe_log_init();
|
||||||
@ -164,7 +166,9 @@ void fe_common_core_deinit(void)
|
|||||||
keyboard_deinit();
|
keyboard_deinit();
|
||||||
printtext_deinit();
|
printtext_deinit();
|
||||||
formats_deinit();
|
formats_deinit();
|
||||||
|
#ifndef WIN32
|
||||||
fe_exec_deinit();
|
fe_exec_deinit();
|
||||||
|
#endif
|
||||||
fe_expandos_deinit();
|
fe_expandos_deinit();
|
||||||
fe_ignore_deinit();
|
fe_ignore_deinit();
|
||||||
fe_log_deinit();
|
fe_log_deinit();
|
||||||
|
@ -372,7 +372,7 @@ static void key_transpose_characters(void)
|
|||||||
|
|
||||||
static void key_delete_character(void)
|
static void key_delete_character(void)
|
||||||
{
|
{
|
||||||
if (gui_entry_get_pos() < strlen(gui_entry_get_text())) {
|
if (gui_entry_get_pos() < (int)strlen(gui_entry_get_text())) {
|
||||||
gui_entry_move_pos(1);
|
gui_entry_move_pos(1);
|
||||||
gui_entry_erase(1);
|
gui_entry_erase(1);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ static void channel_send_query(IRC_SERVER_REC *server, int query)
|
|||||||
|
|
||||||
chans = rec->queries[query];
|
chans = rec->queries[query];
|
||||||
|
|
||||||
if (g_slist_length(rec->queries[query]) > server->max_query_chans) {
|
if ((int)g_slist_length(rec->queries[query]) > server->max_query_chans) {
|
||||||
GSList *lastchan;
|
GSList *lastchan;
|
||||||
|
|
||||||
lastchan = g_slist_nth(rec->queries[query], server->max_query_chans-1);
|
lastchan = g_slist_nth(rec->queries[query], server->max_query_chans-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user