X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=HACKING;h=5d8badcbb5d7d012f5452d04d5fe119aa6401269;hb=4a091fe51761db20dea1a3325dfff89209e907b4;hp=aa44285785dfe61f824ead0f1ad84c75324b01d3;hpb=6ba82f605023b5396e386fdd16e6c74ef27dbc9f;p=oweals%2Fgnunet.git diff --git a/HACKING b/HACKING index aa4428578..5d8badcbb 100644 --- a/HACKING +++ b/HACKING @@ -13,11 +13,27 @@ include files: * gnunet_directories.h --- generated * gettext.h --- external library +configuration: +- paths (that are substituted in all filenames) are in PATHS (have as few as possible) +- globals for the daemon are in [gnunetd] (for now, have as few as possible!) +- all options for a particular module (src/MODULE) are under [MODULE] +- options for a plugin of a module are under [MODULE-PLUGINNAME] +- options only for debugging / testing / profiling are under [TESTING], + together with the options for the testing module itself + + exported symbols: - must start with "GNUNET_modulename_" and be defined in "modulename.c" - exceptions: those defined in gnunet_common.h +private (library-internal) symbols (including structs & macros): +- must NOT start with any prefix +- must not be exported in a way that linkers could use them or + other libraries might see them via headers; they must be either + declared/defined in C source files or in headers that are in + the respective directory under src/modulename/ and NEVER be + declared in src/include/. testcases: - must be called "test_module-under-test_case-description.c" @@ -50,3 +66,17 @@ gnunet-service-statistics gnunet-service-dv gnunet-service-dht gnunet-service-fs (or just lib?) + + + + +Coding style: +- GNU guidelines apply +- declare only one variable per line, so + + int i; + int j; + + instead of + + int i,j;