2016-11-05 12:00 AM

OS:Ubuntu 16.04

C code finctional relevant blocks to display for flowchart by cflow and Graphviz.

cflow: https://www.gnu.org/software/cflow/

Graphviz: http://www.graphviz.org/


$ sudo apt-get install cflow graphviz


(also need to install python module, how to install python, please chack python site, 



To use the below python code, automatically convert your code to png and svg format img. 



but first of all, might be modified the cflow and dot pass sections in cflow2dot.py

cflow_path = "/usr/local/bin/cflow"

dot_path = "/usr/local/bin/dot"


cflow_path = "/usr/bin/cflow"

dot_path = "/usr/bin/dot"


"dot" is one of the apps in Graphviz.


How to check the above command pass, might be useful the following command,

$ which cflow
$ which dot

Finally, execute the python code.

$ "pass to cflow2dot.py folder"/cflow2dot.py  "your code"