Coding paradigms ...

tab = 2 spaces; use spaces and not tabs!

windows: 
use BSD API in lieu of Winsock directly
#define TINE_EXPORT __declspec(dllexport) 

===========================
| optional compile macros |
===========================

#define INTEL -> maybe replace with #define LITTLE_ENDIAN ?

OS macros:
#define MSDOS (might still work ?)
#define VMS (might still work ?)
#define WIN32 (for a windows build)
#define UNIX (for any unix flavor -> all you need for LINUX)
#define MACOS (usually takes a FREEBSD with it)
#define SOLARIS
#define VXWORKS
#define NIOS
#define FREEBSD

#define OS_64BIT  -> but this is becoming /has become the default !
#define OS_16BIT

#define MULTITHREADED

=================
| Useful macros |
=================

this is C and not C++ (no 'Exceptions' etc.)

so:

/**
 * \internal
 * Assign a completion code and jump to a 'cleanup' label where
 * files can be fclose()ed, memory free()ed. etc. if need be ...
 *
 * A very useful macro when you're using straight "c".
 */
#define ccerr(e) {cc = (e); goto err; }

this is used in numerous routines!

=================
| BYTE swapping |
=================

tranported data payloads make use of LITTLE_ENDIAN (INTEL) byte order and NOT 'network byte order' which SUN 
got to define way back when and is BIG ENDIAN 

So the non-intel machines have to swap bytes (and so does java).

typically the incoming payload will be swapped as it comes in.
-> the payload header is swapped first
-> the data payload is swapped as it is examined and after it is known (from the header) how many bytes are coming.
