annotate console/libgnt/gntkeys.c @ 14300:b8697618399a

[gaim-migrate @ 16990] oops, that was stupid. I blame the juicey goodness. Now that we actually properly set the protocol, it seems to work. I can send and receive messages back and forth between gaim on yahoo and windows live messenger. Messages I send seem to end up with </font>'s in them. Status updates also seem to work to some degree committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 23 Aug 2006 02:21:00 +0000
parents ae4cbed1b309
children 70623f0d5cdc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14091
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 #include "gntkeys.h"
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 #include <string.h>
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 void gnt_keys_refine(char *text)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 if (text[0] == 27)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 /* These are for urxvt */
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 if (strcmp(text + 1, "Oa") == 0)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 strcpy(text + 1, GNT_KEY_CTRL_UP);
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 else if (strcmp(text + 1, "Ob") == 0)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 strcpy(text + 1, GNT_KEY_CTRL_DOWN);
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 else if ((unsigned char)text[0] == 195)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 /* These for xterm */
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 if (text[2] == 0)
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 {
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24 text[0] = 27;
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 text[1] -= 64;
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 }
ae4cbed1b309 [gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29