A few coding style rules for Sherlock:

There is no such thing as a global indentation style. Different modules use
different indentation, depending on the author. Most parts use the usual GNU
indentation, others use Linux kernel style. When modifying a module, please
keep the indentation consistent with the rest of the module.

Sherlock is designed to be compiled with GCC 3.0 or better. C99 and GNU
extensions can be freely used in appropriate cases, however, if both are
possible, we prefer C99 constructs.

Currently, Sherlock probably compiles only on Linux, but we try to minimize
OS dependencies to a reasonable minimum.

Nothing should be assumed about the basic C data types except for char being
at least 8 bits wide and int being at least 32-bit. For all other stuff, use
types defined in lib/config.h.

Also, standard system functions are assumed to work with 32-bit file sizes
only. For larger files, use "lib/lfs.h" and types from lib/config.h.

Sherlock's library include "sherlock/lib.h" must be the first thing you #include
in each module as it sets configuration defines for the system library.
Generally, we include our libraries first and then the system includes.

Every include file should be guarded with a #ifdef against multiple inclusion.
One possible exception is an include local to a small group of modules.

The fastbuf library (see "lib/fastbuf.h") is generally preferred to stdio,
because it's much faster and does its own error handling. Fastbuf streams
are not limited to real files -- they can be used for various forms of
buffering and other tricks, see the include file.

You should never call malloc() and free() directly. Use xmalloc() and xfree()
instead and even better use pooled allocation (see lib/mempool.h).

No program should write directly to stdout/stderr except for errors during
program startup (invalid arguments and so on) and debugging messages which
are turned off by default. The logging functions from the library should
be used instead.

If you define new configuration switches or change the system of compile-time
settings, don't forget to check that all customization compile and that
they have reasonable defaults for the configuration items.

Some more hints and caveats:

- configuration parser automatically allocates all strings, even those
  passed to CT_FUNCTION functions.
- use cfg_malloc to allocate everything related to configuration.
- Cspace() and Cblank() accepts \n and \r.
- libgather modules must clean everything up; if cloning any streams,
  need to make gthis->temp point to the clone if you might call gerror().
