download CppCommentRemover

  • by

Author: Tomasz Ostrowski
Size: 445 KB
License: Freeware
Requires: Win 10 / 8 / 7 / Vista / XP
Downloads: 1982 times

CppCommentRemover is a portable app that allows comment removal from C/C++ source code.

The author was motivated in part to his working with medium-to-large size third party code (pjsip, baresip), it was written to help with comparing the source code of different version of projects. He notes that one annoying thing is CVS tags in pjsip source code, as once the code is checked in and then checked out from a repository they are expanded/rewritten creating differences in every single file. Copyright notices are also annoying similarly as they often may be a single detail changing between software versions from different years.

CppCommentRemover will help with processing files recursively from a selected folder, removing comments containing selected strings or all comments, as well as preserving file timestamps (by default) – original timestamps make comparing source easier. Files are processed in place (overwritten) – make sure to not work on the main copy of a given project.

CppCommentRemover has been tested on projects based on both pjsip (300+ kLOC) and baresip, but the handling of some rarely used language constructions are omitted (continuation inside single-line comments). This fact may cause unexpected when the source code is not valid (syntax errors). Preprocessor expressions are also not evaluated thus text from “#if 0” blocks are processed, and it has a higher chance to trigger unexpected behavior as it may contain unclosed block comment.

Version History for CppCommentRemover:
-added option to skip removing comments longer than N bytes (Portaudio: CVS Id tags mixed with copyright notices that should be kept)

download CppCommentRemover

Leave a Reply

Your email address will not be published. Required fields are marked *