/[m4]/m4/m4/hash.c
ViewVC logotype

Diff of /m4/m4/hash.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by gary, Sun Sep 30 14:43:38 2001 UTC revision 1.5 by gary, Sun Sep 30 22:26:57 2001 UTC
# Line 271  m4_hash_remove (m4_hash *hash, const voi Line 271  m4_hash_remove (m4_hash *hash, const voi
271    
272  /* Return the address of the value field of the first node in  /* Return the address of the value field of the first node in
273     HASH that has a matching KEY.  The address is returned so that     HASH that has a matching KEY.  The address is returned so that
274     an explicit 0 value can be distinguihed from a failed lookup     an explicit 0 value can be distinguished from a failed lookup
275     (also 0).  */     (also 0).  Fortuitously for M4, this also means that the value
276       field can be changed `in situ' to implement a value stack.  */
277  void **  void **
278  m4_hash_lookup (m4_hash *hash, const void *key)  m4_hash_lookup (m4_hash *hash, const void *key)
279  {  {
# Line 363  m4_hash_bucket_insert (m4_hash *hash, m4 Line 364  m4_hash_bucket_insert (m4_hash *hash, m4
364    while (bucket);    while (bucket);
365  }  }
366    
367    void
368    m4_hash_exit (void)
369    {
370      while (m4_hash_node_free_list)
371        {
372          m4_hash_node *stale = m4_hash_node_free_list;
373          m4_hash_node_free_list = M4_HASH_NODE_NEXT (stale);
374          xfree (stale);
375        }
376    }
377    
378    
379    
380  struct m4_hash_iterator  struct m4_hash_iterator

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26