From 3b128853146afe4034bc45f1ad2eb489ddee9840 Mon Sep 17 00:00:00 2001 From: Robert Drehmel Date: Tue, 10 Sep 2002 14:48:38 +0000 Subject: [PATCH] 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 --- share/man/man9/style.9 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index c48c32fc9318..2627e85cefea 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.