- 从 C 源码提取结构提
- 解析结构体关系
- 解析链接
- 根据结构体和链接绘制图片
- 避免名称冲突
cat *.h *.c| python3 ./extract_struct.py | sed -E 's/typedef *//' | sed -E 's/^}.*/};/' | sed -E '/\/\*/{:start /\*\//!{N;b start};s/\/\*.*\*\///}' | sed -E 's#/\*.*\*/##' | sed -E '/^ *$/d' > struct.txt
cat struct.txt | python3 ./generate_rel.py > tmpfile
dot -Tsvg tmpfile -o out.svg