1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
==========
COMMITTING
==========
Do NOT commit to this module without permission from a maintainer.
See epiphany.doap for who they are.
==========
CODE STYLE
==========
In order to keep the code nice and clean we have a few requirements you'll
need to stick to in order to get your patch accepted:
- Use 2-space no-tabs for indentation (mandatory on new files, old
ones will be re-indented eventually. When modifying an existing file
with 8-space indentation keep the old style please).
- Use K&R style for the braces.
- No braces for one line control clauses.
- Callback functions have a suffix _cb.
- All files have to be encoded in UTF-8.
- Use char/int/double/..., not gchar/gint/gdouble/... types.
- All implementation files must include first "config.h", followed by
the primary header, followed by a blank line, followed by all the
local headers sorted alphabetically, followed by a blank line,
followed by all the system headers sorted alphabetically.
Headers should follow the same pattern excluding the config.h and
self file section, for obvious reasons.
- Make comments full sentences. This means proper capitalization and
punctuation.
- data/kr-gnome-indent.cfg is provided as a reference config file for the
uncrustify program to get correct indentation in new files.
- There's no space between a type cast and the variable name.
Right: (int *)foo
Wrong: (int*) foo
=========
DEBUGGING
=========
To enable debugging use the configure option --enable-debug.
LOGGING
=======
At execution time, you must enable the log service. To enable the
log service, set the environment variable: EPHY_LOG_MODULES
EPHY_LOG_MODULES variable has the form:
<moduleName>[:<moduleName>]*
moduleName is a filename.
ex: export EPHY_LOG_MODULES=ephy-window.c:ephy-autocompletion.c
The special log module "all" enables all log modules.
Use the LOG macro to put debug messages in the code.
WARNINGS
========
At execution time, you must enable the service. To enable you to debug
warnings, set the environment variable: EPHY_DEBUG_BREAK
Possible value for EPHY_DEBUG_BREAK variable:
stack Prints a stack trace.
suspend Use this to stop execution when a warning occurs.
You can then attach a debugger to the process.
trap Use this while running epiphany in a debugger.
This makes execution stop and gives back control to
the debugger.
PROFILING
=========
At execution time, you must enable the profiling service. To enable the
profiling service, set the environment variable: EPHY_PROFILING_MODULES
EPHY_PROFILE_MODULES variable has the form:
<moduleName>[:<moduleName>]*
moduleName is a filename.
ex: export EPHY_PROFILE_MODULES=ephy-window.c:ephy-autocompletion.c
The special profiling module "all" enables all profiling modules.
Use START_PROFILER STOP_PROFILER macros to profile pieces of code.
|