annotate oldXMenu/XDestAssoc.c @ 32988:c3435dc00ed7

* lisp.h (KEYMAPP): New macro. (get_keymap): Remove. (get_keymap_1): Rename get_keymap. * keyboard.h (get_keymap_1, Fkeymapp): Remove prototype. * xterm.c (note_mode_line_highlight): Use KEYMAPP. * xmenu.c (single_submenu): Use KEYMAPP. (Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp. Use KEYMAPP rather than Fkeymapp. * w32term.c (note_mode_line_highlight): Use KEYMAPP. * w32menu.c (True, False): Remove (use TRUE and FALSE instead). (Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp. Use KEYMAPP rather than Fkeymapp. (single_submenu): Use KEYMAPP. (w32_menu_show, w32_dialog_show): Use TRUE. * minibuf.c (Fread_from_minibuffer): Update call to get_keymap. * keymap.c (KEYMAPP): Remove (moved to lisp.h). (Fkeymapp): Use KEYMAPP. (get_keymap): Rename from get_keymap_1. Remove old def. Return t when autoload=0 and error=0 and the keymap needs autoloading. (Fcopy_keymap): Check (eq (car x) 'keymap) rather than using Fkeymapp. (Fminor_mode_key_binding): Don't raise an error if the binding is not a keymap. (Fuse_global_map, Fuse_local_map): Allow autoloading. (Faccessible_keymaps): Fetch keymaps rather than checking Fkeymapp. * keyboard.c (read_char): get_keymap_1 -> get_keymap. Allow Vspecial_event_map to be autoloaded. (menu_bar_items): Fetch the keymap rather than using keymapp. (menu_bar_one_keymap): No need to follow func-indirect any more. (parse_menu_item): get_keymap_1 -> get_keymap. (tool_bar_items): Fetch the keymap rather than using keymapp. (read_key_sequence): Use KEYMAPP. * intervals.c (get_local_map): Use get_keymap rather than following function-indirections explicitly. * doc.c (Fsubstitute_command_keys): get_keymap_1 -> get_keymap.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 27 Oct 2000 22:20:19 +0000
parents bbce331da1be
children 23a1cea22d13
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
1 /* $XConsortium: XDestAssoc.c,v 10.17 91/02/08 13:11:50 rws Exp $ */
Dave Love <fx@gnu.org>
parents:
diff changeset
2 /* Copyright Massachusetts Institute of Technology 1985 */
Dave Love <fx@gnu.org>
parents:
diff changeset
3
Dave Love <fx@gnu.org>
parents:
diff changeset
4 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
5 Permission to use, copy, modify, distribute, and sell this software and its
Dave Love <fx@gnu.org>
parents:
diff changeset
6 documentation for any purpose is hereby granted without fee, provided that
Dave Love <fx@gnu.org>
parents:
diff changeset
7 the above copyright notice appear in all copies and that both that
Dave Love <fx@gnu.org>
parents:
diff changeset
8 copyright notice and this permission notice appear in supporting
Dave Love <fx@gnu.org>
parents:
diff changeset
9 documentation, and that the name of M.I.T. not be used in advertising or
Dave Love <fx@gnu.org>
parents:
diff changeset
10 publicity pertaining to distribution of the software without specific,
Dave Love <fx@gnu.org>
parents:
diff changeset
11 written prior permission. M.I.T. makes no representations about the
Dave Love <fx@gnu.org>
parents:
diff changeset
12 suitability of this software for any purpose. It is provided "as is"
Dave Love <fx@gnu.org>
parents:
diff changeset
13 without express or implied warranty.
Dave Love <fx@gnu.org>
parents:
diff changeset
14 */
Dave Love <fx@gnu.org>
parents:
diff changeset
15
Dave Love <fx@gnu.org>
parents:
diff changeset
16 #include <X11/Xlib.h>
Dave Love <fx@gnu.org>
parents:
diff changeset
17 #include "X10.h"
Dave Love <fx@gnu.org>
parents:
diff changeset
18
Dave Love <fx@gnu.org>
parents:
diff changeset
19 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
20 * XDestroyAssocTable - Destroy (free the memory associated with)
Dave Love <fx@gnu.org>
parents:
diff changeset
21 * an XAssocTable.
Dave Love <fx@gnu.org>
parents:
diff changeset
22 */
Dave Love <fx@gnu.org>
parents:
diff changeset
23 XDestroyAssocTable(table)
Dave Love <fx@gnu.org>
parents:
diff changeset
24 register XAssocTable *table;
Dave Love <fx@gnu.org>
parents:
diff changeset
25 {
Dave Love <fx@gnu.org>
parents:
diff changeset
26 register int i;
Dave Love <fx@gnu.org>
parents:
diff changeset
27 register XAssoc *bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
28 register XAssoc *Entry, *entry_next;
Dave Love <fx@gnu.org>
parents:
diff changeset
29
Dave Love <fx@gnu.org>
parents:
diff changeset
30 /* Free the buckets. */
Dave Love <fx@gnu.org>
parents:
diff changeset
31 for (i = 0; i < table->size; i++) {
Dave Love <fx@gnu.org>
parents:
diff changeset
32 bucket = &table->buckets[i];
Dave Love <fx@gnu.org>
parents:
diff changeset
33 for (
Dave Love <fx@gnu.org>
parents:
diff changeset
34 Entry = bucket->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
35 Entry != bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
36 Entry = entry_next
Dave Love <fx@gnu.org>
parents:
diff changeset
37 ) {
Dave Love <fx@gnu.org>
parents:
diff changeset
38 entry_next = Entry->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
39 free((char *)Entry);
Dave Love <fx@gnu.org>
parents:
diff changeset
40 }
Dave Love <fx@gnu.org>
parents:
diff changeset
41 }
Dave Love <fx@gnu.org>
parents:
diff changeset
42
Dave Love <fx@gnu.org>
parents:
diff changeset
43 /* Free the bucket array. */
Dave Love <fx@gnu.org>
parents:
diff changeset
44 free((char *)table->buckets);
Dave Love <fx@gnu.org>
parents:
diff changeset
45
Dave Love <fx@gnu.org>
parents:
diff changeset
46 /* Free the table. */
Dave Love <fx@gnu.org>
parents:
diff changeset
47 free((char *)table);
Dave Love <fx@gnu.org>
parents:
diff changeset
48 }
Dave Love <fx@gnu.org>
parents:
diff changeset
49