version 1.14, 2015/12/06 23:22:51 |
version 1.15, 2016/12/22 16:36:18 |
|
|
* *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; arcp; arcp = detachedp) { |
arcp ; |
detachedp = arcp -> 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; arcp; arcp = detachedp) { |
arcp; (arcp = detachedp) && (detachedp = detachedp->arc_parentlist)) { |
detachedp = arcp->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; doing; doing = todo) { |
doing; (doing = todo) && (todo = doing -> cnext)) { |
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; |