Skip to content
 
 

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansi-format

C/C++ Code formatting tool that converts modern "C++" comments <'//'> to their ANSI-styled equivalent <'/* ... */'>, keeping original identation width

Example

Original source:

// This is an integer wrapper
// This comment block is supposed to describe
// this class, but this class is totally trivial
// and boring
template<typename I>
class Integer
{
    ...
};

Will be formatted to

/*
* This is an integer wrapper
* This comment block is supposed to describe
* this class, but this class is totally trivial
* and boring
*/
template<typename I>
class Integer
{
    ...
};

Usage

ansi-format [-i/--inplace] [-v/--verbose] [SourceFile(s) ...]

Flags

-v / --verbose: enable verbose output to stderr

-i / --inplace: edit files inplace (simillar to sed or clang-format)

-h / --help: display help

Author

Ron Shabi, 2024 <ron@ronsh.net>

About

C/C++ code formatting tool: convert modern '//' comments to ANSI '/* ... */' style

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages