You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2003/01/21 22:46:06 UTC

[PATCH] Style police for mod_specweb99.c

Summary of the patch :
1. convert tabs to spaces
2. try to follow apache styleguide

[ Please note that there might be long lines because of the old style
followed in mod_specweb99.c ]

Thanks
-Madhu

 <<mod_specweb99.patch.txt>> 

Re: [PATCH] Style police for mod_specweb99.c

Posted by Dirk-Willem van Gulik <di...@webweaving.org>.

On Wed, 22 Jan 2003, Greg Ames wrote:

> MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> > Summary of the patch :
> > 1. convert tabs to spaces
>
> hmmm, I wonder how I missed 'em?  IIRC I used "expand -i -t4 mod_specweb99.c"
>
> > 2. try to follow apache styleguide
>
> I plan on reviewing this, but I'm pretty weak on style other than not liking
> tabs.  Other eyeballs would be appreciated.

Hmm; there used to be a .ident.pro file in virtually all asf source; so
you can do 'indent' to enforce the spec.

Checking..

Dw


Re: [PATCH] Style police for mod_specweb99.c

Posted by Greg Ames <gr...@apache.org>.
MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> Summary of the patch :
> 1. convert tabs to spaces

hmmm, I wonder how I missed 'em?  IIRC I used "expand -i -t4 mod_specweb99.c"

> 2. try to follow apache styleguide

I plan on reviewing this, but I'm pretty weak on style other than not liking 
tabs.  Other eyeballs would be appreciated.

Thanks for the patch, Madhu.
Greg


Re: [PATCH] Style police for mod_specweb99.c

Posted by Greg Ames <gr...@apache.org>.
MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> Summary of the patch :
> 1. convert tabs to spaces
> 2. try to follow apache styleguide

Overall, a big improvement...thanks much!

nitpicky comments follow:

> --- mod_specweb99.c	15 Jan 2003 16:15:02 -0000	1.18
> +++ mod_specweb99.c	21 Jan 2003 21:39:14 -0000

>  static apr_int16_t
>  getCADFile(struct server_rec *sv, struct request_rec *r,
> -         struct specweb99_module_data * _my); 
> +struct specweb99_module_data * _my);

ooops...the function name should be on the same line with the return type, and 
the struct arg should line up with the one above it.

> +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
> +                     "mod_specweb: ap_pass_brigade failed for buffer '%s'",
> +                     buf);
>      }
> -}				/* returnHTMLPageWithBuffer */
> +}

I prefer keeping the name on the end of a the function which is over a page 
long.  But the tabs gotta go.

Now I see why there are still tabs.  expand -i only gets rid of leading tabs - 
too conservative.

>      }
> -}				/* returnHTMLPageWithFile */

same here.

>  static void specweb99_child_init(apr_pool_t * p, server_rec *s)
>  {

> +         * (e.g. think ~user and other redirect cases with clobber the
> +         * concept of a docroot).
> +         */
>      };
> -}				/* specweb99_module_init */
> +}

yikes! this one was the wrong label - an apparent cut'n'paste-o.  OK, it goes.

>      returnHTMLPageWithBuffer(r, buf, len);
>  
> -}				/* customadscan */
> +}

this one should stay, minus the tabs (long function).

Greg