TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jari J. Laaksonen
from: Bob Stout
date: 2003-07-27 15:48:00
subject: Re: Bob`s question

From: rbs{at}snippets.org
To: c_echo{at}yahoogroups.com

On Sun, 27 Jul 2003, Jari J. Laaksonen wrote:

> > I checked the web site and it looks as if this only handles
> > indentation and space/tab usage. Is this correct?
>
> AStyle does more than just indenting. I copy here just the predefined
> styling options which will give you a hint what it can do:
>
>     --style=ansi
>     ANSI style formatting/indenting.
>
>     --style=kr
>     Kernighan&Ritchie style formatting/indenting.
>
>     --style=gnu
>     GNU style formatting/indenting.
>
>     --style=java
>     Java mode, with standard java style formatting/indenting.
>
>     --style=linux
>     Linux mode (i.e. 8 spaces per indent, break definition-block
>     brackets but attach command-block brackets.
>
> It has lots of individual indenting and formatting options, but
> because I haven't used C-Clearly, I cannot compare these.

OK, I downloaded it and browsed through it a bit. As far as I can see, it
uses compile time options to set the styles it can enforce. Is this
correct?  If so, this presents a real concern to software QA types, and
particularly in an ISO-9000 environment. For the standards to be
considered secure and enforceable, only the QA folks can have write access
to the utility. This is because the style options are encoded, and
therefore effectively shrouded, by inclusion in the executable. With a
system configured by external human-readable definition files, the
template can be easily checked to assure it hasn't changed. Using a
template which actually resembles the formatted source further facilitates
rapid visual verification. Better yet would be to put the configuration
template under version control to automatically log any changes made to
it.

In short, AStyle is interesting and no doubt effective. For personal use,
it's obviously just a matter of taste. However, for free vs. $30, I would
still choose C-Clearly to help enforce programming departmental coding
standards. Since a large portion of the work I do includes consulting with
companies on such things, it only makes sense for me to use C-Clearly
myself. For companies with really deep pockets, there are lots of more
expensive tools, but $30 easily fits the budget of most embedded systems
houses, which comprise the bulk of my client base.

-------------------------------------------------------------
Consulting: http://www.MicroFirm.biz/
Web graphics development: http://Image-Magicians.com/
Software archives: http://snippets.org/snippets/
Audio and loudspeaker design:
  http://LDSG.snippets.org/
  http://www.diyspeakers.net/

--- SoupGate-Win32 v1.05
* Origin: rbs{at}snippets.org (2:292/516.666)
SEEN-BY: 633/267 270
@PATH: 292/516 854 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.