summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh2
-rw-r--r--src/core/modules-load.c6
-rw-r--r--src/core/net-nonblock.c6
-rw-r--r--src/core/network.c2
-rw-r--r--src/core/servers.c8
-rw-r--r--src/fe-common/core/fe-exec.c2
-rw-r--r--src/fe-common/core/keyboard.c22
7 files changed, 31 insertions, 17 deletions
diff --git a/autogen.sh b/autogen.sh
index b8d7c002..bdd16590 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,7 +32,7 @@ if type lynx >/dev/null 2>&1 ; then
elif type elinks >/dev/null 2>&1 ; then
elinks -dump docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
else
- echo "**Error**: No lynx or links present"
+ echo "**Error**: No lynx or elinks present"
exit 1
fi
diff --git a/src/core/modules-load.c b/src/core/modules-load.c
index 9b9bc952..8e65ecd4 100644
--- a/src/core/modules-load.c
+++ b/src/core/modules-load.c
@@ -184,9 +184,6 @@ static int module_load_name(const char *path, const char *rootmodule,
g_free(initfunc);
g_free(deinitfunc);
- module_init = value1;
- module_deinit = value2;
-
if (!found) {
module_error(MODULE_ERROR_INVALID, NULL,
rootmodule, submodule);
@@ -194,6 +191,9 @@ static int module_load_name(const char *path, const char *rootmodule,
return 0;
}
+ module_init = value1;
+ module_deinit = value2;
+
/* Call the module's init() function - it should register itself
with module_register() function, abort if it doesn't. */
module_init();
diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c
index 461b2b87..e637e673 100644
--- a/src/core/net-nonblock.c
+++ b/src/core/net-nonblock.c
@@ -214,7 +214,7 @@ static void simple_init(SIMPLE_THREAD_REC *rec, GIOChannel *handle)
if (net_geterror(handle) != 0) {
/* failed */
- g_io_channel_close(handle);
+ g_io_channel_shutdown(handle, TRUE, NULL);
g_io_channel_unref(handle);
handle = NULL;
}
@@ -236,9 +236,9 @@ static void simple_readpipe(SIMPLE_THREAD_REC *rec, GIOChannel *pipe)
net_gethostbyname_return(pipe, &iprec);
g_free_not_null(iprec.errorstr);
- g_io_channel_close(rec->pipes[0]);
+ g_io_channel_shutdown(rec->pipes[0], TRUE, NULL);
g_io_channel_unref(rec->pipes[0]);
- g_io_channel_close(rec->pipes[1]);
+ g_io_channel_shutdown(rec->pipes[1], TRUE, NULL);
g_io_channel_unref(rec->pipes[1]);
ip = iprec.ip4.family != 0 ? &iprec.ip4 : &iprec.ip6;
diff --git a/src/core/network.c b/src/core/network.c
index 5954d1fe..de5abbbe 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -260,7 +260,7 @@ void net_disconnect(GIOChannel *handle)
{
g_return_if_fail(handle != NULL);
- g_io_channel_close(handle);
+ g_io_channel_shutdown(handle, TRUE, NULL);
g_io_channel_unref(handle);
}
diff --git a/src/core/servers.c b/src/core/servers.c
index 4dac2b83..06f82d4d 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -56,9 +56,9 @@ void server_connect_failed(SERVER_REC *server, const char *msg)
}
if (server->connect_pipe[0] != NULL) {
- g_io_channel_close(server->connect_pipe[0]);
+ g_io_channel_shutdown(server->connect_pipe[0], TRUE, NULL);
g_io_channel_unref(server->connect_pipe[0]);
- g_io_channel_close(server->connect_pipe[1]);
+ g_io_channel_shutdown(server->connect_pipe[1], TRUE, NULL);
g_io_channel_unref(server->connect_pipe[1]);
server->connect_pipe[0] = NULL;
server->connect_pipe[1] = NULL;
@@ -274,9 +274,9 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
net_gethostbyname_return(server->connect_pipe[0], &iprec);
- g_io_channel_close(server->connect_pipe[0]);
+ g_io_channel_shutdown(server->connect_pipe[0], TRUE, NULL);
g_io_channel_unref(server->connect_pipe[0]);
- g_io_channel_close(server->connect_pipe[1]);
+ g_io_channel_shutdown(server->connect_pipe[1], TRUE, NULL);
g_io_channel_unref(server->connect_pipe[1]);
server->connect_pipe[0] = NULL;
diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c
index 5347e8d4..9249f432 100644
--- a/src/fe-common/core/fe-exec.c
+++ b/src/fe-common/core/fe-exec.c
@@ -185,7 +185,7 @@ static void process_destroy(PROCESS_REC *rec, int status)
exec_wi_destroy(rec->target_item);
line_split_free(rec->databuf);
- g_io_channel_close(rec->in);
+ g_io_channel_shutdown(rec->in, TRUE, NULL);
g_io_channel_unref(rec->in);
net_sendbuffer_destroy(rec->out, TRUE);
diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c
index 94c6bfd7..00454401 100644
--- a/src/fe-common/core/keyboard.c
+++ b/src/fe-common/core/keyboard.c
@@ -304,6 +304,20 @@ static int expand_key(const char *key, GSList **out)
/* possibly beginning of keycombo */
start = key;
last_hyphen = FALSE;
+ } else if (g_utf8_validate(key, -1, NULL)) {
+ /* Assume we are looking at the start of a
+ * multibyte sequence we will receive as-is,
+ * so add it to the list as-is.
+ */
+ const char *p, *end = g_utf8_next_char(key);
+ for (p = key; p != end; p++)
+ expand_out_char(*out, *p);
+ expand_out_char(*out, '-');
+ /* The for loop skips past the remaining character.
+ * Nasty, I know...
+ */
+ key = end - 1;
+ last_hyphen = FALSE;
} else {
expand_out_char(*out, *key);
expand_out_char(*out, '-');
@@ -360,8 +374,8 @@ static void key_states_rescan(void)
memset(used_keys, 0, sizeof(used_keys));
- g_tree_traverse(key_states, (GTraverseFunc) key_state_destroy,
- G_IN_ORDER, NULL);
+ g_tree_foreach(key_states, (GTraverseFunc) key_state_destroy,
+ NULL);
g_tree_destroy(key_states);
key_states = g_tree_new((GCompareFunc) strcmp);
@@ -870,8 +884,8 @@ void keyboard_deinit(void)
g_hash_table_destroy(keys);
g_hash_table_destroy(default_keys);
- g_tree_traverse(key_states, (GTraverseFunc) key_state_destroy,
- G_IN_ORDER, NULL);
+ g_tree_foreach(key_states, (GTraverseFunc) key_state_destroy,
+ NULL);
g_tree_destroy(key_states);
signal_remove("irssi init read settings", (SIGNAL_FUNC) read_keyboard_config);