-/** @brief Put the cursor at the begining of the dynar.
- *
- * Actually, the cursor is set one step before the begining, so that you
- * can iterate over the dynar with a for loop.
- *
- * @warning Do not call this function directly, but only through xbt_dynar_foreach.
- */
-void
-_xbt_dynar_cursor_first(const xbt_dynar_t dynar, unsigned int *const cursor)
-{
-
- _dynar_lock(dynar);
- DEBUG1("Set cursor on %p to the first position", (void *) dynar);
- *cursor = 0;
-}
-
-/** @brief Move the cursor to the next value
- *
- * @warning Do not call this function directly, but only through xbt_dynar_foreach.
- */
-void
-_xbt_dynar_cursor_step(const xbt_dynar_t dynar, unsigned int *const cursor)
-{
-
- (*cursor)++;
-}
-
-/** @brief Get the data currently pointed by the cursor
- *
- * @warning Do not call this function directly, but only through xbt_dynar_foreach.
- */
-int
-_xbt_dynar_cursor_get(const xbt_dynar_t dynar,
- unsigned int *const cursor, void *const dst)
-{
-
- _sanity_check_dynar(dynar);
- {
-
- const unsigned long idx = *cursor;
-
- if (idx >= dynar->used) {
- DEBUG1("Cursor on %p already on last elem", (void *) dynar);
- _dynar_unlock(dynar);
- return FALSE;
- }
- DEBUG2("Cash out cursor on %p at %lu", (void *) dynar, idx);
-
- _xbt_dynar_get_elm(dst, dynar, idx);
- }
- return TRUE;
-
-}