tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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
> @@ -331,13 +331,11 @@
>       /*
>        * 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;
> -     extern char two;
>       struct foo three, *four;
>       double five;
>       int *six, seven;
> 
> 
> 


-- 
  \~~~~~.                The NetBSD Foundation
   \~~~~~'               Marc Balmer, Developer / Marketing
  NetBSD
     \                   mbalmer%NetBSD.org@localhost   http://www.NetBSD.org/


Home | Main Index | Thread Index | Old Index