Cweed is a C source file weeder written in Win32Forth.
It only changes whitespace (formatting) and does not otherwise change the content of the file. This is analogous to weeding a garden, where the plants are left untouched but the bits between may be seriously modified.
Cweed is an experiment in specifying a coding standard in the form of an executable program.
It is designed only to modify whitespace, please make a backup before using at your own risk!
Download Cweed4v23.exe self-extracting zip file.
Download Cweed4v23.zip zip file.
Indenting now ignores #ifdef, #ifndef, #else and #endif if the line contains double underscores : __IGNORE_THISE_INDENT__
This is to prevent indentation in *.h files with the usual redefinition macro format, below.
Please make sure any #else and #endif has a double underscore in a comment on the same line :
... your code here...
#endif // __HEADER_FILE_NAME__
“Select File” now defaults to All Files *.*, made INDENT_SPACES changeable
V4.21 adds 'F' for ShowFolder with filter for *.c and *.h only, and fixes a bug with #tabs in ShowFolder.
Minor bug fixes in Folder Report and new NumName.txt file “monsoons-megabyte”
Fixed lack of update when the Cweed window is covered, added NumName text feature to give the file MD5 hash a human readable form – see NumName.f for details.The NumName.txt file list of words is now precompiled.
Fixed lack of update when the Cweed window is covered, added NumName text feature to give the file MD5 hash a human readable form – see NumName.f for details.
Fix to non comment block lines being indented if they start with a ‘*’.
Folder report added – select a file, then click on Show Folder to perform a scan of all C, C++ and header files in the containing folder.
V3.21 fixes a bug in the number of tabs reported in Show Folder
New in V3.1
Lint report shows numbers of “//lint –save” and “//lint –restore” strings in the file.
Also checks for “-e” after a “–restore” and a one or more spaces between the “//” and “lint”.
Bug fixes to namespace indentation.
Adding 2-space indentation for public: , private: and protected: .
Adding CRC32 and MD5 values for the file.
Block comments indented by one space.
Configuration options are now at the top of file Cweed.f .
Howerd Oakford www.inventio.co.uk