src/config.h
author Tero Marttila <terom@fixme.fi>
Wed, 08 Apr 2009 02:25:30 +0300
changeset 121 4682ebbc5644
parent 120 576bab0a1c5a
child 122 52ffbdb6bba1
permissions -rw-r--r--
implement logwatch_conf_filter such that it compiles and loads, but not yet tested
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#ifndef CONFIG_H
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
#define CONFIG_H
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
/**
87
f0db6ebf18b9 documentation tweaks
Tero Marttila <terom@fixme.fi>
parents: 83
diff changeset
     5
 * @file
f0db6ebf18b9 documentation tweaks
Tero Marttila <terom@fixme.fi>
parents: 83
diff changeset
     6
 *
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
 * Support for module configuration parameters
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
 */
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
#include "error.h"
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    10
#include <stdbool.h>
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
/** 
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 * Different types of configuration parameters
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
 */
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
enum config_type {
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
    CONFIG_INVALID,
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    18
    /** No value at all */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    19
    CONFIG_NULL,
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    20
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
    /** A plain NUL-terminated string */
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
    CONFIG_STRING,
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    23
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    24
    /** A user-defined type, further identified by a string */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    25
    CONFIG_USER,
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    26
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    27
    /** An IRC channel */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    28
    CONFIG_IRC_CHAN,
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    29
};
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    30
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    31
/**
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    32
 * Structure to hold a value as defined by config_type
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    33
 */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    34
struct config_value {
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    35
    /** The type of the value */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    36
    enum config_type type;
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    37
    
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    38
    /** The typed value */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    39
    union {
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    40
        /** Value for CONFIG_STRING */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    41
        char *string;
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    42
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    43
        /** Value for CONFIG_IRC_CHAN */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    44
        struct irc_chan *irc_chan;
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    45
        
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    46
        /** Value for CONFIG_USER */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    47
        struct {
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    48
            /** The specific user type */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    49
            const char *type;
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    50
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    51
            /** A pointer to the user type */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    52
            void *ptr;
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    53
        } user;
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    54
    };
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    55
};
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    56
87
f0db6ebf18b9 documentation tweaks
Tero Marttila <terom@fixme.fi>
parents: 83
diff changeset
    57
