Diff

Differences From Artifact [a51c1e0b82]:

To Artifact [14f8a60094]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1
2
3
4
5
6
7
8




9
10
11
12
13
14
15








-
-
-
-







!ifndef _RSK_LIBCONFIG_H
!define _RSK_LIBCONFIG_H
!ifdef __cplusplus
extern "C" {
!endif

__BLANK_LINE__

!define LC_VAR_LIST 0x80

__BLANK_LINE__

typedef enum {
        LC_CONF_SECTION,
        LC_CONF_APACHE,
        LC_CONF_COLON,
        LC_CONF_EQUAL,
        LC_CONF_SPACE,
        LC_CONF_XML
45
46
47
48
49
50
51

52
53
54
55
56
57
58
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55







+







        LC_VAR_SIZE_SIZE_T,
        LC_VAR_CIDR,
        LC_VAR_IP,
        LC_VAR_IP4,
        LC_VAR_IP6,
        LC_VAR_HOSTNAME4,
        LC_VAR_HOSTNAME6,
        LC_VAR_LIST = 0x80
} lc_var_type_t;

__BLANK_LINE__

typedef enum {
        LC_FLAGS_VAR,
        LC_FLAGS_CMDLINE,
79
80
81
82
83
84
85

86
87
88
89
90
91
92
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90







+







int lc_process(int argc, char **argv, const char *appname, lc_conf_type_t type, const char *extra);
int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra);
int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);
lc_err_t lc_geterrno(void);
void lc_seterrstr(const char *usererrstr);
char *lc_geterrstr(void);
int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type);
int lc_handle_type(lc_var_type_t type, const char *value, void *data);
void lc_cleanup(void);

__BLANK_LINE__

!define LC_CBRET_IGNORESECTION (255)
!define LC_CBRET_OKAY (0)
!define LC_CBRET_ERROR (-1)