Marc Balmer | 19 Feb 2012 23:28
Picon

Re: small proposed style change

Am 19.02.12 23:25, schrieb David Holland:
> The style rules should not be suggesting things that no longer
> constitute good practices, if they ever did. Any objections?

yes.  Using extern declarations is fine.  They don't necessarly need to
go to a separate inlude file.

No objections to the file naming part, though.

> 
> 
> Index: share/misc/style
> ===================================================================
> RCS file: /cvsroot/src/share/misc/style,v
> retrieving revision 1.49
> diff -u -r1.49 style
> --- share/misc/style	1 Sep 2011 09:33:01 -0000	1.49
> +++ share/misc/style	19 Feb 2012 22:23:37 -0000
>  <at>  <at>  -331,13 +331,11  <at>  <at> 
>  	/*
>  	 * When declaring variables in functions declare them sorted by size,
>  	 * then in alphabetical order; multiple ones per line are okay.
> -	 * Function prototypes should go in the include file "extern.h".
> -	 * If a line overflows reuse the type keyword.
> +	 * Function prototypes and external data declarations should go in a
> +	 * suitable include file. If a line overflows reuse the type keyword.
>  	 *
>  	 * DO NOT initialize variables in the declarations.
>  	 */
> -	extern u_char one;
(Continue reading)

Alan Barrett | 20 Feb 2012 06:55
Gravatar

Re: small proposed style change

On Sun, 19 Feb 2012, David Holland wrote:
>-	 * Function prototypes should go in the include file "extern.h".
>-	 * If a line overflows reuse the type keyword.
>+	 * Function prototypes and external data declarations should go in a
>+	 * suitable include file. If a line overflows reuse the type keyword.

That looks reasonable to me.  As with most other things, there will
sometimes be reasonsto violate the style guide.

BTW, we usually put two spaces after a full stop.

--apb (Alan Barrett)


Gmane