1: #include <X/mit-copyright.h>
   2: 
   3: /* $Header: XDestAssoc.c,v 10.4 86/02/01 15:32:05 tony Rel $ */
   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;
  18: 
  19:     /* Free the buckets. */
  20:     for (i = 0; i < table->size; i++) {
  21:         bucket = &(*table->table)[i];
  22:         for (
  23:                 entry = bucket->next;
  24:             entry != bucket;
  25:             entry = entry->next
  26:         ) {
  27:             free(entry);
  28:         }
  29:     }
  30: 
  31:     /* Free the bucket headers. */
  32:     free(table->table);
  33: 
  34:     /* Free the table. */
  35:     free(table);
  36: }

Defined functions

XDestroyAssocTable defined in line 12; used 1 times
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 795
Valid CSS Valid XHTML 1.0 Strict