| version 1.47, 2002/08/05 19:23:20 |
version 1.48, 2002/08/08 14:49:41 |
| Line 110 enum cfg_error { /* {{{ */ |
|
| Line 110 enum cfg_error { /* {{{ */ |
|
| CFG_ERR_INTERNAL = -20, |
CFG_ERR_INTERNAL = -20, |
| CFG_ERROR_INTERNAL = -20 |
CFG_ERROR_INTERNAL = -20 |
| |
|
| }; /* }}} */ |
}; /* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Context flags |
* @name Context flags |
| Line 167 enum cfg_flag { /* {{{ */ |
|
| Line 166 enum cfg_flag { /* {{{ */ |
|
| CFG_ADVANCED_QUOTE = 32 + 16 |
CFG_ADVANCED_QUOTE = 32 + 16 |
| */ |
*/ |
| |
|
| }; /* }}} */ |
}; /* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Option types |
* @name Option types |
| Line 236 enum cfg_option_type { /* {{{ */ |
|
| Line 234 enum cfg_option_type { /* {{{ */ |
|
| CFG_LEFTOVER_ARGS = 128, |
CFG_LEFTOVER_ARGS = 128, |
| CFG_LEFTOVER_ARGUMENTS = 128 |
CFG_LEFTOVER_ARGUMENTS = 128 |
| |
|
| }; /* }}} */ |
}; /* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Special properties types |
* @name Special properties types |
| Line 389 enum cfg_line_option_type { /* {{{ */ |
|
| Line 386 enum cfg_line_option_type { /* {{{ */ |
|
| |
|
| /** Long command line option argument initialized without separator (default) */ |
/** Long command line option argument initialized without separator (default) */ |
| CFG_LONG_NOSEPINIT = 0 |
CFG_LONG_NOSEPINIT = 0 |
| }; /* }}} */ |
}; /* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @brief Structure for defining one config option |
* @brief Structure for defining one config option |
|
|
| /** |
/** |
| * @name Functions and macros for creating and manipulating context |
* @name Functions and macros for creating and manipulating context |
| */ |
*/ |
| /*@{*/ |
/*@{*/ /* {{{ */ |
| /* {{{ */ |
|
| |
|
| /** |
/** |
| * Initialize core context |
* Initialize core context |
|
|
| */ |
*/ |
| void cfg_free_context(const CFG_CONTEXT con); |
void cfg_free_context(const CFG_CONTEXT con); |
| |
|
| /* }}} */ |
/* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Functions for setting and clearing context flags |
* @name Functions for setting and clearing context flags |
| */ |
*/ |
| /*@{*/ |
/*@{*/ /* {{{ */ |
| /* {{{ */ |
|
| |
|
| /** |
/** |
| * Set context flag |
* Set context flag |
|
|
| */ |
*/ |
| int cfg_get_context_flags(const CFG_CONTEXT con); |
int cfg_get_context_flags(const CFG_CONTEXT con); |
| |
|
| /* }}} */ |
/* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Functions and macros for properties manipulation |
* @name Functions and macros for properties manipulation |
| */ |
*/ |
| /*@{*/ |
/*@{*/ /* {{{ */ |
| /* {{{ */ |
|
| |
|
| /** |
/** |
| * Clear all strings of property |
* Clear all strings of property |
|
|
| const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
| |
|
| /** |
/** |
| |
* TODO: spravit help |
| |
*/ |
| |
int cfg_add_properties_str( |
| |
const CFG_CONTEXT con, char *str, enum cfg_property_type type, ...); |
| |
|
| |
int cfg_add_properties_type( |
| |
const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
| |
|
| |
/** |
| * Remove string from property |
* Remove string from property |
| * |
* |
| * @param con initialized context |
* @param con initialized context |
|
|
| * @return 1 on success, 0 on not enough memory error |
* @return 1 on success, 0 on not enough memory error |
| * @see cfg_property_type |
* @see cfg_property_type |
| * |
* |
| * argument list must be termited with typeN = CFG_EOF or |
* argument list must be terminated with typeN = CFG_EOF or |
| * strN = NULL |
* strN = NULL |
| * cfg_add_properties(con, type1, str1, type2, str2, type3=CFG_EOF) construction allowed |
* cfg_add_properties(con, type1, str1, type2, str2, type3=CFG_EOF) construction allowed |
| */ |
*/ |
| int cfg_remove_properties( |
int cfg_remove_properties( |
| const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
| |
/** |
| |
* TODO: spravit help |
| |
*/ |
| |
int cfg_remove_properties_str( |
| |
const CFG_CONTEXT con, char *str, enum cfg_property_type type, ...); |
| |
|
| /* }}} */ |
int cfg_remove_properties_type( |
| /*@}*/ |
const CFG_CONTEXT con, enum cfg_property_type type, char *str, ...); |
| |
|
| |
/* }}} */ /*@}*/ |
| |
|
| /** |
/** |
| * @name Functions for processing context options |
* @name Functions for processing context options |
| */ |
*/ |
| /*@{*/ |
/*@{*/ /* {{{ */ |
| /* {{{ */ |
|
| |
|
| /** |
/** |
| * Parse context |
* Parse context |
|
|
| */ |
*/ |
| int cfg_get_cur_idx(const CFG_CONTEXT con); |
int cfg_get_cur_idx(const CFG_CONTEXT con); |
| |
|
| /* }}} */ |
/* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| /** |
/** |
| * @name Error handling functions |
* @name Error handling functions |
| */ |
*/ |
| /*@{*/ |
/*@{*/ /* {{{ */ |
| /* {{{ */ |
|
| |
|
| /** |
/** |
| * Print error string to stderr |
* Print error string to stderr |
|
|
| */ |
*/ |
| char *cfg_get_static_error_str(const int errorcode); |
char *cfg_get_static_error_str(const int errorcode); |
| |
|
| /* }}} */ |
/* }}} */ /*@}*/ |
| /*@}*/ |
|
| |
|
| #ifdef __cplusplus |
#ifdef __cplusplus |
| } |
} |