Cweed4 is a C source file weeder for Windows, 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 (weeds) 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, but please make a backup before using.
Now with support for Barr Coding Standard (2018) Rules 3.1 Spaces.
New in Cweed4 V4.02
The file Cweed4_script.f is now loaded when running the Barr 3.1 function.
This allows the rules to be changed and reloaded without re-compiling Cweed.
If the file Cweed4_script.f is not found in the directory where Cweed4 is running, the default file is used
i.e. the one that existed when Cweed4 was compiled.
New in Cweed4 V4.01
New name – Cweed4 . Searching for “Cweed” online finds lots of sites about “weed” – “Cweed4” is easier to find. The version has also been reset to Cweed4 V4.01.
Added a custom file Cweed4.script for the Barr Coding Standard (2018) – this allows modifications to be made without recompiling Cweed4.
Download Cweed4v02.zip zip file.
Added F2 key to add/remove "interior spaces" : [i] <--> [ i ] etc.
Press F2 to apply the Barr Coding Standard (2018) Barr Coding Standard (2018) Rules 3.1 Spaces a, g, h, i and j.
Added source files for Win32Forth, so that source for system words can be viewed.
Download Cweed4v24.exe self-extracting zip file.
Download Cweed4v24.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