diff options
| author | djcb <djcb@djcbsoftware.nl> | 2012-03-24 11:17:11 +0200 |
|---|---|---|
| committer | djcb <djcb@djcbsoftware.nl> | 2012-03-24 11:17:11 +0200 |
| commit | d44cb572ef29112f29c05f14112718aa32467843 (patch) | |
| tree | bb74e73b04d33bc4a5ce0f85f0828c85e54cba4d /HACKING | |
| parent | 3fb7e5d6ff19c8b5778531e5ec4b0d24bc2ba430 (diff) | |
* updated the HACKING instructions
Diffstat (limited to 'HACKING')
| -rw-r--r-- | HACKING | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -7,10 +7,12 @@ so as long as any new code 'fits in', it should go a long way in satisfying them. + I should add some notes for the Lisp/Scheme code as well... + ** Coding style For consistency and, even more important, to keep things understandable, mu - follows the following rules: + attempts to follow the following rules: 1. basic code layout is like in the Linux kernel coding style, with the '{' on the same line as the statement, except for functions. Tabs/spaces @@ -18,10 +20,9 @@ 2. lines must not exceed 80 characters (C) or 100 characters (C++) - 3. functions must not exceed 40 lines (there could be rare exceptions, - currently there are none in mu), and 30 lines is already pretty long. You - can easily check if any functions violate this rule with 'make line33', - which lists all functions with more than 33 non-comment lines. + 3. functions must not exceed 35 lines. You can easily check if any functions + violate this rule with 'make line35', which lists all functions with more + than 35 non-comment lines. 4. source files should not exceed 1000 lines @@ -31,7 +32,8 @@ can use 'make cc10' to list all functions that violate this rule; there should be none. - 6. filenames have their components separated with dashes (e.g, 'mu-log.h') + 6. filenames have their components separated with dashes (e.g, 'mu-log.h'), + and start with 'mu-' where appropriate. 7. global functions have the prefix based on their module, e.g., mu-foo.h declares a function of 'mu_foo_bar (int a);', mu-foo.c implements this. @@ -62,7 +64,7 @@ 12. functions calls have a space between function name and arguments, unless there are none, so: - foo(12, 3); + foo (12, 3); and @@ -75,7 +77,7 @@ C) ** Logging - + For logging, mu uses the GLib logging functions/macros as listed below, except when logging may not have been initialized. @@ -103,9 +105,9 @@ Anyhow, to compile straight from git: - $ git clone git://gitorious.org/mu/mu.git + $ git clone https://github.com/djcb/mu $ cd mu - $ autoreconf -i + $ autoreconf -i $ ./configure $ make @@ -113,5 +115,3 @@ # Local Variables: # mode: org; org-startup-folded: nil # End: - - |
