300 const ERRCODE DONT_EXCHANGE_DELETED =
301 "Can't exchange deleted elements of lists";
310 if (!(other_it->list))
317 if ((list->
empty ()) ||
318 (other_it->list->
empty ()) || (current == other_it->current))
323 if (!current || !other_it->current)
324 DONT_EXCHANGE_DELETED.
error (
"ELIST2_ITERATOR.exchange",
ABORT, NULL);
331 if ((next == other_it->current) ||
332 (other_it->next == current)) {
334 if ((next == other_it->current) &&
335 (other_it->next == current)) {
336 prev = next = current;
337 other_it->prev = other_it->next = other_it->current;
342 if (other_it->next == current) {
343 other_it->prev->next = current;
344 other_it->current->next = next;
345 other_it->current->prev = current;
346 current->next = other_it->current;
347 current->prev = other_it->prev;
348 next->prev = other_it->current;
350 other_it->next = other_it->current;
354 prev->next = other_it->current;
355 current->next = other_it->next;
356 current->prev = other_it->current;
357 other_it->current->next = current;
358 other_it->current->prev = prev;
359 other_it->next->prev = current;
362 other_it->prev = other_it->current;
367 prev->next = other_it->current;
368 current->next = other_it->next;
369 current->prev = other_it->prev;
370 next->prev = other_it->current;
371 other_it->prev->next = current;
372 other_it->current->next = next;
373 other_it->current->prev = prev;
374 other_it->next->prev = current;
380 if (list->last == current)
381 list->last = other_it->current;
382 if (other_it->list->last == other_it->current)
383 other_it->list->last = current;
385 if (current == cycle_pt)
386 cycle_pt = other_it->cycle_pt;
387 if (other_it->current == other_it->cycle_pt)
388 other_it->cycle_pt = cycle_pt;
392 old_current = current;
393 current = other_it->current;
394 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
void error(const char *caller, TessErrorLogCode action, const char *format,...) const