331 const ERRCODE DONT_EXCHANGE_DELETED =
332 "Can't exchange deleted elements of lists";
343 if (!(other_it->list))
350 if ((list->
empty ()) ||
351 (other_it->list->
empty ()) || (current == other_it->current))
356 if (!current || !other_it->current)
357 DONT_EXCHANGE_DELETED.
error (
"ELIST2_ITERATOR.exchange",
ABORT,
NULL);
364 if ((next == other_it->current) ||
365 (other_it->next == current)) {
367 if ((next == other_it->current) &&
368 (other_it->next == current)) {
369 prev = next = current;
370 other_it->prev = other_it->next = other_it->current;
375 if (other_it->next == current) {
376 other_it->prev->next = current;
377 other_it->current->next = next;
378 other_it->current->prev = current;
379 current->next = other_it->current;
380 current->prev = other_it->prev;
381 next->prev = other_it->current;
383 other_it->next = other_it->current;
387 prev->next = other_it->current;
388 current->next = other_it->next;
389 current->prev = other_it->current;
390 other_it->current->next = current;
391 other_it->current->prev = prev;
392 other_it->next->prev = current;
395 other_it->prev = other_it->current;
400 prev->next = other_it->current;
401 current->next = other_it->next;
402 current->prev = other_it->prev;
403 next->prev = other_it->current;
404 other_it->prev->next = current;
405 other_it->current->next = next;
406 other_it->current->prev = prev;
407 other_it->next->prev = current;
413 if (list->last == current)
414 list->last = other_it->current;
415 if (other_it->list->last == other_it->current)
416 other_it->list->last = current;
418 if (current == cycle_pt)
419 cycle_pt = other_it->cycle_pt;
420 if (other_it->current == other_it->cycle_pt)
421 other_it->cycle_pt = cycle_pt;
425 old_current = current;
426 current = other_it->current;
427 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT