![]() |
![]() |
![]() |
![]() |
![]() |
C Beautifier
If you need a C beautifier to further format the C code from the SDL Suite, do as follows.
Try the indent utility (courtesy of Joseph Arcaneaux), see Additional required tools and utilities for information how to obtain it.
The indent executable must be placed in your path.
In order to easily invoke indent from SCCD, insert the following statement in sccdUSER_CMD4 in the appropriate sccd.cfg file(s), assuming no other changes have been made to the sccd.cfg file(s):
For UNIX compiler environments:
sccdUSER_CMD4 = "indent -kr -l70 -i2 %p/%d/%f.c"For "DOS"-like compiler environments:
sccdUSER_CMD4 = "indent -kr -l70 -i2 %p\\%d\\%f.c"This setup gives a .c source file formatted according to rules very like the ones used in the Kernighan & Richie "C" book. It will also try to force lines to be shorter than 70 characters and will use 2 positions indentation in if/while/... statements.
A slightly more elaborate example:
sccdUSER_CMD4 = "indent -kr -l70 -br -nce -nlp -ci3 -i2 %p/%d/%f.c"
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |