summaryrefslogtreecommitdiffstats
path: root/share/man/man9
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-09-10 14:48:38 +0000
committerrobert <robert@FreeBSD.org>2002-09-10 14:48:38 +0000
commitfef1f5b9727a9a2020d743b202b4d1e16054517a (patch)
treeb31dfb479778e0b950d6d17ad723cb64cf23a84a /share/man/man9
parentcf69565b5f5f60354e70b2fb8009da43de22c1ff (diff)
downloadFreeBSD-src-fef1f5b9727a9a2020d743b202b4d1e16054517a.zip
FreeBSD-src-fef1f5b9727a9a2020d743b202b4d1e16054517a.tar.gz
Add a paragraph which should clarify the separation of asterisks
and adjacent tokens in declarations. The added text was originally a single sentence I wrote and which was heavily modified and extended by Bruce Evans. This clarification attempt originates from differing usage of the 'restrict' type-qualifier. Although various documents documents dicussing the C Programming Language put a space between an asterisk and the 'restrict' keyword, including the C99 standard (at least the n869.txt draft) and other ISO/IEC JTC1/SC22/WG14 documents, the IEEE Std 1003.1-2001 document does not separate them. Discussed with: bde Requested by: tjr Separation using a single space also liked by: mike
Diffstat (limited to 'share/man/man9')
-rw-r--r--share/man/man9/style.96
1 files changed, 6 insertions, 0 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index c48c32f..2627e85 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -185,6 +185,12 @@ Enumeration values are all uppercase.
enum enumtype { ONE, TWO } et;
.Ed
.Pp
+In declarations, do not put any whitespace between asterisks and
+adjacent tokens, except for tokens that are identifiers related to
+types. (These identifiers are the names of basic types, type
+qualifiers, and typedef-names other than the one being declared.)
+Separate these identifers from asterisks using a single space.
+.Pp
When declaring variables in structures, declare them sorted by use, then
by size, and then in alphabetical order.
The first category normally does not apply, but there are exceptions.
OpenPOWER on IntegriCloud