Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ *.exe *.obj *.lzh .*.swp src/.gitignore 0 → 100644 +1 −0 Original line number Diff line number Diff line generate-call-graph.dot src/generate-call-graph.sh +7 −7 Original line number Diff line number Diff line Loading @@ -4,31 +4,31 @@ grep -E '^[^C].*(CALL|SUBROUTINE)' bulletin*.for \ | sed 's/ *! .*//;s/:.*\(CALL\|SUBROUTINE\) / \1 /;s/(.*//' \ | awk ' BEGIN { e="flowchart LR" e="graph {" } { if ($1 != f) { print e; sg=$1; gsub(".for", "", sg); print " subgraph " sg; print " direction LR"; e=" end"; print " subgraph " sg " {"; e=" }"; } } $2 == "SUBROUTINE" { f=$1; s=$3; print " " s "(" s ")"; print " " s; } $2 == "CALL" { if ($1 != f) { f=$1; s="main"; print " " s "(" s ")"; print " " s; } print " " s " --> " $3; print " " s " -> " $3; } END { print e; print "}"; } ' \ | sed 's/\$/__/g' Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ *.exe *.obj *.lzh .*.swp
src/.gitignore 0 → 100644 +1 −0 Original line number Diff line number Diff line generate-call-graph.dot
src/generate-call-graph.sh +7 −7 Original line number Diff line number Diff line Loading @@ -4,31 +4,31 @@ grep -E '^[^C].*(CALL|SUBROUTINE)' bulletin*.for \ | sed 's/ *! .*//;s/:.*\(CALL\|SUBROUTINE\) / \1 /;s/(.*//' \ | awk ' BEGIN { e="flowchart LR" e="graph {" } { if ($1 != f) { print e; sg=$1; gsub(".for", "", sg); print " subgraph " sg; print " direction LR"; e=" end"; print " subgraph " sg " {"; e=" }"; } } $2 == "SUBROUTINE" { f=$1; s=$3; print " " s "(" s ")"; print " " s; } $2 == "CALL" { if ($1 != f) { f=$1; s="main"; print " " s "(" s ")"; print " " s; } print " " s " --> " $3; print " " s " -> " $3; } END { print e; print "}"; } ' \ | sed 's/\$/__/g' Loading