diff options
author | wm4 <wm4@nowhere> | 2019-11-07 21:02:58 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-07 22:53:13 +0100 |
commit | 573673e6aa0a9562433882f14a46ae0b249d0e10 (patch) | |
tree | 0b2ffc90a742ddfb70e034980fd451d6efce437f /DOCS/contribute.md | |
parent | afbddbdf8fbf30d13f12d51c065b68fafc6584a4 (diff) | |
download | mpv-573673e6aa0a9562433882f14a46ae0b249d0e10.tar.bz2 mpv-573673e6aa0a9562433882f14a46ae0b249d0e10.tar.xz |
DOCS/contribute.md: add #include order to coding style
Another thing nobody will read, or consciously follow.
Diffstat (limited to 'DOCS/contribute.md')
-rw-r--r-- | DOCS/contribute.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/DOCS/contribute.md b/DOCS/contribute.md index 37987cf96b..8e20e64f43 100644 --- a/DOCS/contribute.md +++ b/DOCS/contribute.md @@ -185,6 +185,17 @@ mpv uses C99 with K&R formatting, with some exceptions. - Remove any trailing whitespace. - Do not make stray whitespaces changes. +Header #include statement order +------------------------------- + +The order of ``#include`` statements in the source code is not very consistent. +New code should follow the following conventions: + +- Put standard includes (``#include <stdlib.h>`` etc.) on the top, +- then after a blank line, add library includes (``#include <zlib.h`` etc.) +- then after a blank line, add internal includes (``#include "player/core.h"``) +- sort them alphabetically within these sections + General coding -------------- |