Cweed.exe

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!

Cweed V4.23 2014 May 21 Now with support for C++, Lint and with Folder Scan, and works under Windows7 Also NumName human readable hash values…

Download Cweed4v23.exe self-extracting zip file.

Download Cweed4v23.zip zip file.

New in V4.23

 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 :

#ifndef __HEADER_FILE_NAME__

#define __HEADER_FILE_NAME__

... your code here...

#endif // __HEADER_FILE_NAME__

New in V4.2x

 “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.

New in V4.1

Minor bug fixes in Folder Report and new NumName.txt file “monsoons-megabyte”

New in V4.0

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.

New in V3.4

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.

New in V3.3

Added Windows7 support in the Win32Forth supplied in the Cweed package, also made the window re-paint after it is covered by another window.

New in V3.2

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”.

New in V3.0

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