/usr/share/doc/cdebconf/coding.txt is in cdebconf 0.192.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | Coding style/standards
----------------------
This is another one of those "object-oriented" C programs. Each "class" is
associated with one program file, which defines a data-structure and a set of
methods that operate on that structure. All the methods take the class data
structure as the first parameter. The exception to this is the _new method,
which is the constructor for the class. It takes whatever initialization
parameters are needed, and returns a pointer to a class structure. The
destructor, if one exists, is canonically named class_delete.
Macros are used for various convenience things, and follow the naming convention
of their C++ or perl counterparts.
In general the code follows the following conventions:
- variables and functions are lower-case. multi-word identifiers are joined
by underbars (like_this).
- tabs are 4 spaces. Avoid using ^I
- braces are always on a line by itself, and line up with the controlling
block construct.
- in general, keep things consistent with the surrounding code
|