parse debug flags and initialize internals
#include <suplib/debug.h>int debug_init(const char *debug_flags);
const char *debug_flags
- a comma delimited list of debug flags
debug_init
and dbflag
comprise a simple system
for allowing users to specify debug flags to a program in
a human understandable fashion.
debug_init
parses a string for debug flags. The flags
are comma separated tokens of any characters (preferrably
alphanumeric). It builds an internal list of the specified
flags, which can be tested with the dbflag
function.
There is but a single list kept per process, and subsequent
calls to debug_init
will overwrite the list.
To free the memory associated with the internal list,
debug_init
should be called with debug_flags
set to NULL
.
It returns zero upon success, nonzero if it ran out of memory
Diab Jerius