Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2002 14:33:10 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/share/man/man9 style.9
Message-ID:  <200208211833.g7LIXAv0001530@khavrinen.lcs.mit.edu>
In-Reply-To: <200208210658.g7L6wMxu017178@freefall.freebsd.org>
References:  <200208210658.g7L6wMxu017178@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 20 Aug 2002 23:58:22 -0700 (PDT), Warner Losh <imp@FreeBSD.org> said:

>   Suggest that function prototypes in kernel headers be alphabetical,
>   unless there's a compelling reason to deviate.
  
It should probably suggest that prototypes visible to user programs be
first blocked in order of increasing namespace before being
alphabetized.  It is more readable to have:

	#if FOO_AND_BAR_VISIBLE
	int bar(...);
	int foo(...);
	#endif

	#if BAZ_VISIBLE
	int baz(...);
	#endif

	#if FOO_BAR_AND_QUUX_VISIBLE
	int quux(...);
	#endif

...rather than:

	#if FOO_AND_BAR_VISIBLE
	int bar(...);
	#endif
	#if BAZ_VISIBLE
	int baz(...);
	#endif
	#if FOO_AND_BAR_VISIBLE
	int foo(...);
	#if FOO_BAR_AND_QUUX_VISIBLE
	int quux(...);
	#endif
	#endif

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208211833.g7LIXAv0001530>