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.42 by sf-exg, Sat May 7 18:29:18 2011 UTC vs.
Revision 1.44 by sf-exg, Sun Nov 27 09:07:48 2011 UTC

78// return: priority_of_a - priority_of_b 78// return: priority_of_a - priority_of_b
79static int 79static int
80compare_priority (keysym_t *a, keysym_t *b) 80compare_priority (keysym_t *a, keysym_t *b)
81{ 81{
82 // (the more '1's in state; the less range): the greater priority 82 // (the more '1's in state; the less range): the greater priority
83 int ca = rxvt_popcount (a->state /* & OtherModMask */); 83 int ca = ecb_popcount32 (a->state /* & OtherModMask */);
84 int cb = rxvt_popcount (b->state /* & OtherModMask */); 84 int cb = ecb_popcount32 (b->state /* & OtherModMask */);
85 85
86 if (ca != cb) 86 if (ca != cb)
87 return ca - cb; 87 return ca - cb;
88//else if (a->state != b->state) // this behavior is to be discussed 88//else if (a->state != b->state) // this behavior is to be discussed
89// return b->state - a->state; 89// return b->state - a->state;
225 wchar_t *wc = rxvt_utf8towcs (key.str); 225 wchar_t *wc = rxvt_utf8towcs (key.str);
226 char *str = rxvt_wcstombs (wc); 226 char *str = rxvt_wcstombs (wc);
227 // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.) 227 // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.)
228 free (wc); 228 free (wc);
229 229
230 switch (key.type)
231 {
232 case keysym_t::STRING:
233 output_string (term, str); 230 output_string (term, str);
234 break;
235 }
236 231
237 free (str); 232 free (str);
238 233
239 return true; 234 return true;
240 } 235 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines