diff options
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 -------------- |