+/** @brief Move to the next element. */
+inline void xbt_dict_cursor_step(xbt_dict_cursor_t cursor)
+{
+ xbt_dictelm_t current;
+ int line;
+
+ XBT_CDEBUG(xbt_dict_cursor, "xbt_dict_cursor_step");
+ xbt_assert(cursor);
+
+ current = cursor->current;
+ line = cursor->line;
+
+ if (cursor->dict != NULL) {
+ if (current != NULL) {
+ XBT_CDEBUG(xbt_dict_cursor, "current is not null, take the next element");
+ current = current->next;
+ XBT_CDEBUG(xbt_dict_cursor, "next element: %p", current);
+ }
+
+ while (current == NULL && (line + 1) <= cursor->dict->table_size) {
+ line++;
+ XBT_CDEBUG(xbt_dict_cursor, "current is NULL, take the next line");
+ current = cursor->dict->table[line];
+ XBT_CDEBUG(xbt_dict_cursor, "element in the next line: %p", current);
+ }
+ XBT_CDEBUG(xbt_dict_cursor, "search finished, current = %p, line = %d", current, line);
+
+ cursor->current = current;
+ cursor->line = line;
+ }
+}