DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦c763c69b6⟧ TextFile

    Length: 1097 (0x449)
    Types: TextFile
    Names: »cycle.awk«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« 
        └─⟦036c765ac⟧ 
            └─⟦this⟧ »TeX3.0/Spiderweb/master/cycle.awk« 

TextFile

##157:

#line 22 "cycle.web"

#line 23 "cycle.web"
NF==4&&$3=="-->"{
incoming[$4]+=1
if(incoming[$2]==""){
incoming[$2]=0
}
successors[$2]=successors[$2]" "$4
outgoing_edges[$2]=outgoing_edges[$2]$0"\n"
next
}
!/^ *$/{
print"What's all this?",$0
exit 1
}
END{
##158:

#line 57 "cycle.web"

#line 58 "cycle.web"
for(node in incoming){
if(incoming[node]==0){
work[high++]=node
}
}

##:158

#line 38 "cycle.web"

n=0
while(n<high){
##159:

#line 64 "cycle.web"

#line 65 "cycle.web"
thisnode=work[n]
temp=successors[thisnode]
m=split(temp,newnodes," ")
for(j=1;j<=m;j++){
thisnode=newnodes[j]
incoming[thisnode]-=1
if(incoming[thisnode]==0){
work[high++]=thisnode
}
}

##:159

#line 42 "cycle.web"

n++
}
for(node in incoming){
if(incoming[node]!=0){
##160:

#line 76 "cycle.web"

#line 77 "cycle.web"
if(cycle==0){
print"There is a potential cycle here somewhere -- check the context"
cycle=1
}
printf"%s",outgoing_edges[node]
#line 2523 "/u/nr/web/src/master/spider.web"
##:160

#line 47 "cycle.web"

}
}
if(cycle==0){
print"There can't possibly be a cycle in the graph"
}else{
exit 0
}
}

##:157