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.54 by sf-exg, Sat Dec 3 11:31:56 2011 UTC vs.
Revision 1.56 by sf-exg, Mon Dec 5 12:22:50 2011 UTC

112{ 112{
113 char *translation = rxvt_wcstoutf8 (ws); 113 char *translation = rxvt_wcstoutf8 (ws);
114 114
115 keysym_t *key = new keysym_t; 115 keysym_t *key = new keysym_t;
116 116
117 if (key && translation)
118 {
119 key->keysym = keysym; 117 key->keysym = keysym;
120 key->state = state; 118 key->state = state;
121 key->str = translation; 119 key->str = translation;
122 key->type = keysym_t::STRING; 120 key->type = keysym_t::STRING;
123 121
124 if (strncmp (translation, "builtin:", 8) == 0) 122 if (strncmp (translation, "builtin:", 8) == 0)
125 key->type = keysym_t::BUILTIN; 123 key->type = keysym_t::BUILTIN;
126 124
127 if (keymap.size () == keymap.capacity ()) 125 if (keymap.size () == keymap.capacity ())
128 keymap.reserve (keymap.size () * 2); 126 keymap.reserve (keymap.size () * 2);
129 127
130 keymap.push_back (key); 128 keymap.push_back (key);
131 hash[0] = 3; 129 hash[0] = 3;
132 }
133 else
134 {
135 delete key;
136 free (translation);
137 rxvt_fatal ("memory allocation failure. aborting.\n");
138 }
139} 130}
140 131
141bool 132bool
142keyboard_manager::dispatch (rxvt_term *term, KeySym keysym, unsigned int state) 133keyboard_manager::dispatch (rxvt_term *term, KeySym keysym, unsigned int state)
143{ 134{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines