352 const ERRCODE DONT_EXCHANGE_DELETED =
353 "Can't exchange deleted elements of lists";
362 if (!(other_it->list))
369 if ((list->
empty ()) ||
370 (other_it->list->
empty ()) || (current == other_it->current))
375 if (!current || !other_it->current)
376 DONT_EXCHANGE_DELETED.
error (
"CLIST_ITERATOR.exchange",
ABORT, NULL);
383 if ((next == other_it->current) ||
384 (other_it->next == current)) {
386 if ((next == other_it->current) &&
387 (other_it->next == current)) {
388 prev = next = current;
389 other_it->prev = other_it->next = other_it->current;
394 if (other_it->next == current) {
395 other_it->prev->next = current;
396 other_it->current->next = next;
397 current->next = other_it->current;
398 other_it->next = other_it->current;
402 prev->next = other_it->current;
403 current->next = other_it->next;
404 other_it->current->next = current;
406 other_it->prev = other_it->current;
411 prev->next = other_it->current;
412 current->next = other_it->next;
413 other_it->prev->next = current;
414 other_it->current->next = next;
420 if (list->last == current)
421 list->last = other_it->current;
422 if (other_it->list->last == other_it->current)
423 other_it->list->last = current;
425 if (current == cycle_pt)
426 cycle_pt = other_it->cycle_pt;
427 if (other_it->current == other_it->cycle_pt)
428 other_it->cycle_pt = cycle_pt;
432 old_current = current;
433 current = other_it->current;
434 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const