Diff

Differences From Artifact [d75f74df35]:

To Artifact [a63e3c406d]:


27
28
29
30
31
32
33

34
35
36
37
38
39
40
41

42
43
44
45
46
47












48
49
50








51
52
53
54
        LC_VAR_DIRECTORY,
        LC_VAR_SIZE_LONG_LONG,
        LC_VAR_SIZE_LONG,
        LC_VAR_SIZE_INT,
        LC_VAR_SIZE_SHORT,
        LC_VAR_TIME,
        LC_VAR_DATE,

        LC_VAR_SECTIONSTART,
        LC_VAR_SECTIONEND
} lc_var_type_t;

__BLANK_LINE__

typedef enum {
	LC_FLAGS_VAR,

        LC_FLAGS_SECTIONSTART,
        LC_FLAGS_SECTIONEND
} lc_flags_t;

__BLANK_LINE__













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, int (*callback)(const char *, const char *, lc_flags_t));
int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);









__BLANK_LINE__

!endif







>







|
>






>
>
>
>
>
>
>
>
>
>
>
>

|

>
>
>
>
>
>
>
>




27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
        LC_VAR_DIRECTORY,
        LC_VAR_SIZE_LONG_LONG,
        LC_VAR_SIZE_LONG,
        LC_VAR_SIZE_INT,
        LC_VAR_SIZE_SHORT,
        LC_VAR_TIME,
        LC_VAR_DATE,
        LC_VAR_SECTION,
        LC_VAR_SECTIONSTART,
        LC_VAR_SECTIONEND
} lc_var_type_t;

__BLANK_LINE__

typedef enum {
        LC_FLAGS_VAR,
        LC_FLAGS_CMDLINE,
        LC_FLAGS_SECTIONSTART,
        LC_FLAGS_SECTIONEND
} lc_flags_t;

__BLANK_LINE__

typedef enum {
        LC_ERR_NONE,
        LC_ERR_INVCMD,
        LC_ERR_INVSECTION,
        LC_ERR_INVDATA,
        LC_ERR_BADFORMAT,
        LC_ERR_CANTOPEN,
        LC_ERR_CALLBACK,
} lc_err_t;

__BLANK_LINE__

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);
char *lc_geterrstr(void);

__BLANK_LINE__

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

__BLANK_LINE__

!endif