[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
indent
- Date: Wed, 9 Sep 98 08:45:03 -0600
- From: eric at skatter.USask.Ca (Eric Norum)
- Subject: indent
ian at airs.com wrote:
> From: Eric Norum <eric at skatter.USask.Ca>
> Date: Tue, 8 Sep 98 17:27:26 -0600
>
> I feel *really* queasy about letting a program like indent muck
> around with my source files. I just don't trust it to leave the
> logic of the program intact.
>
> In my experience GNU indent is quite reliable in that regard. It's
> not hard, after all: if you only change strings of whitespace
> (spaces, tabs, and newlines) then you can't mess up the logic of a
> C program. indent does also insert whitespace here and there, but
> only around character with special syntactic meaning, such as ( and
> =.
>
> The main problem I've had with GNU indent is that it sometimes
> mishandles multi-line comments.
- And it doesn't know about gcc extensions, particularly asm.
- And it doesn't know about C++.
- And it can get confused about when it's in/out of a comment.
- And it can get confused about when it's in/out of a string.
I've tried indent and other C `beautifiers' since back in the days
when they were called `cb'. There were always some source files that
they managed to `uglify', if not out and out damage.
Most of RTEMS sticks fairly closely to the K+R white book style. If
some BSP is written in such a form that you can't figure it out,
feel free to a) run indent on it yourself, or b) go through and
reenter it in your favorite style.
In case you haven't gathered from the tone of this message, I
*strongly* object to the use of style-modify programs in general, and
in particular to the use of such programs on source that is soon to
be released.
If it ain't broke don't fix it.
Stylistic differences don't count as `broke'.
---
Eric Norum eric at skatter.usask.ca
Saskatchewan Accelerator Laboratory Phone: (306) 966-6308
University of Saskatchewan FAX: (306) 966-6058
Saskatoon, Canada.
- Follow-Ups:
- indent
- From: valette at crf.canon.fr (VALETTE Eric)
- indent
- From: qqi at world.std.com (Quality Quorum)
- indent
- From: joel at oarcorp.com (joel at oarcorp.com)
- References:
- indent
- From: ian at airs.com (ian at airs.com)