Rules of the Code

xmlroff Code Rules — Coding conventions for xmlroff code

Abbreviations

The following abbreviations are used in file, variable, function, and parameter names.

Note

Formatting Object and property names are NOT 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”

AbbreviationTerm
bpblock-progression
bpdblock-progression-direction
bpdimblock-progression-dimension
condconditional
condityconditionality
exprexpression
ipinline-progression
ipdinline-progression-direction
ipdiminline-progression-dimension

Compare pointers to NULL

From Section 17.1, Boolean Expressions, of “Code Complete” by Steve McConnell.

For pointers, write:

while (buffer != NULL) ...

rather than

while (buffer) ...