1 CenterIM 5 Hacking Documentation
14 - No tabs, two spaces indenting.
15 - Line length limited to 78 characters.
20 - Names of classes and methods use CamelNotation, variables use
21 common_c_naming. THIS_IS_A_CONST. There is an exception, libpurple/glib
22 callbacks use common C naming too.
23 - Example of class declaration:
28 // enums and typedefs first,
35 virtual size_t GetLinesCount() const { return lines_count; }
42 - Order methods in an implementation file according to a header file.
43 - Methods that can be bound to a key are prefixed with 'Action', for example,
45 - Methods connected to signals should use 'On' prefix, for example,
47 - Singletons have got all variables private, other classes should have all
54 Use the '--enable-debug' configure option to disable optimizations and to
55 enable producing of binary with debugging information.
57 Use the '--enable-strict' configure option to enable extra compiler warnings.
63 % export GLIBCXX_FORCE_NEW=1
64 % export G_DEBUG=gc-friendly
65 % export G_SLICE=always-malloc
66 % valgrind --leak-check=full --child-silent-after-fork=yes \
67 --log-file=cim5.log --track-fds=yes centerim5
69 Make sure you don't run this command on libtool's binary wrapper.
71 GLIBCXX_FORCE_NEW forces libstdc++ allocator to use new() and delete() calls
72 instead of using memory pools
73 (http://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_allocators.html).
75 G_SLICE and G_DEBUG env vars make sure to turn off glib's memory
76 optimizations, so that they do not confuse Valgrind
77 (https://live.gnome.org/Valgrind).
79 There is currently no suppresion list, though you can use at least the list
80 from the Pidgin project.