Things to know

Rules of the Code
Abbreviations
Compare pointers to NULL
Directory Structure
Directory structure
xmlroff
Anatomy of a Formatting Object header file
Initial comment
Initial housekeeping
GObject typedefs
GObject #defines
GObject functions
Non-property functions
Property functions
Final housekeeping
Anatomy of a Formatting Object C source code file
Abbreviations
Initial comment
#includes
Property enumeration
Static function prototypes
GObject _get_type() function
GObject class initializer
GObject _new()
FoFo _validate_content()
FoFo _validate()
FoFo _update_from_context()
FoFo _debug_dump_properties()
GObject _get() and _set() for properties
Anatomy of a Formatting Object area source code file
Initial comment
#includes
FoFo _area_new2()
Generating Source
Generating Source
Files
Make targets
Debugging xmlroff
Command Line
Using GDB or other debugger
Basic Interface
Overview
Lifecycle
FoLibfoContext
FoDoc and xmlroff Backends
Backends
Yet Another PostScript Clone (YAPC)
Conformance
Conformance Levels
Stated Conformance
Formatting Objects
Properties

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) ...