X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=HACKING;h=6e7a3e50edd85ef03c800bfb5fd6b4d52c06cca6;hb=a39e9010af50091561d45bf04bfedd10fb4cc70a;hp=535d4498f1542528b63f55632eea6cdc81caf108;hpb=f7b5b476ba55ee45fefff22777f525cc81b4cae8;p=oweals%2Fgnunet.git diff --git a/HACKING b/HACKING index 535d4498f..6e7a3e50e 100644 --- a/HACKING +++ b/HACKING @@ -14,6 +14,32 @@ include files: * gettext.h --- external library +binaries: +- gnunet-service-xxx: service process (has listen socket) +- gnunet-daemon-xxx: daemon process (no listen socket) +- gnunet-helper-xxx[-yyy]: SUID helper for module xxx +- gnunet-yyy: command-line tool for end-users +- libgnunet_plugin_xxx_yyy.so: plugin for API xxx +- libgnunetxxx.so: library for API xxx + + +logging: +- services and daemons use their directory name in GNUNET_log_setup (i.e. 'core') + and log using plain 'GNUNET_log'. +- command-line tools use their full name in GNUNET_log_setup (i.e. 'gnunet-publish') + and log using plain 'GNUNET_log'. +- service access libraries log using 'GNUNET_log_from' and use + 'DIRNAME-api' for the component (i.e. 'core-api') +- pure libraries (without associated service) use 'GNUNET_log_from' with + the component set to their library name (without lib + or '.so'), which should also be their directory name (i.e. 'nat') +- plugins should use 'GNUNET_log_from' with the directory name + and the plugin name combined to produce the component name (i.e. 'transport-tcp'). +- logging should be unified per-file by defining a LOG macro with the + appropriate arguments, along these lines: + #define LOG(kind,...) GNUNET_log_from (kind, "example-api",__VA_ARGS__) + + 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!) @@ -56,7 +82,7 @@ src/ directories: Coding style: -- GNU guidelines apply +- GNU guidelines generally apply - declare only one variable per line, so int i; @@ -65,6 +91,9 @@ Coding style: instead of int i,j; +- Indentation should be done using the 'pre-commit' script in the top-level + directory using the patched (!) GNU indent. See also the posting at + https://gnunet.org/gnunetindentation Build-system: