commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/geas STANDARDS


From: Reinhard Mueller
Subject: gnue/geas STANDARDS
Date: Mon, 14 May 2001 09:08:06 -0700

CVSROOT:        /cvs
Module name:    gnue
Changes by:     Reinhard Mueller <address@hidden>       01/05/14 09:08:06

Modified files:
        geas           : STANDARDS 

Log message:
        Added chapters about comments in headers and about defensive programming

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/STANDARDS.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gnue/geas/STANDARDS
diff -u gnue/geas/STANDARDS:1.4 gnue/geas/STANDARDS:1.5
--- gnue/geas/STANDARDS:1.4     Wed May  9 12:43:58 2001
+++ gnue/geas/STANDARDS Mon May 14 09:08:06 2001
@@ -29,6 +29,16 @@
 Additional hints on parameters for indent to make the code cleaner are
 always appreciated.
 
+
+Defensive programming
+
+Never rely on anything. Always expect that a parameter can have any value,
+even NULL. If a certain value is not valid for a parameter and may not
+occur in practice, use g_assert to check it. If a certain value is not valid
+for a parameter but can occur in pracice, use g_return[_value]_if_fail
+to check it.
+
+
 Namespaces
 
 Structures should be generally private to a module.
@@ -38,8 +48,16 @@
 is foo-bar.c and the header for the public functions is foo-bar.h.
 Functions that belong to the module foo but are not related to any specific
 structure (e.g. FooBar) should start with only foo_.
+
+
+Comments in Header Files
+
+Header files and IDL files are commented for use with doxygen
+(www.doxygen.org).
+A detailled description of how comments should be done will follow sometime.
+
 
-Comments
+Comments in Sourcecode
 
 Every group of functions should be introduced with a comment like
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]