Annotation of researchv9/X11/src/X.V11R1/lib/oldX/XDestAssoc.c, revision 1.1.1.1

1.1       root        1: #include "copyright.h"
                      2: 
                      3: /* $Header: XDestAssoc.c,v 10.15 87/09/11 07:56:38 toddb Exp $ */
                      4: /* Copyright    Massachusetts Institute of Technology    1985  */
                      5: 
                      6: #include "Xlibint.h"
                      7: #include "X10.h"
                      8: 
                      9: /*
                     10:  * XDestroyAssocTable - Destroy (free the memory associated with)
                     11:  * an XAssocTable.  
                     12:  */
                     13: XDestroyAssocTable(table)
                     14:        register XAssocTable *table;
                     15: {
                     16:        register int i;
                     17:        register XAssoc *bucket;
                     18:        register XAssoc *Entry, *entry_next;
                     19: 
                     20:        /* Free the buckets. */
                     21:        for (i = 0; i < table->size; i++) {
                     22:                bucket = &table->buckets[i];
                     23:                for (
                     24:                        Entry = bucket->next;
                     25:                        Entry != bucket;
                     26:                        Entry = entry_next
                     27:                ) {
                     28:                        entry_next = Entry->next;
                     29:                        Xfree((char *)Entry);
                     30:                }
                     31:        }
                     32: 
                     33:        /* Free the bucket array. */
                     34:        Xfree((char *)table->buckets);
                     35: 
                     36:        /* Free the table. */
                     37:        Xfree((char *)table);
                     38: }
                     39: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.