行数カウント
Cソースコードの行数を測りたい。
Wikipediaにコロ助というソフトがあるので、このコードに試しに使ってみた。
#include <stdio.h> int main(void){ /* */ } /* */ void func(void) { }
結果、有効行6、コメント行1、空白行3で、合計行10だった。
えぇ・・・。そうなんだ・・・。
clocというのを使ってみた。
1 text file.
1 unique file.
0 files ignored.http://cloc.sourceforge.net v 1.55 T=0.5 s (2.0 files/s, 18.0 lines/s)
- -
Language files blank comment code
- -
C 1 2 2 5
- -
こっちのほうが良さそうじゃない?