/[hurd]/hurd-l4/libhurd-ihash/ihash.h
ViewVC logotype

Diff of /hurd-l4/libhurd-ihash/ihash.h

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

revision 1.4 by marcus, Sun Aug 17 04:18:38 2003 UTC revision 1.5 by marcus, Sun Aug 17 05:14:48 2003 UTC
# Line 50  typedef hurd_ihash_value_t *hurd_ihash_l Line 50  typedef hurd_ihash_value_t *hurd_ihash_l
50    
51  /* The type of the cleanup function, which is called for every value  /* The type of the cleanup function, which is called for every value
52     removed from the hash table.  */     removed from the hash table.  */
53  typedef void *(*hurd_ihash_cleanup_t) (hurd_ihash_value_t value, void *arg);  typedef void (*hurd_ihash_cleanup_t) (hurd_ihash_value_t value, void *arg);
54    
55    
56  struct hurd_ihash  struct hurd_ihash
# Line 145  hurd_ihash_value_t hurd_ihash_find (hurd Line 145  hurd_ihash_value_t hurd_ihash_find (hurd
145     value of the current element is available via the macro     value of the current element is available via the macro
146     HURD_IHASH_ITERATOR_VALUE.  */     HURD_IHASH_ITERATOR_VALUE.  */
147  #define HURD_IHASH_ITERATE(ht, value)                                   \  #define HURD_IHASH_ITERATE(ht, value)                                   \
148    for (hurd_ihash_value_t value = (ht)->table[0],                       \    for (hurd_ihash_value_t value = (ht)->size ? (ht)->table[0] : 0,      \
149                            *_hurd_ihash_valuep = &(ht)->table[0];        \           *_hurd_ihash_valuep = (ht)->size ? &(ht)->table[0] : 0;        \
150         _hurd_ihash_valuep - &(ht)->table[0] < (ht)->size                \         (ht)->size && _hurd_ihash_valuep - &(ht)->table[0] < (ht)->size  \
151           && (value = *_hurd_ihash_valuep, 1);                           \           && (value = *_hurd_ihash_valuep, 1);                           \
152         _hurd_ihash_valuep++)                                            \         _hurd_ihash_valuep++)                                            \
153      if (value != _HURD_IHASH_EMPTY && value != _HURD_IHASH_DELETED)      if (value != _HURD_IHASH_EMPTY && value != _HURD_IHASH_DELETED)

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