I know, I realized all that yesterday. And I thought I could simply be lazy,
use indent and not twist my brain a little bit more ;-(
I'll pay more attention to my patche's style, and keep reminding/nudging me
whenever I slip.
I guess that the ASF style document could remove the gun indent part, as more
people like me could get "confused" by it ;-)
Thanks, and I kinda suspected it.
On Mon, Sep 10, 2001 at 09:07:42AM -0700, Doug MacEachern wrote:
> On Mon, 10 Sep 2001, Philippe M . Chiasson wrote:
>
> > how come when I ran:
> >
> > indent -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1
> >
> > as per http://dev.apache.org/styleguide.html
> >
> > I ended up with a huge diff from the main code
>
> interesting, i've never run indent before. the changes indent makes do
> not quite match "The Guidelines" section, for example:
>
> o There is no whitespace between a cast and the item modified (e.g., "(int)j" and
>not "(int) j").
>
> that indent command adds a space.
>
> indent changes comment alignment (not worried about that)
>
> this is bogus too:
> -PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p)
> +PerlInterpreter *modperl_startup(server_rec * s, apr_pool_t * p)
>
> indent sometimes changes indent from 4 spaces to 3, no idea why.
>
> changes like this are also lame:
> - MP_TRACE_m_do(
> - modperl_gtop_do_proc_mem_after(MP_FUNC ": perl_parse");
> - );
> + MP_TRACE_m_do(modperl_gtop_do_proc_mem_after(MP_FUNC ": perl_parse"););
>
> note the intro says:
> "The guidelines can be broken if necessary to acheive a clearer layout"
>
> why it makes changes like this i have no idea:
> MP_TRACE_i(MP_FUNC, "destroying interpreter=0x%lx\n",
> - (unsigned long)perl);
> + (unsigned long) perl);
>
> the former is correct.
>
> so, forget indent, just setup your editor and brain to follow the simple
> guidelines.
>
--
Philippe M. Chiasson <[EMAIL PROTECTED]>
Extropia's Resident System Guru
http://www.eXtropia.com/
Tonight I just can't face the Muzak.
-- Larry Wall
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
PGP signature