annotate oldXMenu/XDestAssoc.c @ 67171:35b9e081ceed

Remove useless leading * in defcustom docstrings. (save-completions-file-name): Use ~/.emacs.d if available. (completion-standard-syntax-table): Rename from cmpl-standard-syntax-table and fold initialization into declaration, thus removing cmpl-make-standard-completion-syntax-table. (completion-lisp-syntax-table, completion-c-syntax-table) (completion-fortran-syntax-table, completion-c-def-syntax-table): Idem. (cmpl-saved-syntax, cmpl-saved-point): Remove. (symbol-under-point, symbol-before-point) (symbol-under-or-before-point, symbol-before-point-for-complete) (add-completions-from-c-buffer): Use with-syntax-table. (make-completion): Don't return a list of completion entries. Update callers. (cmpl-prefix-entry-head, cmpl-prefix-entry-tail): Use defalias. (completion-initialize): Rename from initialize-completions. (completion-find-file-hook): Rename from cmpl-find-file-hook. (kill-emacs-save-completions): Collect stats here. (save-completions-to-file, load-completions-from-file): Use with-current-buffer. (completion-def-wrapper): Rename from def-completion-wrapper. Make it into a function. Move all calls to toplevel. (completion-lisp-mode-hook): New fun. (completion-c-mode-hook, completion-setup-fortran-mode): Set the syntax-table here. Use local-set-key. (completion-saved-bindings): New var. (dynamic-completion-mode): Make it into a proper minor mode. (load-completions-from-file): Remove unused var `num-uses'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 28 Nov 2005 01:43:28 +0000
parents 3861ff8f4bf1
children e8a3fb527b77 2d92f5c9d6ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
1 /* Copyright Massachusetts Institute of Technology 1985 */
65000
3861ff8f4bf1 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 54770
diff changeset
2 /* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. */
25858
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)
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 25858
diff changeset
21 * an XAssocTable.
25858
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
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
50 /* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
51 (do not change this comment) */