ini_file_reader.h: add struct ini_full_context
parent
cc80f721f2
commit
3ff6cd8844
2
HISTORY
2
HISTORY
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Version 1.44 2020-08-24
|
Version 1.44 2020-08-29
|
||||||
* add test file src/tests/test_pthread_lock.c
|
* add test file src/tests/test_pthread_lock.c
|
||||||
* add uniq_skiplist.[hc]
|
* add uniq_skiplist.[hc]
|
||||||
* add function split_string_ex
|
* add function split_string_ex
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind);
|
||||||
#define CONF_FILE_DIR "conf"
|
#define CONF_FILE_DIR "conf"
|
||||||
#define DEFAULT_CONNECT_TIMEOUT 10
|
#define DEFAULT_CONNECT_TIMEOUT 10
|
||||||
#define DEFAULT_NETWORK_TIMEOUT 30
|
#define DEFAULT_NETWORK_TIMEOUT 30
|
||||||
#define DEFAULT_MAX_CONNECTONS 1024
|
#define DEFAULT_MAX_CONNECTONS 256
|
||||||
#define DEFAULT_WORK_THREADS 4
|
#define DEFAULT_WORK_THREADS 4
|
||||||
#define SYNC_LOG_BUFF_DEF_INTERVAL 10
|
#define SYNC_LOG_BUFF_DEF_INTERVAL 10
|
||||||
#define TIME_NONE -1
|
#define TIME_NONE -1
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,16 @@
|
||||||
typedef bool (*IniSectionNameFilterFunc)(const char *section_name,
|
typedef bool (*IniSectionNameFilterFunc)(const char *section_name,
|
||||||
const int name_len, void *args);
|
const int name_len, void *args);
|
||||||
|
|
||||||
|
#define FAST_INI_SET_FULL_CTX_EX(ctx, config_file, sname, ini_context) \
|
||||||
|
do { \
|
||||||
|
ctx.filename = config_file; \
|
||||||
|
ctx.section_name = sname; \
|
||||||
|
ctx.context = ini_context; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define FAST_INI_SET_FULL_CTX(ctx, config_file, sname) \
|
||||||
|
FAST_INI_SET_FULL_CTX_EX(ctx, config_file, sname, NULL)
|
||||||
|
|
||||||
typedef struct ini_item
|
typedef struct ini_item
|
||||||
{
|
{
|
||||||
char name[FAST_INI_ITEM_NAME_SIZE];
|
char name[FAST_INI_ITEM_NAME_SIZE];
|
||||||
|
|
@ -62,6 +72,13 @@ typedef struct ini_context
|
||||||
char flags;
|
char flags;
|
||||||
} IniContext;
|
} IniContext;
|
||||||
|
|
||||||
|
typedef struct ini_full_context
|
||||||
|
{
|
||||||
|
const char *filename;
|
||||||
|
const char *section_name;
|
||||||
|
IniContext *context;
|
||||||
|
} IniFullContext;
|
||||||
|
|
||||||
typedef struct ini_annotation_entry {
|
typedef struct ini_annotation_entry {
|
||||||
char *func_name;
|
char *func_name;
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue