From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
Takashi Iwai <tiwai@suse.de>, Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>,
perex@suse.cz, alsa-devel@alsa-project.org, pshou@realtek.com.tw
Subject: Re: CodingStyle
Date: Tue, 05 Sep 2006 18:40:27 +0200 [thread overview]
Message-ID: <44FDA87B.5030902@s5r6.in-berlin.de> (raw)
In-Reply-To: <20060905080813.GE1958@elf.ucw.cz>
Pavel Machek wrote:
> +Avoid extra spaces around ! operator, and do not place spaces around (s.
How about:
Avoid extra spaces after the ! operator.
Do not place spaces around parentheses.
Because "foo && !bar" is certainly OK.
Or more draconian for the former and less so for the latter rule:
Do not put whitespace between any of the unary operators and
their operand.
It is usually unnecessary to have whitespace around parentheses
as part of expressions, around brackets, or around the operators
. and ->.
Rule 1 certainly applies likewise to ++, --, unary +, unary -, !, ~,
(typecast), unary *, unary &, sizeof.
Rule 2 applies to all of ( ), [ ], ., ->, except where line breaks and
indentation warrant whitespace, or where whitespace helps to read
expressions with more levels of braces. Although the latter should be
avoided anyway.
--
Stefan Richter
-=====-=-==- =--= --=-=
http://arcgraph.de/sr/
next prev parent reply other threads:[~2006-09-05 16:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 12:37 sound/pci/hda/intel_hda: small cleanups Pavel Machek
2006-08-31 13:01 ` Takashi Iwai
2006-08-31 13:39 ` Pavel Machek
2006-08-31 14:53 ` Takashi Iwai
2006-08-31 22:29 ` Pavel Machek
2006-08-31 18:04 ` CodingStyle (was: Re: sound/pci/hda/intel_hda: small cleanups) Randy.Dunlap
2006-09-02 23:15 ` Pavel Machek
2006-09-03 4:30 ` Randy.Dunlap
2006-09-05 8:08 ` Pavel Machek
2006-09-05 15:26 ` Takashi Iwai
2006-09-05 15:43 ` Randy.Dunlap
2006-09-06 7:23 ` Ingo Oeser
2006-09-06 13:51 ` Pavel Machek
2006-09-06 22:22 ` Chase Venters
2006-09-05 16:40 ` Stefan Richter [this message]
[not found] <90e6ba4fc2a4f7dd3c04971cb0fa@google.com>
2010-12-11 7:18 ` CodingStyle HarryWei
2013-04-18 10:48 CodingStyle Opensource [Anthony Olech]
2013-04-18 13:41 ` CodingStyle Guenter Roeck
2013-04-18 16:06 ` CodingStyle Opensource [Anthony Olech]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44FDA87B.5030902@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=akpm@osdl.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=perex@suse.cz \
--cc=pshou@realtek.com.tw \
--cc=rdunlap@xenotime.net \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome