From 3483c891dcdaeb3205a6996811da789e7dbcc5fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 2 Jun 2009 21:09:45 +0200 Subject: doc: added Developer's Manual Just a start... --- doc/developer.xml | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 doc/developer.xml (limited to 'doc/developer.xml') diff --git a/doc/developer.xml b/doc/developer.xml new file mode 100644 index 00000000..c63e2c26 --- /dev/null +++ b/doc/developer.xml @@ -0,0 +1,105 @@ + + + + The Music Player Daemon - Developer's Manual + + + Introduction + + + This is a guide for those who wish to hack on the MPD source + code. MPD is an open project, and we are always happy about + contributions. So far, more than 50 people have contributed + patches. + + + + This document is work in progress. Most of it may be incomplete + yet. Please help! + + + + + Code Style + + + + + indent with tabs (width 8) + + + + + + don't write CPP when you can write C: use inline functions + and enums instead of macros + + + + + + the code should be C99 compliant, and must compile with + GCC; + clang support is highly desirable + + + + + + C++ is ok (for integrating C++ only libraries), but it + should be avoided + + + + + + Some example code: + + + static inline bool +foo(const char *abc, int xyz) +{ + if (abc == NULL) { + g_warning("Foo happened!\n"); + return -1; + } + + return xyz; +} + + + + + + + Hacking The Source + + + Always write your code against the latest git: + + + git clone git://git.musicpd.org/master/mpd.git + + + Configure with the options . Enable as many plugins as possible, + to be sure that you don't break any disabled code. + + + + Don't mix several changes in one single patch. Create a + separate patch for every change. Tools like + stgit help you with that. + + + + + Submitting Patches + + + Send your patches to the mailing list: + musicpd-dev-team@lists.sourceforge.net + + + -- cgit v1.2.3