annotate oldXMenu/XDestAssoc.c @ 76134:7cdfa9a1f509

*** empty log message ***
author Glenn Morris <rgm@gnu.org>
date Sun, 25 Feb 2007 00:14:19 +0000
parents 995b45abe69d
children fec5e03aaf59 dd7c098af727
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 */
74548
ce127a46b1ca Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68640
diff changeset
2 /* Copyright (C) 2001, 2002, 2003, 2004, 2005,
75348
3d45362f1d38 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74548
diff changeset
3 2006, 2007 Free Software Foundation, Inc. */
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
4
76133
995b45abe69d Remove license text in favour of including copyright.h, as was done in
Glenn Morris <rgm@gnu.org>
parents: 75348
diff changeset
5 #include "copyright.h"
995b45abe69d Remove license text in favour of including copyright.h, as was done in
Glenn Morris <rgm@gnu.org>
parents: 75348
diff changeset
6
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
7
Dave Love <fx@gnu.org>
parents:
diff changeset
8 #include <X11/Xlib.h>
Dave Love <fx@gnu.org>
parents:
diff changeset
9 #include "X10.h"
Dave Love <fx@gnu.org>
parents:
diff changeset
10
Dave Love <fx@gnu.org>
parents:
diff changeset
11 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
12 * XDestroyAssocTable - Destroy (free the memory associated with)
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 25858
diff changeset
13 * an XAssocTable.
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
14 */
Dave Love <fx@gnu.org>
parents:
diff changeset
15 XDestroyAssocTable(table)
Dave Love <fx@gnu.org>
parents:
diff changeset
16 register XAssocTable *table;
Dave Love <fx@gnu.org>
parents:
diff changeset
17 {
Dave Love <fx@gnu.org>
parents:
diff changeset
18 register int i;
Dave Love <fx@gnu.org>
parents:
diff changeset
19 register XAssoc *bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
20 register XAssoc *Entry, *entry_next;
Dave Love <fx@gnu.org>
parents:
diff changeset
21
Dave Love <fx@gnu.org>
parents:
diff changeset
22 /* Free the buckets. */
Dave Love <fx@gnu.org>
parents:
diff changeset
23 for (i = 0; i < table->size; i++) {
Dave Love <fx@gnu.org>
parents:
diff changeset
24 bucket = &table->buckets[i];
Dave Love <fx@gnu.org>
parents:
diff changeset
25 for (
Dave Love <fx@gnu.org>
parents:
diff changeset
26 Entry = bucket->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
27 Entry != bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
28 Entry = entry_next
Dave Love <fx@gnu.org>
parents:
diff changeset
29 ) {
Dave Love <fx@gnu.org>
parents:
diff changeset
30 entry_next = Entry->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
31 free((char *)Entry);
Dave Love <fx@gnu.org>
parents:
diff changeset
32 }
Dave Love <fx@gnu.org>
parents:
diff changeset
33 }
Dave Love <fx@gnu.org>
parents:
diff changeset
34
Dave Love <fx@gnu.org>
parents:
diff changeset
35 /* Free the bucket array. */
Dave Love <fx@gnu.org>
parents:
diff changeset
36 free((char *)table->buckets);
Dave Love <fx@gnu.org>
parents:
diff changeset
37
Dave Love <fx@gnu.org>
parents:
diff changeset
38 /* Free the table. */
Dave Love <fx@gnu.org>
parents:
diff changeset
39 free((char *)table);
Dave Love <fx@gnu.org>
parents:
diff changeset
40 }
Dave Love <fx@gnu.org>
parents:
diff changeset
41
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
42 /* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
43 (do not change this comment) */