Welcome to the SourceClean - A tool that clean up #if/#ifdef/#ifndef in source code and make source code easier to read.
Some projects need to run on different platforms. Through #ifdef, the software can be compiled with GCC into software suitable for different platforms or with different functions according to conditions.
We can preserve the compiled intermediate files by adding -save-temps=obj -fdirectives-only to the compile options. The intermediate files can be processed by SourceClean to generate source files with ifdef/ifndef removed to make the source code easier to read and understand.
SourceClean starts as shown in the figure below.The following table provides a listing and brief descriptions of the tool:
Command | Description |
---|---|
Select input folder | Fill in an existing folder path or select a folder through the right "..." button. |
Select output folder | Fill in an existing folder path or select/create a folder through the right "..." button. |
Individual h files | Generate separate c and h files. |
C contains h file contents | The generated c file contains all the contents of the h files. |
With name comments | The generated c or h files will include file name comments. |
Input file extension | Input file format, usually *.i or *.ii |
Output file extension | Output file format, usually *.c or *.cpp. If Input file extension is same as output, then input files will be just copied into output folder. |
Source Clean button | Start or stop the source code cleaning process. |
Help button | Displays the main page of the help system. |
About button | Displays information about the program. |
License... button | Active the program with a valid license key. Will be gray after actived. |