version 1.3, 2001/03/22 05:18:30 |
version 1.4, 2001/03/31 23:27:02 |
|
|
* *prevp arc before the arc you are comparing. |
* *prevp arc before the arc you are comparing. |
*/ |
*/ |
sorted.arc_childlist = 0; |
sorted.arc_childlist = 0; |
for ( arcp = parentp -> children, detachedp = arcp -> arc_childlist; |
for ((arcp = parentp -> children) && (detachedp = arcp -> arc_childlist); |
arcp ; |
arcp ; |
arcp = detachedp, detachedp = detachedp -> arc_childlist) { |
(arcp = detachedp) && (detachedp = detachedp -> arc_childlist)) { |
/* |
/* |
* consider *arcp as disconnected |
* consider *arcp as disconnected |
* insert it into sorted |
* insert it into sorted |
|
|
* *prevp arc before the arc you are comparing. |
* *prevp arc before the arc you are comparing. |
*/ |
*/ |
sorted.arc_parentlist = 0; |
sorted.arc_parentlist = 0; |
for (arcp = childp->parents, detachedp = arcp->arc_parentlist; |
for ((arcp = childp->parents) && (detachedp = arcp->arc_parentlist); |
arcp; arcp = detachedp, detachedp = detachedp->arc_parentlist) { |
arcp; (arcp = detachedp) && (detachedp = detachedp->arc_parentlist)) { |
/* |
/* |
* consider *arcp as disconnected |
* consider *arcp as disconnected |
* insert it into sorted |
* insert it into sorted |
|
|
*/ |
*/ |
todo = cyclep -> cnext; |
todo = cyclep -> cnext; |
cyclep -> cnext = 0; |
cyclep -> cnext = 0; |
for (doing = todo, todo = doing -> cnext; |
for ((doing = todo) && (todo = doing -> cnext); |
doing; doing = todo, todo = doing -> cnext) { |
doing; (doing = todo) && (todo = doing -> cnext)) { |
for (prev = cyclep; prev -> cnext; prev = prev -> cnext) |
for (prev = cyclep; prev -> cnext; prev = prev -> cnext) |
if (membercmp(doing, prev->cnext ) == GREATERTHAN) |
if (membercmp(doing, prev->cnext ) == GREATERTHAN) |
break; |
break; |