[gnome-devel-docs] programming-guidelines: Section on whitespace
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] programming-guidelines: Section on whitespace
- Date: Tue, 6 Aug 2013 16:03:25 +0000 (UTC)
commit 8b90a22ec95bb5f66b634248d48987a0df6436a4
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Aug 6 17:20:40 2013 +0200
programming-guidelines: Section on whitespace
programming-guidelines/C/c-coding-style.page | 28 ++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/programming-guidelines/C/c-coding-style.page b/programming-guidelines/C/c-coding-style.page
index 3f7e002..003d6e3 100644
--- a/programming-guidelines/C/c-coding-style.page
+++ b/programming-guidelines/C/c-coding-style.page
@@ -461,4 +461,32 @@ align_function_arguments (first_argument,
</code>
</section>
+ <section id="whitespace">
+ <title>Whitespace</title>
+
+ <p>
+ Always put a space before an opening parenthesis but never after:
+ </p>
+
+ <code>
+/* valid */
+if (condition)
+ do_my_things ();
+
+/* valid */
+switch (condition) {
+}
+
+/* invalid */
+if(condition)
+ do_my_things();
+
+/* invalid */
+if ( condition )
+ do_my_things ( );
+ </code>
+ </section>
+
+
+
</page>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]