From: Mike Frysinger Date: Fri, 19 Aug 2011 18:31:40 -0400 Subject: [U-Boot] nested defines coding style In-Reply-To: <4E4EDC5E.6000309@myspectrum.nl> References: <1313514195-27345-1-git-send-email-marek.vasut@gmail.com> <201108192347.23624.marek.vasut@gmail.com> <4E4EDC5E.6000309@myspectrum.nl> Message-ID: <201108191831.40960.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, August 19, 2011 17:57:50 Jeroen Hofstee wrote: > I couldn't (easily) find a doc for coding style regarding defines in > u-boot. I commenly don't indent preprocessor macro's, but when reading > code from some one else code I tend to prefer single space indentation > for these (before the #). Is there a standard for this in u-boot? i prefer: #if 1 # if 2 # if 3 ... # else ... # endif # endif #endif but doing this without the space after the "#" is acceptable. these two styles are your only options, but i dont believe there is a rule as to which you pick other than "if you're the maintainer of the code in question, use whichever you like". also, please dont hijack threads. start a new e-mail from scratch ... dont just hit "reply" to any old e-mail and erase the subject/body. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110819/c5c4a8f7/attachment.pgp