Cweed4.exe

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.

cweed4v04.7z 2022 Jan 14

To run Cweed4, download the 7z file, unzip it and run go.bat or Cweed4.exe


It is designed only to modify whitespace, but please make a backup before using.

Cweed4 V4.04 2022 Jan 14 Documentation PDF file

Cweed4 V4.04 2022 Jan 14.7z  7zip file.

Cweed4 V4.04 2022 Jan 14.zip  zip file.

Now with support for Barr Coding Standard (2018) Rules 3.1 Spaces.

 

New in Cweed4 V4.03

Added ctrlQ to show and fix lowercase characters after a '// ' comment

Increased Barr Coding Standard buffer size to $400 to allow longer lines to be processed.

 

New in Cweed4 V4.02 2021 Nov 11

Changes to Cweed4_script.f to improve the Barr 3.1 coding rules.

Previous versions of Cweed4 V4.02 could be used if you simply update the Cweed4_script.f file, but this causes an “interesting” version control effect :

Cweed4.exe is compiled with the version of Cweed4_script.f that exists at the time that it is created. If this is different to the Cweed4_script that exists when Cweed4.exe is run you can get a different behaviour if you delete Cweed4_script.f (because it would use the pre-compiled words from an earlier Cweed4_script.f file).

Not sure how to handle this yet… Maybe compare a hash of the built in script to the script file, and issue a warning if they are different… Watch this space :-)

 

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 Cweed4v01.exe self-extracting zip files no longer work.

Cweed4 V4.03 2021 Dec 01 Documentation PDF file

Cweed4 V4.03 2021 Dec 01.7z  7zip file.

Cweed4 V4.03 2021 Dec 01.zip  zip file.

Download Cweed4v02.zip zip file.

New in V4.25

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.

Cweed V4.24 2020 Nov 13 7z file.

Now with support for C++, Lint and with Folder Scan, and works under Windows 7/8/10. Also NumName human readable hash values…

Download Cweed4v24.exe self-extracting zip file.

Download Cweed4v24.zip zip file.

New in V4.24

Now packaged with Win32Forth6v05H 2019 Mar 02 which fixes a bug that forced its window to be too small.

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