-/* ---F+------------------------------------------------------------------ *\
- Function : printKeyTab
- Called by : kb_keymap::print
- Purpose : print the keysyms found in the given key table. RVDK_PATCH_5
- Parameters: tabPt - keytable pointer
- buf - string where the result goes
- maxLen - length of string (including '\0')
- Returns : length of printed string.
-\* ---F------------------------------------------------------------------- */
-
-static
-void printKeyTab(kb_key * tabPt, string & buf)
-{
- unsigned int ksym, mod;
-
- /* -------> Print each of the slots into buf. */
- for( ; (tabPt->code & 0xffff) != NoSymbol; ++tabPt) {
- ksym = tabPt->code;
- mod = tabPt->mod & 0xffff;
-
- printKeysym(ksym, mod, buf);
- buf += ' ';
- }
-}
-
-
-// === kb_sequence methods ================================================
-
-/* ---F+------------------------------------------------------------------ *\
- Function : kb_sequence::addkey
- Called by : [user]
- Purpose : add a key to the sequence, look up in map and return action
- Parameters: key - keysym of key
- mod - modifier mask
- nmod - modifier veto mask (unused now)
- Returns : action or -1 if error (no map defined or key not found)
-\* ---F------------------------------------------------------------------- */
-
-int kb_sequence::addkey(KeySym key,
- unsigned int mod, unsigned int nmod /*= 0*/)
-{
- if(length < 0) length = 0;
-
- if(length + 1 >= size) {
- unsigned int * nseq = new unsigned int[size + KB_PREALLOC];
- size += KB_PREALLOC;
- memcpy(nseq, sequence, length * sizeof(unsigned int));
- if(sequence != staticseq) delete sequence;
- sequence = nseq;
- nseq = new unsigned int[size];
- memcpy(nseq, modifiers, length * sizeof(unsigned int));
- if(modifiers != staticmod) delete modifiers;
- modifiers = nseq;