SlackBuilds Repository

15.0 > Development > c_count (7.22)

c_count (classify and count lines of C or C++ source)

c_count counts lines, statements, other simple measures of C/C++
source programs. It isn't lex/yacc based, and is easily portable to a
variety of systems.

Note: By default, the binary and man page are installed as C_count
(uppercase C), to prevent a conflict with /usr/bin/c_count from the
SBo sloccount package. If you really want, you can run this script
with LOWERCASE=yes in the environment to install as c_count... but if
you do this, don't install sloccount on the same system.

c_count gives more detailed statistics than sloccount, but does not
include sloccount's person-years and cost estimates.

Example output from c_count:

$ C_count filename.c
3656 1513 |filename.c
3656 1513 total lines/statements

881 lines had comments 24.1 %
47 comments are inline -1.3 %
537 lines were blank 14.7 %
197 lines for preprocessor 5.4 %
2088 lines containing code 57.1 %
3656 total lines 100.0 %

18053 comment-chars 22.8 %
4739 nontext-comment-chars 6.0 %
18594 whitespace-chars 23.5 %
2527 preprocessor-chars 3.2 %
35098 statement-chars 44.4 %
79011 total characters 100.0 %

3919 tokens, average length 6.99

0.48 ratio of comment:code

205 top-level blocks/statements
9 maximum blocklevel
2.93 ratio of blocklevel:code

Maintained by: B. Watson
Keywords: sloc,ccount,c-count
ChangeLog: c_count


Source Downloads:
c_count-7.22.tgz (1a876209c0d8a62a87b8bcd692dd13ea)

Download SlackBuild:
c_count.tar.gz.asc (FAQ)

(the SlackBuild does not include the source)

Individual Files:

Validated for Slackware 15.0

See our HOWTO for instructions on how to use the contents of this repository.

Access to the repository is available via:
ftp git cgit http rsync

© 2006-2023 Project. All rights reserved.
Slackware® is a registered trademark of Patrick Volkerding
Linux® is a registered trademark of Linus Torvalds