Use non-zero exit status on error.
Don't use bzero and bcopy.

These functions are deprecated and no longer part of POSIX.
Use memset and memcpy instead.
Fix inconsistent indentation.
Consistently use whitespace between functions arguments.
Check return value of fgets().

This avoids a warning with _FORTIFY_SOURCE.
Merge pull request #28 from jwakely/improve-c-client-server

Improve C client server code