/**
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    58
 * Structure to define a single parameter for an option
87
f0db6ebf18b9 documentation tweaks
Tero Marttila <terom@fixme.fi>
parents: 83
diff changeset
    59
 */
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    60
struct config_param {
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    61
    /** The name of the arg */
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    62
    const char *name;
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    63
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    64
    /** The type */
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    65
    enum config_type type;
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    66
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    67
    /** The specific type for CONFIG_USER */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    68
    const char *user_type;
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    69
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    70
    /** Description */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    71
    const char *description;
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    72
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    73
    /** Optional value handler function, by type */
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    74
    union {
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    75
        err_t (*string) (void *ctx, char *value, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    76
        err_t (*irc_chan) (void *ctx, struct irc_chan *chan, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
    77
    } func;
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    78
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    79
    /** Use handler function? */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    80
    bool is_handler;
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    81
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    82
    /** Optional value? */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
    83
    bool optional;
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    84
};
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    85
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    86
/**
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    87
 * The maximum number of parameters that a single option can have, although this includes the terminating NULL
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    88
 */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    89
#define CONFIG_PARAMS_MAX (15 + 1)
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    90
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    91
/**
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    92
 * The maximum number of values that an option can access, including the terminating NULL
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    93
 */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    94
#define CONFIG_VALUES_MAX CONFIG_PARAMS_MAX
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    95
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    96
/**
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    97
 * A more complicated configuration option that can have multiple parameters
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    98
 */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
    99
struct config_option {
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   100
    /** The name of the config option */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   101
    const char *name;
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   102
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   103
    /** The list of parameters */
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   104
    const struct config_param params[CONFIG_PARAMS_MAX];
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   105
    
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   106
    /** The handler function */
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   107
    err_t (*func) (void *ctx, const struct config_option *option, const struct config_value values[], struct error_info *err);
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   108
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   109
    /** Help text */
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   110
    const char *help;
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   111
};
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   112
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   113
#define CONFIG_PARAM(name, type, desc, optional) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   114
    {   name, type, NULL, desc, { NULL }, false, optional }
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   115
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   116
#define CONFIG_PARAM_OPTIONAL(name, type, desc) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   117
    CONFIG_PARAM(name, type, desc, true)
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   118
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   119
#define CONFIG_PARAM_USER(name, user_type, desc, optional) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   120
    {   name, CONFIG_USER, user_type, desc, { NULL }, false, optional }
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   122
#define CONFIG_PARAM_USER_OPTIONAL(name, user_type, desc) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   123
    CONFIG_PARAM_USER(name, user_type, desc, true) 
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   124
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   125
#define CONFIG_PARAM_HANDLER(name, type, desc, _func_name_, func) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   126
    {   name, type, NULL, desc, {._func_name_ = func }, true, false }
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   127
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   128
#define CONFIG_PARAM_END \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   129
    {   NULL, 0, NULL, NULL, { NULL }, false, false }
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   130
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   131
#define CONFIG_OPT(name, func, help, ...) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   132
    {   name, { __VA_ARGS__, CONFIG_PARAM_END }, func, help }
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   133
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   134
#define CONFIG_OPT_STRING(name, func, desc, help) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   135
    CONFIG_OPT(name, NULL, help, CONFIG_PARAM_HANDLER(name, CONFIG_STRING, desc, string, func))
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   136
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   137
#define CONFIG_OPT_IRC_CHAN(name, func, desc, help) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   138
    CONFIG_OPT(name, NULL, help, CONFIG_PARAM_HANDLER(name, CONFIG_IRC_CHAN, desc, irc_chan, func))
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   139
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   140
#define CONFIG_OPT_END \
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   141
    {   NULL,   {}, NULL, NULL }
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   142
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   143
#define CONFIG_OPTIONS(...) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   144
    { __VA_ARGS__, CONFIG_OPT_END }
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   145
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   146
#define CONFIG_VALUE(type, _name_, value) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   147
    {   (type), { ._name_ = value } }
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   148
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   149
#define CONFIG_VALUE_STRING(str_value) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   150
    CONFIG_VALUE(CONFIG_STRING, string, (str_value))
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   151
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   152
#define CONFIG_VALUE_IRC_CHAN(irc_chan_value) \
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   153
    CONFIG_VALUE(CONFIG_IRC_CHAN, irc_chan, (irc_chan_value))
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   154
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   155
#define CONFIG_VALUE_USER(user_type, user_value) \
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   156
    CONFIG_VALUE(CONFIG_USER, user, { user_type, user_value })
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   157
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   158
#define CONFIG_VALUE_END \
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   159
    {   0, { NULL } }
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   160
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   161
/**
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   162
 * Lookup a config option by name.
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   163
 *
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   164
 * @param options a CONFIG_OPT_END-terminated array of config_option's
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   165
 * @param name the config_option::name to look up
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   166
 * @param err returned error info if not found
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   167
 * @return a direct pointer to the config_option if found
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   168
 */
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   169
const struct config_option* config_lookup (const struct config_option *options, const char *name, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   170
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   171
// XXX: move this into nexus
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   172
#include "nexus.h"
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   173
/**
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   174
 * Parse a raw value into a suitable configuration value for a single-param option, based on the config option type.
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   175
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   176
 * Since this needs to access the application state, you need to pass in the nexus as an argument.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   177
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   178
 * Formats supported:
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   179
 *  CONFIG_IRC_CHAN         - uses a '<network>/<channel>' format and irc_client_get_chan
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   180
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   181
 * @param option the option to parse the value for, use config_lookup to find it
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   182
 * @param nexus the application state
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   183
 * @param value the returned value, if succesfull
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   184
 * @param raw_value the raw value to parse based on the type
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   185
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   186
 */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   187
err_t config_parse (const struct config_option *option, struct nexus *nexus, struct config_value *value, char *raw_value, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   188
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   189
/**
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   190
 * Apply a list of parsed configuration values to the given config_option struct.
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   191
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   192
 * The config option handlers take a context argument; the value of this depends on the implementor of the config_option.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   193
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   194
 * @param option the option to apply
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   195
 * @param ctx the context pointer for the option handler
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   196
 * @param values the NULL-terminated array of parsed values
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   197
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   198
 */
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   199
err_t config_apply_opt (const struct config_option *option, void *ctx, const struct config_value values[], struct error_info *err);
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   200
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   201
/**
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   202
 * Apply a list of parsed configuration values for the named config opt.
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   203
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   204
 * @param options a CONFIG_OPT_END-terminated array of config_option's
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   205
 * @param ctx the context pointer for the option handler
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   206
 * @param name the config_option::name to look up
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   207
 * @param values the NULL-termianted array of parsed values
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   208
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   209
 */
120
576bab0a1c5a modify config to support options with multiple params/values
Tero Marttila <terom@fixme.fi>
parents: 100
diff changeset
   210
err_t config_apply (const struct config_option *options, void *ctx, const char *name, const struct config_value values[], struct error_info *err);
100
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   211
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   212
/**
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   213
 * Apply a string value for the named config opt.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   214
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   215
 * @param options a CONFIG_OPT_END-terminated array of config_option's
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   216
 * @param ctx the context pointer for the option handler
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   217
 * @param name the config_option::name to look up
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   218
 * @param value the string value
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   219
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   220
 */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   221
err_t config_apply_string (const struct config_option *options, void *ctx, const char *name, char *value, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   222
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   223
/**
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   224
 * Apply an irc_chan value for the named config opt.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   225
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   226
 * @param options a CONFIG_OPT_END-terminated array of config_option's
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   227
 * @param ctx the context pointer for the option handler
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   228
 * @param name the config_option::name to look up
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   229
 * @param value the irc_chan value
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   230
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   231
 */
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   232
err_t config_apply_irc_chan (const struct config_option *options, void *ctx, const char *name, struct irc_chan *value, struct error_info *err);
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   233
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   234
/**
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   235
 * Parse and apply a configuration value for the named config opt.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   236
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   237
 * See config_parse() for more info.
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   238
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   239
 * @param options a CONFIG_OPT_END-terminated array of config_option's
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   240
 * @param nexus the application state
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   241
 * @param ctx the context pointer for the option handler
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   242
 * @param name the config_option::name to look up
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   243
 * @param raw_value the raw value to parse
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   244
 * @param err returned error info
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   245
 *
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   246
 * @see config_parse
cfb7776bd6f0 improve the config module futher, now the module_desc interface uses structured config_value's
Tero Marttila <terom@fixme.fi>
parents: 87
diff changeset
   247
 */
121
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   248
err_t config_apply_raw (const struct config_option option[], struct nexus *nexus, void *ctx, const char *name, char *raw_value, struct error_info *err);
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   249
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   250
/**
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   251
 * Lookup a config_value by name from the given list of config_values for the given config_option
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   252
 */
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   253
const struct config_value* config_get_value (const struct config_option *option, const struct config_value values[], const char *name);
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   254
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   255
const char* config_get_string (const struct config_option *option, const struct config_value values[], const char *name);
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   256
struct irc_chan* config_get_irc_chan (const struct config_option *option, const struct config_value values[], const char *name);
4682ebbc5644 implement logwatch_conf_filter such that it compiles and loads, but not yet tested
Tero Marttila <terom@fixme.fi>
parents: 120
diff changeset
   257
void* config_get_user (const struct config_option *option, const struct config_value values[], const char *name, const char *user_type);
83
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   258
c8e2dac08207 add config module and modify irc_log/nexus to use it
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   259
#endif