https://bitbucket.org/daniel_fort/magic-lantern
Revision 7ec104f31e5a4da91948fc53c87068d8e287b6f3 authored by alex@thinkpad on 12 January 2017, 17:31:40 UTC, committed by alex@thinkpad on 12 January 2017, 17:31:40 UTC
1 parent d209a4c
Raw File
Tip revision: 7ec104f31e5a4da91948fc53c87068d8e287b6f3 authored by alex@thinkpad on 12 January 2017, 17:31:40 UTC
Moved bit depth setup from raw_rec/mlv_rec to raw backend; raw overlays should now refuse to run at bit depths other than 14
Tip revision: 7ec104f
CODING_STYLE
ML Coding Style
===============

Please use the script check-before-hg-commit.sh in the scripts
directory to check your changes before commiting.

1. Whitespace

ML indents are four spaces. Tabs are never used, except in Makefiles
where they have been irreversibly coded into the syntax.

Do not leave whitespace dangling off the ends of lines.


2. Line width

Lines are 80 characters; not longer.


3. Line ending Style

Use Unix line ending style (LF).

Setup your text editor to use Unix line endings or use
dos2unix-like software.


4. Naming

Variables are lower_case_with_underscores.


5. Block structure

a1ex following the Allman indent style
(see http://en.wikipedia.org/wiki/Indent_style#Allman_style).

Here is an example:

    if (i < 4)
    {
        /* here we go again... */
        auto_ettr_wait_lv_frames(15);
    }
    else
    {
        /* or... not? */
        beep();
        NotifyBox(2000, "Whoops");
        goto end;
    }

You can use the Artistic Style software (http://astyle.sourceforge.net)
to beautify your code according to the Allman style:

 astyle --style=allman <file_name.c>
back to top