# # old_revision [8560411a346db747adaad2941cb437284f63c8de] # # patch "finch/libgnt/gntmain.c" # from [458de173984ff771ca86afc56b8a6da0230cbe82] # to [22e41070c04d354349a4a72750644d0561e8c7a9] # ============================================================ --- finch/libgnt/gntmain.c 458de173984ff771ca86afc56b8a6da0230cbe82 +++ finch/libgnt/gntmain.c 22e41070c04d354349a4a72750644d0561e8c7a9 @@ -222,6 +222,7 @@ io_invoke(GIOChannel *source, GIOConditi { char keys[256]; int rd; + gsize red; char *k; char *cvrt = NULL; @@ -250,7 +251,7 @@ io_invoke(GIOChannel *source, GIOConditi keys[rd] = 0; gnt_wm_set_event_stack(wm, TRUE); - cvrt = g_locale_to_utf8(keys, rd, (gsize*)&rd, NULL, NULL); + cvrt = g_locale_to_utf8(keys, rd, &red, NULL, NULL); k = cvrt ? cvrt : keys; if (mouse_enabled && detect_mouse_action(k)) goto end; @@ -266,11 +267,11 @@ io_invoke(GIOChannel *source, GIOConditi } #endif - while (rd) { + while (red) { char back; int p; - if (k[0] == '\033' && rd == 1) { + if (k[0] == '\033' && red == 1) { if (escape_stuff.timer) { gnt_wm_process_input(wm, "\033\033"); g_source_remove(escape_stuff.timer); @@ -287,7 +288,7 @@ io_invoke(GIOChannel *source, GIOConditi k[p] = '\0'; gnt_wm_process_input(wm, k); /* XXX: */ k[p] = back; - rd -= p; + red -= p; k += p; } end: