Note that this is a coding standard, not a style guide. I don't care
much about which style you use, _as_long_as_ the result is correct. The
patch was intended to explain what "correct" means wrt BOOLs in GNUstep.
I've attached a revised patch that will hopefully make this clearer.
- Alexander Malmberg
------------------------------------------------------------------------
Index: Documentation/coding-standards.texi
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Documentation/coding-standards.texi,v
retrieving revision 1.8
diff -u -r1.8 coding-standards.texi
--- Documentation/coding-standards.texi 22 Sep 2003 03:00:21 -0000 1.8
+++ Documentation/coding-standards.texi 1 Feb 2004 03:38:53 -0000
@@ -63,6 +63,7 @@
* Variable Declaration::
* Object Persistance::
* Contributing::
+* BOOLs::
@end menu
@c ******************************************************************
@@ -348,7 +349,7 @@
@c ******************************************************************
address@hidden Object Persistance, Contributing, Variable Declaration, Top
address@hidden Object Persistance, BOOLs, Variable Declaration, Top
@section Object Persistance
The standard method of saving and restoring object information in GNUstep
@@ -361,7 +362,18 @@
should be read.
address@hidden Contributing, , Object Persistance, Top
address@hidden
******************************************************************
address@hidden BOOLs, Contributing, Object Persistance, Top
address@hidden BOOLs
+
+When using BOOL values, care should be taken to ensure to ensure that all
+non-zero values are treated as true.
+
+Methods that return BOOL values should return only YES or NO to avoid
+triggering problems in code that treats only YES as true.
+
+
address@hidden Contributing, , BOOLs, Top
@section Contributing
Contributing code is not difficult. Here are