http://alexvn.freeservers.com/s1/download.html#label1_cncc
1. Description.
NAME
cncc - count C/C++ source lines and bytes
SYNOPSIS
cncc [OPTIONS]... [FILE]...
DESCRIPTION
Count code-lines, empty-lines, comment-lines,
code-fields, empty-fields, comment-fields of C/C++-sources
which have been successfully compiled.
The program accepts the following options.
`-a'
Print code-line, empty-line and comment-line counts for each FILE.
This option is DEFAULT.
`-b'
Print line-type for each LINE of each FILE.
`-c'
* line-type
and
* code-field, empty-field and comment-field counts
for each line of each FILE.
### Note. This option is incompatible with option `-d'.
`-d'
Print field-type for each field of each line of each FILE.
### Note. This option is incompatible with option `-c'.
`-h'
Display this help and exit.
`-v'
Print the version number and exit.
2. Report samples.
========================
### File : hello.cpp ###
========================
------------------------------------
Files purified from comments created
* hello.ii2
* hello.ii3
------------------------------------
--- Summary Report ---
==================================
| : Lines : Bytes |
|--------------------------------|
| Code Only : 6 : 81 |
| Code+Comment : 1 : - |
| Comment Only : 1 : 46 |
| Empty : 1 : 17 |
|................................|
| * Total : 9 : 144 |
==================================
--- Detailed Report (Line Info-1) ---
===============================
| Line# : Content |
|-----------------------------|
| Line# 1 : Code Only |
| Line# 2 : Code Only |
| Line# 3 : Empty |
| Line# 4 : Code+Comment |
| Line# 5 : Code Only |
| Line# 6 : Comment Only |
| Line# 7 : Code Only |
| Line# 8 : Code Only |
| Line# 9 : Code Only |
===============================
--- Detailed Report (Line Info-2) ---
=============================================================
| Line# : Content : Code : Comment : Blank |
| : : Bytes : Bytes : Bytes |
|-----------------------------------------------------------|
| Line# 1 : Code Only : 18 : 0 : 1 |
| Line# 2 : Code Only : 18 : 0 : 2 |
| Line# 3 : Empty : 0 : 0 : 0 |
| Line# 4 : Code+Comment : 9 : 24 : 3 |
| Line# 5 : Code Only : 1 : 0 : 0 |
| Line# 6 : Comment Only : 0 : 22 : 2 |
| Line# 7 : Code Only : 26 : 0 : 6 |
| Line# 8 : Code Only : 8 : 0 : 3 |
| Line# 9 : Code Only : 1 : 0 : 0 |
=============================================================
--- Detailed Report (Line & Byte Info) ---
==========================================
| Line# : Content |
|----------------------------------------|
| Line# 1 : Code Only |
| * Byte[ 1][ 1] : code |
| * Byte[ 1][ 2] : code |
| * Byte[ 1][ 3] : code |
| * Byte[ 1][ 4] : code |
| * Byte[ 1][ 5] : code |
| * Byte[ 1][ 6] : code |
| * Byte[ 1][ 7] : code |
| * Byte[ 1][ 8] : code |
| * Byte[ 1][ 9] : blank |
| * Byte[ 1][ 10] : code |
| * Byte[ 1][ 11] : code |
| * Byte[ 1][ 12] : code |
| * Byte[ 1][ 13] : code |
| * Byte[ 1][ 14] : code |
| * Byte[ 1][ 15] : code |
| * Byte[ 1][ 16] : code |
| * Byte[ 1][ 17] : code |
| * Byte[ 1][ 18] : code |
| * Byte[ 1][ 19] : code |
| : |
| Line# 2 : Code Only |
| * Byte[ 2][ 1] : code |
| * Byte[ 2][ 2] : code |
| * Byte[ 2][ 3] : code |
| * Byte[ 2][ 4] : code |
| * Byte[ 2][ 5] : code |
| * Byte[ 2][ 6] : blank |
| * Byte[ 2][ 7] : code |
| * Byte[ 2][ 8] : code |
| * Byte[ 2][ 9] : code |
| * Byte[ 2][ 10] : code |
| * Byte[ 2][ 11] : code |
| * Byte[ 2][ 12] : code |
| * Byte[ 2][ 13] : code |
| * Byte[ 2][ 14] : code |
| * Byte[ 2][ 15] : code |
| * Byte[ 2][ 16] : blank |
| * Byte[ 2][ 17] : code |
| * Byte[ 2][ 18] : code |
| * Byte[ 2][ 19] : code |
| * Byte[ 2][ 20] : code |
| : |
| Line# 3 : Empty |
| : |
| Line# 4 : Code+Comment |
| * Byte[ 4][ 1] : code |
| * Byte[ 4][ 2] : code |
| * Byte[ 4][ 3] : code |
| * Byte[ 4][ 4] : blank |
| * Byte[ 4][ 5] : code |
| * Byte[ 4][ 6] : code |
| * Byte[ 4][ 7] : code |
| * Byte[ 4][ 8] : code |
| * Byte[ 4][ 9] : code |
| * Byte[ 4][ 10] : code |
| * Byte[ 4][ 11] : blank |
| * Byte[ 4][ 12] : blank |
| * Byte[ 4][ 13] : comment |
| * Byte[ 4][ 14] : comment |
| * Byte[ 4][ 15] : comment |
| * Byte[ 4][ 16] : comment |
| * Byte[ 4][ 17] : comment |
| * Byte[ 4][ 18] : comment |
| * Byte[ 4][ 19] : comment |
| * Byte[ 4][ 20] : comment |
| * Byte[ 4][ 21] : comment |
| * Byte[ 4][ 22] : comment |
| * Byte[ 4][ 23] : comment |
| * Byte[ 4][ 24] : comment |
| * Byte[ 4][ 25] : comment |
| * Byte[ 4][ 26] : comment |
| * Byte[ 4][ 27] : comment |
| * Byte[ 4][ 28] : comment |
| * Byte[ 4][ 29] : comment |
| * Byte[ 4][ 30] : comment |
| * Byte[ 4][ 31] : comment |
| * Byte[ 4][ 32] : comment |
| * Byte[ 4][ 33] : comment |
| * Byte[ 4][ 34] : comment |
| * Byte[ 4][ 35] : comment |
| * Byte[ 4][ 36] : comment |
| : |
| Line# 5 : Code Only |
| * Byte[ 5][ 1] : code |
| : |
| Line# 6 : Comment Only |
| * Byte[ 6][ 1] : blank |
| * Byte[ 6][ 2] : blank |
| * Byte[ 6][ 3] : comment |
| * Byte[ 6][ 4] : comment |
| * Byte[ 6][ 5] : comment |
| * Byte[ 6][ 6] : comment |
| * Byte[ 6][ 7] : comment |
| * Byte[ 6][ 8] : comment |
| * Byte[ 6][ 9] : comment |
| * Byte[ 6][ 10] : comment |
| * Byte[ 6][ 11] : comment |
| * Byte[ 6][ 12] : comment |
| * Byte[ 6][ 13] : comment |
| * Byte[ 6][ 14] : comment |
| * Byte[ 6][ 15] : comment |
| * Byte[ 6][ 16] : comment |
| * Byte[ 6][ 17] : comment |
| * Byte[ 6][ 18] : comment |
| * Byte[ 6][ 19] : comment |
| * Byte[ 6][ 20] : comment |
| * Byte[ 6][ 21] : comment |
| * Byte[ 6][ 22] : comment |
| * Byte[ 6][ 23] : comment |
| * Byte[ 6][ 24] : comment |
| : |
| Line# 7 : Code Only |
| * Byte[ 7][ 1] : blank |
| * Byte[ 7][ 2] : blank |
| * Byte[ 7][ 3] : code |
| * Byte[ 7][ 4] : code |
| * Byte[ 7][ 5] : code |
| * Byte[ 7][ 6] : code |
| * Byte[ 7][ 7] : blank |
| * Byte[ 7][ 8] : code |
| * Byte[ 7][ 9] : code |
| * Byte[ 7][ 10] : blank |
| * Byte[ 7][ 11] : code (string) |
| * Byte[ 7][ 12] : code (string) |
| * Byte[ 7][ 13] : code (string) |
| * Byte[ 7][ 14] : code (string) |
| * Byte[ 7][ 15] : code (string) |
| * Byte[ 7][ 16] : code (string) |
| * Byte[ 7][ 17] : code (string) |
| * Byte[ 7][ 18] : code (string) |
| * Byte[ 7][ 19] : code (string) |
| * Byte[ 7][ 20] : code (string) |
| * Byte[ 7][ 21] : code (string) |
| * Byte[ 7][ 22] : code (string) |
| * Byte[ 7][ 23] : code (string) |
| * Byte[ 7][ 24] : blank |
| * Byte[ 7][ 25] : code |
| * Byte[ 7][ 26] : code |
| * Byte[ 7][ 27] : blank |
| * Byte[ 7][ 28] : code |
| * Byte[ 7][ 29] : code |
| * Byte[ 7][ 30] : code |
| * Byte[ 7][ 31] : code |
| * Byte[ 7][ 32] : code |
| : |
| Line# 8 : Code Only |
| * Byte[ 8][ 1] : blank |
| * Byte[ 8][ 2] : blank |
| * Byte[ 8][ 3] : code |
| * Byte[ 8][ 4] : code |
| * Byte[ 8][ 5] : code |
| * Byte[ 8][ 6] : code |
| * Byte[ 8][ 7] : code |
| * Byte[ 8][ 8] : code |
| * Byte[ 8][ 9] : blank |
| * Byte[ 8][ 10] : code |
| * Byte[ 8][ 11] : code |
| : |
| Line# 9 : Code Only |
| * Byte[ 9][ 1] : code |
==========================================
--
=====================================
Alex Vinokur
mailto:alexvn@connect.to
http://mathforum.org/library/view/10978.html
news://news.gmane.org/gmane.comp.lang.c++.perfometer
=====================================