Annotation of 43BSDTahoe/new/X/Xlib/XDestAssoc.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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