Mercurial > pidgin
view console/libgnt/gntkeys.c @ 14939:06ae7ffc47e3
[gaim-migrate @ 17711]
This should prevent D-BUS from having to deal with any non-UTF-8
strings emitted by Gaim signals, which should therefore prevent its
early exit. Strings will be salvaged via gaim_utf8_salvage before
emission, and an error will be logged. IRC (and any other protocols
spitting out invalid UTF-8 to signals) should yet be fixed to emit
some sort of binary blob, rather than a UTF-8 string, but this will
make D-BUS robust to any future transgressions.
This is completely untested.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Thu, 09 Nov 2006 16:35:06 +0000 |
parents | c01f62c83647 |
children | 99112cd4a2f4 |
line wrap: on
line source
#include "gntkeys.h" #include <stdlib.h> #include <string.h> const char *term; void gnt_keys_refine(char *text) { if (*text == 27 && *(text + 1) == '[' && *(text + 3) == '\0' && (*(text + 2) >= 'A' || *(text + 2) <= 'D')) { if (term == NULL) term = getenv("TERM"); /* Apparently this is necessary for urxvt and screen */ if (strcmp(term, "screen") == 0 || strcmp(term, "rxvt-unicode") == 0) *(text + 1) = 'O'; } }