324 const ERRCODE DONT_EXCHANGE_DELETED =
325 "Can't exchange deleted elements of lists";
336 if (!(other_it->list))
343 if ((list->
empty ()) ||
344 (other_it->list->
empty ()) || (current == other_it->current))
349 if (!current || !other_it->current)
350 DONT_EXCHANGE_DELETED.
error (
"ELIST_ITERATOR.exchange",
ABORT,
NULL);
357 if ((next == other_it->current) ||
358 (other_it->next == current)) {
360 if ((next == other_it->current) &&
361 (other_it->next == current)) {
362 prev = next = current;
363 other_it->prev = other_it->next = other_it->current;
368 if (other_it->next == current) {
369 other_it->prev->next = current;
370 other_it->current->next = next;
371 current->next = other_it->current;
372 other_it->next = other_it->current;
376 prev->next = other_it->current;
377 current->next = other_it->next;
378 other_it->current->next = current;
380 other_it->prev = other_it->current;
385 prev->next = other_it->current;
386 current->next = other_it->next;
387 other_it->prev->next = current;
388 other_it->current->next = next;
394 if (list->last == current)
395 list->last = other_it->current;
396 if (other_it->list->last == other_it->current)
397 other_it->list->last = current;
399 if (current == cycle_pt)
400 cycle_pt = other_it->cycle_pt;
401 if (other_it->current == other_it->cycle_pt)
402 other_it->cycle_pt = cycle_pt;
406 old_current = current;
407 current = other_it->current;
408 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
const ERRCODE NULL_OBJECT
void error(const char *caller, TessErrorLogCode action, const char *format,...) const