1
0

bintree_iterator_next.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*********************** -*- Mode: C -*- ***********************
  2. * File : bintree_iterator_next.c
  3. *---------------------------------------------------------------
  4. * Description
  5. * ===========
  6. * This operation returns the next "clientnode" in an iteration.
  7. *
  8. * iter - the iterator instance to invoke this operation upon.
  9. *
  10. * RETURNS
  11. * "clientnode" instance or NULL if the iteration has reached the end of the
  12. * tree.
  13. *---------------------------------------------------------------
  14. * Author : Graeme McKerrell
  15. * Created On : Wed Jan 28 10:34:26 2004
  16. * Status : TESTED
  17. *---------------------------------------------------------------
  18. * HISTORY
  19. * 7-Dec-2004 Graeme McKerrell
  20. * Renamed to the "lub_" namespace
  21. * 5-May-2004 Graeme McKerrell
  22. * updates following review
  23. * 9-Feb-2004 Graeme McKerrell
  24. * updated to use new key structure
  25. * 28-Jan-2004 Graeme McKerrell
  26. * Initial version
  27. *---------------------------------------------------------------
  28. * Copyright (C) 2004 3Com Corporation. All Rights Reserved.
  29. **************************************************************** */
  30. #include "private.h"
  31. /*--------------------------------------------------------- */
  32. void *lub_bintree_iterator_next(lub_bintree_iterator_t * this)
  33. {
  34. void *clientnode = lub_bintree_findnext(this->tree, &this->key);
  35. /* make sure that next time we've move onward */
  36. lub_bintree_iterator_init(this, this->tree, clientnode);
  37. return clientnode;
  38. }
  39. /*--------------------------------------------------------- */