SF.net SVN: geany: [2273] trunk/HACKING

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Feb 22 13:16:13 UTC 2008


Revision: 2273
          http://geany.svn.sourceforge.net/geany/?rev=2273&view=rev
Author:   ntrel
Date:     2008-02-22 05:16:07 -0800 (Fri, 22 Feb 2008)

Log Message:
-----------
Add note about writing ISO C90 code and not using C++ style comments.

Modified Paths:
--------------
    trunk/HACKING

Modified: trunk/HACKING
===================================================================
--- trunk/HACKING	2008-02-22 12:30:52 UTC (rev 2272)
+++ trunk/HACKING	2008-02-22 13:16:07 UTC (rev 2273)
@@ -53,14 +53,17 @@
 so we always declare variables before statements. You can use
 -Wdeclaration-after-statement in your ./configure CFLAGS to warn about
 this.
+You should also try to write ISO C90 code for portability, so always
+use C /* */ comments and function_name(void) instead of function_name().
+This is for compatibility with various Unix-like compilers.
 
 Style
 -----
 We use a tab width of 4 and indent completely with tabs not spaces.
-To comment small blocks of code we use the C++ // comments and for
-functions descriptions or longer explanations of code, the multiline
-comment /* */ should be used. In any case, the more comments are in your
-code the better.
+Use the multiline comment /* */ to comment small blocks of code,
+functions descriptions or longer explanations of code, etc. C++ single
+line comments will cause portability issues. The more comments are in
+your code the better.
 Lines should not be longer than about 100 characters and after 100
 characters the lines should be wrapped and more indented than the first
 line to highlight that the line is continued. We avoid putting spaces


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list