Topic: C source Checker (1 of 3), Read 119 times
Conf: Program develop.,Color syntax
From: Olivier Goossens Bara
Date: Wednesday, March 14, 2001 03:02 PM

Im looking for some tool that can re-format a C source code

1- Re-indenting
2- re-organize brackets :

Example 1
for (i=0;i c=i; }

will become

for (i=0;i {
a=i;
c=i;
}

Example 2
for (i=0;i a=i;

will become

for (i=0;i {
a=i;
}


Do you know such tool ?
Can vedit do that ?

Thank for any help

 


Topic: Re: C source Checker (2 of 3), Read 128 times
Conf: Program develop.,Color syntax
From: Christian Ziemski
Date: Wednesday, March 14, 2001 04:16 PM

I made a short search for "C beautifier" on google and got many of
them for Linux and Windows.
The main problem is to choose one :-)

Maybe it's possible to write a macro for VEDIT that does the same.
But I doubt that's an easy task.
And if there are special tools already available...

Christian

 


Topic: C source Checker (3 of 3), Read 139 times, 2 File Attachments
Conf: Program develop.,Color syntax
From: Ian Binnie
Date: Thursday, March 15, 2001 04:06 PM

There are 2 main styles in formatting C programs (and variants).

I use the attached macros to convert other programs to my preferred style, and also to tidy up.

Depending on your preferences these may be useful.

There is also a cut down version I use on Vedit macros.

 
FRMT_C.VDM (7KB)
 
FRMT_V.VDM (3KB)