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.31 by root, Fri Sep 4 15:40:12 2009 UTC vs.
Revision 1.33 by sf-exg, Mon Jul 26 09:57:53 2010 UTC

52 * A1 = 0; 52 * A1 = 0;
53 * Ai+1 = N1 + N2 + ... + Ni. 53 * Ai+1 = N1 + N2 + ... + Ni.
54 * it is computed from hash_budget_size[]: 54 * it is computed from hash_budget_size[]:
55 * index: 0 I1 I2 I3 In 55 * index: 0 I1 I2 I3 In
56 * value: 0...0, N1, 0...0, N2, 0...0, N3, ..., Nn, 0...0 56 * value: 0...0, N1, 0...0, N2, 0...0, N3, ..., Nn, 0...0
57 * 0...0, 0.......0, N1.....N1, N1+N2...N1+N2, ... (the compution of hash[]) 57 * 0...0, 0.......0, N1.....N1, N1+N2...N1+N2, ... (the computation of hash[])
58 * or we can say 58 * or we can say
59 * hash_budget_size[Ii] = Ni; hash_budget_size[elsewhere] = 0, 59 * hash_budget_size[Ii] = Ni; hash_budget_size[elsewhere] = 0,
60 * where 60 * where
61 * set {I1, I2, ..., In} = { hashkey of keymap[0]->keysym, ..., keymap[keymap.size-1]->keysym } 61 * set {I1, I2, ..., In} = { hashkey of keymap[0]->keysym, ..., keymap[keymap.size-1]->keysym }
62 * where hashkey of keymap[i]->keysym = keymap[i]->keysym & KEYSYM_HASH_MASK 62 * where hashkey of keymap[i]->keysym = keymap[i]->keysym & KEYSYM_HASH_MASK
148 int ca = rxvt_popcount (a->state /* & OtherModMask */); 148 int ca = rxvt_popcount (a->state /* & OtherModMask */);
149 int cb = rxvt_popcount (b->state /* & OtherModMask */); 149 int cb = rxvt_popcount (b->state /* & OtherModMask */);
150 150
151 if (ca != cb) 151 if (ca != cb)
152 return ca - cb; 152 return ca - cb;
153//else if (a->state != b->state) // this behavior is to be disscussed 153//else if (a->state != b->state) // this behavior is to be discussed
154// return b->state - a->state; 154// return b->state - a->state;
155 else 155 else
156 return b->range - a->range; 156 return b->range - a->range;
157} 157}
158 158
426 ++hash_budget_counter [hashkey]; 426 ++hash_budget_counter [hashkey];
427 } 427 }
428 428
429 keymap.swap (sorted_keymap); 429 keymap.swap (sorted_keymap);
430 430
431#ifdef DEBUG_STRICT 431#ifndef NDEBUG
432 // check for invariants 432 // check for invariants
433 for (i = 0; i < KEYSYM_HASH_BUDGETS; ++i) 433 for (i = 0; i < KEYSYM_HASH_BUDGETS; ++i)
434 { 434 {
435 index = hash[i]; 435 index = hash[i];
436 for (int j = 0; j < hash_budget_size [i]; ++j) 436 for (int j = 0; j < hash_budget_size [i]; ++j)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines