Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.04 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.04 KB

msfa Build Status

msfa loosely base on Nettention's ChangeIncludeHeaderBackslashToSlash and this Perl one-liner:

perl -i.bak -pe 'tr!\\!/! if /^\s*#\s*include\b/' *.cpp

If you don't have Perl:

find .  -type f -name \* | xargs grep '#include' | grep '\\' |awk -F: '{print $1}'|sort| uniq | xargs -n1 perl -i.bak -pe 'tr!\\!/! if /^\s*#\s*include\b/'

This tool changes backslash symbol \ to slash symbol / in your C or C++ include header file statements. For example:

#include <SFML\Graphics.hpp>

will be changed to:

#include <SFML/Graphics.hpp>

This tool works all C/C++ source files in the directory you specify.

Usage

msfa <your directory> <your file extensions>

Example:

msfa /home/maidis/BattleCity-master/ cpp,h