Fixes for issue #37: Do not use assert() for API input validation
Fixes for issue #37: Do not use assert() for API input validation

This patch introduces a semantic change in the behavior of libConfuse on
invalid input to API's.  Replacing assert() for argument validation with
a simple if() statement (inverted logic compared to asserts) with errno
set to EINVAL and returning cfg_false, NULL or similar on error.

Some API's, mostly cfg_*set*(), are declared to return void, others,
cfg_*getint/float/bool*(), return the actual data value.  The former set
functions will be changed in a later patch to return a status (POSIX
OK(0) or non-zero on error), and the latter will likely return zero on
error, which means the user will have to consult errno to check for
error.

Signed-off-by: Joachim Nilsson <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>

troglobit/libconfuse,martinh/libconfuse,peda-r/libconfuse,peda-r/libconfuse,martinh/libconfuse,westermo/libconfuse,westermo/libconfuse,troglobit/libconfuse