CCCC(1)
π CCCC β C and C++ Code Counter π
okay bestie, welcome to cccc(1), aka the C and C++ Code Counter β it's a software metrics tool and it's lowkey iconic. It lives in the General Commands Manual, section 1, so you know it's a real one. π
β¨ SYNOPSIS β¨
cccc [options] file1.c ...
like. that's it. that's the whole vibe. you give it files, it gives you numbers. π
πΈ DESCRIPTION πΈ
So here's the tea: cccc analyses and reports measurements of source code written in C, C++, and Java. The metrics it supports include:
- lines of code π
- McCabe's Cyclomatic Complexity (yes the real one, no cap)
- measures of module fan-out/fan-in π¦
CCCC processes the files listed on its command line. And bestie, here's a lil trick: if the filenames include -, it will read a list of files from standard input. so you can pipe stuff in, slay. β¨
π«Ά real talk though: this program is work in progress and is not well documented. Please be prepared to refer to the source code for the meaning of some options. not me being honest about my own documentation π she's a work in progress, we love her anyway.
π OPTIONS π
okay so here's every single one, and yes we're doing all of them, no skipping, we don't do that here π
--helpβ Generate this help message. the classic. the icon. π- *
--outdir=dname* β Directory for generated files (default=.cccc). this is where all her little creations go live. π - *
--html_outfile=fname* β Name of primary HTML report generated (default=outdir/cccc.html). pretty report, we love to see it. β¨ - *
--xml_outfile=fname* β Name of primary XML report generated (default=outdir/cccc.xml). for the machine girlies. π€ --db_infile=fname β Preload internal database from named file (default=no initial content**). come pre-loaded, periodt. π- *
--db_outfile=fname* β Save internal database to named file (default=outdir/cccc.db). save it for later, she's organised. ποΈ --opt_infile=fname β Load options from named file (default=use compiled-in option values**, refer tocccc_opt.ccfor option information). yes bestie, go readcccc_opt.cc, iykyk. π- *
--opt_outfile=fname* β Save options to named file (default=outdir/cccc.opt). write down your settings so you don't forget them like i forget my passwords. π --lang=string β Use language specified for files specified **after this option. Languages supported arec,c++,ada, andjava(default=use language/extension mapping controlled by options). so you can switch languages mid-command, main character energy fr fr. π¦- *
--report_mask=hex* β Control report content (refer toccccmain.ccfor mask values). hex values, refer toccccmain.cc, that's the assignment. π₯ - *
--debug_mask=hex* β Control debug output content (refer toccccmain.ccfor mask values). same deal,ccccmain.cc, mask values, go look. π
π AUTHOR π
CCCC was written by Tim Littlefair <tim_littlefair@hotmail.com>. π
This manual page was written by Colin Watson <cjwatson@debian.org> for the Debian system (but may be used by others). so generous, so giving. π«Ά
π§ tiny vibe check before you go: cccc is a work in progress and not well documented, so if an option is giving mystery, the source code is your bestie. that's not a bug, that's just the era she's in. π
and that's the whole page babes π from the General Commands Manual, section 1, CCCC(1) β the C and C++ Code Counter, out here counting your lines and your complexity since forever. go forth, run it on your code, and may your fan-out stay balanced. πβ¨πΈπ¦βπ
π¦ where this page comes from
- debian bookworm: cccc 1:3.2.0+dfsg1-1 Β· GPL-2.0-or-later
- debian trixie: cccc 1:3.2.0+dfsg1-2 Β· GPL-2.0-or-later
- ubuntu noble: cccc 1:3.2.0+dfsg1-1 Β· GPL-2.0-or-later
- ubuntu questing: cccc 1:3.2.0+dfsg1-2
- ubuntu resolute: cccc 1:3.2.0+dfsg1-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: cccc 1:3.2.0+dfsg1-2build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms