Rules of the Code

xmlroff Code Rules

Abstract

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”

Abbreviation Term
bp block-progression
bpd block-progression-direction
bpdim block-progression-dimension
cond conditional
condity conditionality
expr expression
ip inline-progression
ipd inline-progression-direction
ipdim inline-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) ...