===============================================================================
shconfig - Configuration file parsing                                2006-02-25


DESCRIPTION

    libHX provides a way to read shell-style key=value configuration files,
    since it has been very common in my progs.

    Configuration files are based on the key=value scheme, and lines beginning
    with a hash mark (#) are ignored, as are empty lines and unrecognized keys.
    The format is fully interchangable with shell files.

        # Example from vitalnix/vetc/autouid
        # Minimum / maximum values for automatic UID selection
        UID_MIN=100
        UID_MAX=65000

        # Minimum / maximum values for automatic GID selection
        GID_MIN=100
        GID_MAX=65000

SYNOPSIS

    #include <libHX/option.h>

    struct HXoption;

    int HX_shconfig(const char *FILE, struct HXoption *TABLE);
    int HX_shconfig_pv(const char **PATHVEC, const char *FILE,
        struct HXoption *TABLE, unsigned long FLAGS);


    SHCONFIG uses the HXoption structure from opt.c (see opt.txt for details),
    because they share a lot of common code.


EXAMPLE

    long uid_min, uid_max;
    char *passwd_file;

    struct HXoption options_table[] = {
        {.ln = "UID_MIN",  .type = HXTYPE_LONG,   .ptr = &uid_min},
        {.ln = "UID_MAX",  .type = HXTYPE_LONG,   .ptr = &uid_max},
        {.ln = "PWD_FILE", .type = HXTYPE_STRING, .ptr = &passwd_file},
    };


        ->type          typeof(->ptr)

===============================================================================
