pmccabe - McCabe-style function complexity and line counting for C and C++

Property Value
Distribution Debian 8 (Jessie)
Repository Debian Main i386
Package name pmccabe
Package version 2.6
Package architecture i386
Package type deb
Installed size 112 B
Download size 22.16 KB
Official Mirror
Pmccabe calculates McCabe-style cyclomatic complexity for C and C++
source code.  Per-function complexity may be used for spotting likely
trouble spots and for estimating testing effort.
Pmccabe also includes a non-commented line counter compatible with anac,
'decomment' which only removes comments from source code; 'codechanges',
a program to calculate the amount of change which has occurred between
two source trees or files; and 'vifn', to invoke 'vi' given a function
name rather than a file name.
Pmccabe attempts to calculate the apparent complexity rather
than the complexity following the C++ and/or cpp preprocessors.
This causes Pmccabe to become confused with cpp constructs which
cause unmatched curly braces - most of which can profitably be
rewritten so they won't confuse prettyprinters anyway.  Pmccabe prints
C-compiler-style error messages when the parser gets confused so they
may be browsed with standard tools.
Two types of cyclomatic complexity are generated - one type counts
each switch() statement as regardless of the number of cases included and
the other more traditional measure counts each case within the switch().
Pmccabe also calculates the starting line for each function, the number of
lines consumed by the function, and the number of C statements within the


Package Version Architecture Repository
pmccabe_2.6_amd64.deb 2.6 amd64 Debian Main
pmccabe - - -


Name Value
libc6 >= 2.3


Type URL
Binary Package pmccabe_2.6_i386.deb
Source Package pmccabe

Install Howto

  1. Update the package index:
    # sudo apt-get update
  2. Install pmccabe deb package:
    # sudo apt-get install pmccabe




2010-08-06 - Paul Bame <>
pmccabe (2.6) unstable; urgency=low
* From Ubuntu:
* Fixed 364338 pdiff script change has bug
* Fixed 499589 infinite loop with namespaced struct variable declaration
* Thanks to matt_hargett for bugs and patches
* Fixed a problem parsing DOS-format CRLF files
* Updated deb stds version and fixed some lintian warnings
2008-07-30 - Paul Bame <>
pmccabe (2.5) unstable; urgency=low
* updated codechanges and pdiff to be bashism safe
* updated test files
* bump Build-Depends debhelper 3->5
2008-09-09 - Chris Lamb <>
pmccabe (2.4+nmu2) unstable; urgency=medium
* Non-maintainer upload.
* Fix bashism in codechanges /bin/sh script (Closes: #486054)
2008-04-12 - Chris Lamb <>
pmccabe (2.4+nmu1) unstable; urgency=medium
* Non-maintainer upload.
* Fix bashism in 'codechanges' script (Closes: #465351)
* Bump Standards-Version to 3.7.3.
2007-08-13 - Paul Bame <>
pmccabe (2.4) unstable; urgency=low
* add support for C++ namespaces
2003-11-26 - Paul Bame <>
pmccabe (2.3-1) unstable; urgency=low
* you can use "class" as an identifier in C code now.  Thanks to
xianjie zhang for an excellent bug report.
2003-03-12 - Paul Bame <>
pmccabe (2.2-3) unstable; urgency=low
* tweek for running under buildd and whenever pmccabe not installed
and . not in $PATH
2003-02-23 - Paul Bame <>
pmccabe (2.2-2) unstable; urgency=low
* Tweek debian/copyright to follow policy
2002-12-17 - Paul Bame <>
pmccabe (2.2-1) unstable; urgency=low
* Initial public release.
* Closes: #177749

See Also

Package Description
pmd2odg_0.9.2-2_i386.deb Apple Pagemaker to OpenDocument converter
pmidi_1.6.0-5_i386.deb A command line midi player for ALSA
pmk_0.10.4-1_i386.deb utility to configure software sources
pmount_0.9.23-3+b1_i386.deb mount removable devices as normal user
pms_0.42-1_i386.deb Practical Music Search, an MPD client
pmtools_2.0.0-1_all.deb Perl module tools
pmuninstall_0.30-1_all.deb script to uninstall modules installed from CPAN
pmw-doc_4.28-1_all.deb Philip's Music Writer - Documentation
pmw_4.28-1_i386.deb Philip's Music Writer
pmx_2.7.0.ctan20131214-1_i386.deb Preprocessor for MusiXTeX
png-definitive-guide_20060430-1_all.deb PNG: The Definitive Guide
png23d_1.10-1_i386.deb Converts PNG images into three dimensional representations
png2html_1.1-5+b1_i386.deb transforms a PNG image to a web page
pngcheck_2.3.0-7_i386.deb print info and check PNG, JNG and MNG files
pngcrush_1.7.65-0.1_i386.deb optimizes PNG (Portable Network Graphics) files