Lines Matching defs:table

47  * When allocating or reallocating the key-binding table, how
53 * Define the size of the hash table that is used to associate action
59 * Define a binary-symbol-table object.
63 int size; /* The allocated dimension of table[] */
64 int nkey; /* The current number of members in the table */
65 KeySym *table; /* The table of lexically sorted key sequences */
66 HashTable *actions; /* The hash table of actions */
83 * Create a new key-binding symbol table.
107 kt->table = NULL;
117 * Allocate the table.
119 kt->table = (KeySym *) malloc(sizeof(kt->table[0]) * kt->size);
120 if(!kt->table) {
125 * Allocate a hash table of actions.
151 if(kt->table)
152 free(kt->table);
162 * Increase the size of the table to accomodate more keys.
165 * kt KeyTab * The table to be extended.
173 * Attempt to increase the size of the table.
175 KeySym *newtab = (KeySym *) realloc(kt->table, sizeof(kt->table[0]) *
181 _err_record_msg(kt->err, "Can't extend keybinding table", END_ERR_MSG);
186 * Install the resized table.
188 kt->table = newtab;
194 * Add, update or remove a keybinding to the table.
197 * kt KeyTab * The table to add the binding to.
239 * Record the action in the table.
245 * Add, update or remove a keybinding to the table, specifying an action
249 * kt KeyTab * The table to add the binding to.
266 int first,last; /* The first and last entries in the table which */
304 * Lookup the position in the table at which to insert the binding.
308 * If an exact match for the key-sequence is already in the table,
314 _kt_assign_action(kt->table + first, binder, keyfn, data);
316 _del_StringMemString(kt->smem, kt->table[first].keyseq);
317 memmove(kt->table + first, kt->table + first + 1,
318 (kt->nkey - first - 1) * sizeof(kt->table[0]));
348 * We will need a new entry, extend the table if needed.
360 memmove(kt->table + last + 1, kt->table + last,
361 (kt->nkey - last) * sizeof(kt->table[0]));
366 sym = kt->table + last;
391 * kt KeyTab * The keybinding table to lookup in.
411 int mid; /* The index at which to bisect the table */
412 int bot; /* The lowest index of the table not searched yet */
413 int top; /* The highest index of the table not searched yet */
422 test = _kt_compare_strings(kt->table[mid].keyseq, kt->table[mid].nc,
444 if(*last < kt->nkey && kt->table[*last].nc > nc &&
445 _kt_compare_strings(kt->table[*last].keyseq, nc, binary_keyseq, nc)==0) {
447 while(*last+1 < kt->nkey && kt->table[*last+1].nc > nc &&
448 _kt_compare_strings(kt->table[*last+1].keyseq, nc, binary_keyseq, nc)==0)
463 * kt KeyTab * The keybinding table to lookup in.
487 /* in the symbol table. */
498 * Lookup the indexes of the binding-table entries that bracket the
504 * table entries.
509 *matches = kt->table + first;
653 * kt KeyTab * The key-binding table.
665 Symbol *sym; /* The symbol table entry of the action */
743 * Assign a given action function to a binding table entry.
746 * sym KeySym * The binding table entry to be modified.
787 * kt KeyTab * The table of key bindings.
792 int oldkey; /* The index of a key in the original binding table */
793 int newkey; /* The index of a key in the updated binding table */
795 * If there is no table, then no bindings exist to be deleted.
803 _kt_assign_action(kt->table + oldkey, binder, 0, NULL);
809 KeySym *sym = kt->table + oldkey;
814 kt->table[newkey] = *sym;
933 * kt KeyTab * The table of key bindings.
968 * kt KeyTab * The table of key bindings.
984 Symbol *sym; /* The symbol table entry of the action */
995 * Lookup the symbol table entry of the action.
1016 * kt KeyTab * The table of key bindings.