Mercurial > emacs
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 |
rev | line source |
---|---|
25858 | 1 /* Copyright Massachusetts Institute of Technology 1985 */ |
74548 | 2 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, |
75348 | 3 2006, 2007 Free Software Foundation, Inc. */ |
25858 | 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 | 7 |
8 #include <X11/Xlib.h> | |
9 #include "X10.h" | |
10 | |
11 /* | |
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 | 14 */ |
15 XDestroyAssocTable(table) | |
16 register XAssocTable *table; | |
17 { | |
18 register int i; | |
19 register XAssoc *bucket; | |
20 register XAssoc *Entry, *entry_next; | |
21 | |
22 /* Free the buckets. */ | |
23 for (i = 0; i < table->size; i++) { | |
24 bucket = &table->buckets[i]; | |
25 for ( | |
26 Entry = bucket->next; | |
27 Entry != bucket; | |
28 Entry = entry_next | |
29 ) { | |
30 entry_next = Entry->next; | |
31 free((char *)Entry); | |
32 } | |
33 } | |
34 | |
35 /* Free the bucket array. */ | |
36 free((char *)table->buckets); | |
37 | |
38 /* Free the table. */ | |
39 free((char *)table); | |
40 } | |
41 | |
52401 | 42 /* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf |
43 (do not change this comment) */ |