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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to