console: don't SIGTERM the whole process group

Sending SIGTERM to the whole process group is a very bad idea, because
it affects the calling shell when run from a shell script. Only signal
the current process instead.
main: only block certain signals

Instead of blocking all signals when waiting to exit, only block the
three signals we're interested in: SIGHUP, SIGINT and SIGTERM.
ptrarray, system: fix bracing style

Fixup bracketing in three functions where the function definition did
not use the correct bracing style.
common: cleanup

	- remove dead code
	- restructure header file to make it clearer
	- remove worthless comments
build: fix spacing in Makefile.am

In the interest of maintainability, it is better to have a line break
before the first filename when a variable contains multiple ones.
build: use AX_PTHREAD instead of AC_CHECK_LIB([pthread]...)

A special autoconf macro needs to be used to get the correct compiler
and linker options for libpthread (-pthread instead of -lpthread).
asciiart: use  add __attribute__((format)) around print functions

Functions that take variable length arguments to pass to the v*printf
family of print functions should use __attribute__((format)) to enable
format string static code analysis.
ship: correct const modifier in new_cargo_to_ship()

Commit bdd8a32c, "player: add buy and sell commands", introduced
functions for buying and selling merchandise. Unfortunately, a const
modifier was put on the wrong side of the asterisk in a function
parameter definition. The pointer should be a constant pointer to a
constant value; fix the definition.
player: fix format modifier

Commit 1846d36e, "player: add list ports command", introduced a command
for listing ports but unfortunately used a size_t format modifier
instead of a long int in a printout.
buffer: add vbufprintf

Add a printf-like buffer function that accepts a va_list, in addition to
the bufprintf printf-like variadic function that already exists.
connection: make conn_send into a proper function

Use the new vbufprintf function and make conn_send into a proper
function instead of a macro.
cli: printf callback in cli_print_help

Pass a function pointer to a printf-like function (but which accepts a
user-selectable pointer as the first argument) instead of passing a file
descriptor.

Update the calling code in console and player to reflect the new API.
connection: beautify conn_error()

conn_error() should look the same as conn_send().
console: printf callback in command line functions

Pass a function pointer to a printf-like function (but which accepts a
user-selectable pointer as the first argument) instead of passing a file
descriptor.

Update the calling code in main to reflect the new API. Rename
parameters in console functions to reflect the new usage.
server: check return value from read() calls

Check return value from read() calls in the server message handling
routines and ignore the message if it is invalid. This fixes gcc
warnings related to unused results:

../server.c:234:6: error: ignoring return value of ‘read’, declared with
attribute warn_unused_result [-Werror=unused-result]
../server.c:237:7: error: ignoring return value of ‘read’, declared with
attribute warn_unused_result [-Werror=unused-result]
buffer: properly bail out if read() fails

A return value check in read_into_buffer() did not properly check for
error codes from read(). Properly return a negative error value if
read() fails.