ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/keyboard.C
(Generate patch)

Comparing rxvt-unicode/src/keyboard.C (file contents):
Revision 1.18 by root, Mon Jan 2 21:17:01 2006 UTC vs.
Revision 1.19 by root, Wed Jan 4 04:42:45 2006 UTC

72 72
73static void 73static void
74output_string (rxvt_term *rt, const char *str) 74output_string (rxvt_term *rt, const char *str)
75{ 75{
76 if (strncmp (str, "command:", 8) == 0) 76 if (strncmp (str, "command:", 8) == 0)
77 rt->cmd_write ((unsigned char *)str + 8, strlen (str) - 8); 77 rt->cmd_write (str + 8, strlen (str) - 8);
78 else if (strncmp (str, "perl:", 5) == 0) 78 else if (strncmp (str, "perl:", 5) == 0)
79 PERL_INVOKE((rt, HOOK_KEYBOARD_COMMAND, DT_STRING, str + 5, DT_END)); 79 PERL_INVOKE((rt, HOOK_KEYBOARD_COMMAND, DT_STRING, str + 5, DT_END));
80 else 80 else
81 rt->tt_write ((unsigned char *)str, strlen (str)); 81 rt->tt_write (str, strlen (str));
82} 82}
83 83
84static void 84static void
85output_string_meta8 (rxvt_term *rt, unsigned int state, char *buf, int buflen) 85output_string_meta8 (rxvt_term *rt, unsigned int state, char *buf, int buflen)
86{ 86{
93 *ch |= 0x80; 93 *ch |= 0x80;
94 } 94 }
95 else if (rt->meta_char == C0_ESC) /* escape prefix */ 95 else if (rt->meta_char == C0_ESC) /* escape prefix */
96#endif 96#endif
97 { 97 {
98 const unsigned char ch = C0_ESC; 98 const char ch = C0_ESC;
99 rt->tt_write (&ch, 1); 99 rt->tt_write (&ch, 1);
100 } 100 }
101 } 101 }
102 102
103 rt->tt_write ((unsigned char *) buf, buflen); 103 rt->tt_write (buf, buflen);
104} 104}
105 105
106static int 106static int
107format_keyrange_string (const char *str, int keysym_offset, char *buf, int bufsize) 107format_keyrange_string (const char *str, int keysym_offset, char *buf, int bufsize)
108{ 108{
192void 192void
193keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, const char *trans) 193keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, const char *trans)
194{ 194{
195 keysym_t *key = new keysym_t; 195 keysym_t *key = new keysym_t;
196 wchar_t *wc = rxvt_mbstowcs (trans); 196 wchar_t *wc = rxvt_mbstowcs (trans);
197 const char *translation = rxvt_wcstoutf8 (wc); 197 char *translation = rxvt_wcstoutf8 (wc);
198 free (wc); 198 free (wc);
199 199
200 if (key && translation) 200 if (key && translation)
201 { 201 {
202 key->keysym = keysym; 202 key->keysym = keysym;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines