fr_assert(rcode == 0);
break;
- case FR_EDIT_INSERT_BEFORE:
- case FR_EDIT_INSERT_AFTER:
+ case FR_EDIT_INSERT:
/*
* We can free the VP here, as any edits to its'
* children MUST come after the creation of the
* pair (inserted, deleted, or updated
* the value), as the pair is new!
*/
- case FR_EDIT_INSERT_BEFORE:
- case FR_EDIT_INSERT_AFTER:
+ case FR_EDIT_INSERT:
fr_assert(0);
return -1;
* edit list is freed, the VP will be
* freed.
*/
- if ((e->op == FR_EDIT_INSERT_BEFORE) ||
- (e->op == FR_EDIT_INSERT_AFTER)) {
+ if (e->op == FR_EDIT_INSERT) {
fr_assert(e->list == list);
fr_pair_remove(list, vp);
}
break;
- case FR_EDIT_INSERT_BEFORE:
- fr_assert(list != NULL);
-
- /*
- * There's no need to record "prev". On undo, we
- * just delete this pair from the list.
- */
- e->list = list;
- fr_pair_insert_before(list, ref, vp);
- break;
-
- case FR_EDIT_INSERT_AFTER:
+ case FR_EDIT_INSERT:
fr_assert(list != NULL);
/*
fr_assert(0);
break;
- case FR_EDIT_INSERT_BEFORE:
- case FR_EDIT_INSERT_AFTER:
+ case FR_EDIT_INSERT:
break;
case FR_EDIT_DELETE:
FR_EDIT_INVALID = 0,
FR_EDIT_DELETE, //!< delete a VP
FR_EDIT_VALUE, //!< edit a VP in place
- FR_EDIT_INSERT_BEFORE, //!< insert a VP into a list, before another one
- FR_EDIT_INSERT_AFTER, //!< insert a VP into a list, after another one.
+ FR_EDIT_INSERT, //!< insert a VP into a list, after another one.
} fr_edit_op_t;
typedef struct fr_edit_list_s fr_edit_list_t;