Adding Splint and UnCrustify to a UST Lab Computer containing TextPad and MinGW
1. Insert the CD Labelled UnCrustify and Splint.
2. Copy the files to the corresponding directories in C:\MinGW
Copy the files in the \bin directory into the C:\MinGW\bin directory
Copy the files in the \lib directory into the C:\MinGW\lib directory
Make a new directory C:\MinGW\imports
Copy the files in the \imports directory into the C:\MinGW\imports directory
Make a new directory C:\MinGW\src
Copy the files in the \src directory into the C:\MinGW\src directory
Configuring TextPad
I. In the View menu, Status Bar, Document Tabs, Vertical Scroll Bar, Horizontal Scroll Bar, and Line Numbers should be checked.
II. In the View menu, in the Toolbars submenu, Standard and Tools should be checked.
III. In the Configure menu, in the Document Classes submenu, in the C/C++ sub-submenu, in the syntax item:
Syntax definition file: c.syn, Check Enable syntax highlighting.
IV. A.
1. Copy config.xml to C:\Documents and Settings\Default User\Application Data\Helios\TextPad\5.0.
2. Double click on TextPad.reg to insert the tools commands into the registry.
OR
IV. B. In the Configure menu, in the Preferences submenu, in the Tools area you will need to make 6 additions. Each time you make an addition, you will need to highlight Tools, the Click Add▼, then either Program or DOS Command, then enter the program or command, then click Open or OK, then modify the what appears on the screen, then click Apply. After each addition, you will need to click on the added item to complete the configuration. Here are the 6 new items (in addition to the 3 Java items that should already be configured):
1. Add Menu Separator. Click Apply.
2. Add Program C:\MinGW\bin\gcc.exe. Rename "Compile C". Click Apply.
Click on Compile C, make the following on-screen entries:
Command: C:\MinGW\bin\gcc.exe
Parameters: $File -o $BaseName
Initial Folder: $FileDir
Boxes Checked: Capture output, Sound alert when completed
Regular Expression: ^\(\(\(.[^:]\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
File: 1
Line: 4
Column:
3. Add Dos Command $BaseName. Rename "Run C Application". Click Apply.
Click on Run C Application, make the following on-screen entries:
Command: cmd.exe
Parameters: $BaseName
Initial Folder: $FileDir
Boxes Checked: (none)
(others grayed out)
4. Add Dos Command $BaseName. Rename "Run C Application". Click Apply.
Click on Run C Application, make the following on-screen entries:
Command: cmd.exe
Parameters: $BaseName
Initial Folder: $FileDir
Boxes Checked: Prompt for parameters
(others grayed out)
5. Add Program C:\MinGW\bin\Uncrustify.exe. Rename "cb (Uncrustify)". Click Apply.
Click on cb (Uncrustify), make the following on-screen entries:
Command: C:\MinGW\bin\Uncrustify.exe
Parameters: -f $File -c c:\MinGW\bin\ben.cfg -l c -o $BaseName.cb.c
Initial Folder: $FileDir
Boxes Checked: Capture output, Sound alert when completed
Regular Expression: ^\(\(\(.[^:]\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
File: 1
Line: 4
Column:
6. Add Program C:\MinGW\bin\splint.exe. Rename "lint (Splint)". Click Apply.
Click on lint (Splint), make the following on-screen entries:
Command: C:\MinGW\bin\splint.exe
Parameters: $File -IC:\MinGW\include -IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I$FileDir -larchpath C:\MinGW\lib -S<C:\MinGW\imports> -lclimportdir <C:\MinGW\imports> -nof -sys-dirs C:\MinGW
Initial Folder: $FileDir
Boxes Checked: Capture output, Sound alert when completed
Regular Expression: ^\([^(]+\)(\([0-9]+\)):
File: 1
Line: 2
Column: