Add include statements within the guards of a header file
GPL-2.0 License
Utility that can add #include
s to .c
, .cpp
or .h
files, with relatively smart placement.
addinclude my.c stdin
addinclude my.cpp memory
addinclude my.h stdin
Changes my.h from:
#ifdef blabla
#endif
To:
#ifdef blabla
#include <stdin.h>
#endif
You can place includes at the very top of the file with -t
. There are several other options.
-c++
flag for not expanding include names when adding them to files not ending with .cpp
.memory
will not be expanded to memory.h
.