1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<section id="xmlroff-code-rules">
<sectioninfo>
<title>Rules of the Code</title>
<subtitle>xmlroff Code Rules</subtitle>
<abstract><para>Coding conventions for xmlroff code</para></abstract>
</sectioninfo>
<section id="abbreviations">
<title>Abbreviations</title>
<para>
The following abbreviations are used in file, variable, function, and
parameter names.
</para>
<note>
<para>
Formatting Object and property names are <emphasis>NOT</emphasis> abbreviated
when used in class and property names. For example,
“block-progression-dimension” is abbreviated to
“bpdim” in function names, but when used as a property
name (in the GObject sense), it remains
“block-progression-dimension”
</para>
</note>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Abbreviation</entry>
<entry>Term</entry>
</row>
</thead>
<tbody>
<row>
<entry>bp</entry>
<entry>block-progression</entry>
</row>
<row>
<entry>bpd</entry>
<entry>block-progression-direction</entry>
</row>
<row>
<entry>bpdim</entry>
<entry>block-progression-dimension</entry>
</row>
<row>
<entry>cond</entry>
<entry>conditional</entry>
</row>
<row>
<entry>condity</entry>
<entry>conditionality</entry>
</row>
<row>
<entry>expr</entry>
<entry>expression</entry>
</row>
<row>
<entry>ip</entry>
<entry>inline-progression</entry>
</row>
<row>
<entry>ipd</entry>
<entry>inline-progression-direction</entry>
</row>
<row>
<entry>ipdim</entry>
<entry>inline-progression-dimension</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="compare-pointers-to-null">
<title>Compare pointers to NULL</title>
<para>
From Section 17.1, Boolean Expressions, of “Code Complete”
by Steve McConnell.
</para>
<para>For pointers, write:
<programlisting>while (buffer != NULL) ...</programlisting>
rather than
<programlisting>while (buffer) ...</programlisting>
</para>
</section>
</section>
|