[cairo-commit] cairo CODING_STYLE,1.4,1.5 ChangeLog,1.964,1.965

Carl Worth commit at pdx.freedesktop.org
Tue Aug 23 12:48:19 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo
In directory gabe:/tmp/cvs-serv19463

Modified Files:
	CODING_STYLE ChangeLog 
Log Message:

2005-08-23  Carl Worth  <cworth at cworth.org>

        * CODING_STYLE: Revise the description of indentation and tabs to
        be clear (I hope).


Index: CODING_STYLE
===================================================================
RCS file: /cvs/cairo/cairo/CODING_STYLE,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CODING_STYLE	7 Jul 2005 08:15:21 -0000	1.4
+++ CODING_STYLE	23 Aug 2005 19:48:17 -0000	1.5
@@ -24,14 +24,33 @@
 	if (condition)
 	    do_something ();
 
-Spaces or tabs (or a combination) can be used in indentation, but tabs
-must always be interpreted as 8 spaces. Code using single tabs for all
-indentation (expecting people to interpret tabs as 4 spaces) will not
-be accepted in cairo.
+This may be achieved with space characters or a combination of tab
+characters and space characters. It may not be achieved with tab
+characters exclusively (see below).
+
+Tab characters
+--------------
+The tab character must always be interepreted according to its
+traditional meaning:
+
+	Advance to the next column which is a multiple of 8.
+
+With this definition, even levels of indentation can be achieved with
+a sequence of tab characters, while odd levels of indentation may
+begin with a sequence of tab character but must end with 4 space
+characters.
+
+Some programmers have been misled by certain text editors into
+thinking that 4-space indentation can be achieved with tab characters
+exclusively by changing the meaning of tab character to be "advance to
+the next column which is a multiple of 4". Code formatted in this way,
+making an assumption of a fictitious 4-character-tab will not be
+accepted into cairo.
 
 The rationale here is that tabs are used in the code for lining things
 up other than indentation, (see the Whitespace section below), and
-changing the interpretation of tab from 8 characters will break this.
+changing the interpretation of tab from its traditional meaning will
+break this alignment.
 
 Braces
 ------

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo/ChangeLog,v
retrieving revision 1.964
retrieving revision 1.965
diff -u -d -r1.964 -r1.965
--- ChangeLog	23 Aug 2005 17:39:27 -0000	1.964
+++ ChangeLog	23 Aug 2005 19:48:17 -0000	1.965
@@ -1,5 +1,10 @@
 2005-08-23  Carl Worth  <cworth at cworth.org>
 
+	* CODING_STYLE: Revise the description of indentation and tabs to
+	be clear (I hope).
+
+2005-08-23  Carl Worth  <cworth at cworth.org>
+
 	* test/text-antialias-subpixel.c (draw): Clear to opaque white at
 	the beginning of the test so that the 0 alpha values in the
 	destination don't cause bizarre results.



More information about the cairo-commit mailing list