|
libconfini
Yet another INI parser
|
Record of notable changes
Changes:
typedefs of callback functions (types IniStatsHandler and IniDispHandler, both required by load_ini_file() and load_ini_path(), type IniStrHandler, required by ini_array_split(), and type IniSubstrHandler, required by ini_array_foreach())_LIBCONFINI_INIFORMAT_AS_() has been renamed to INIFORMAT_TABLE_AS() and marked as public – please note that the arguments that are passed to the user-given callback are now different0:0:0); note that libtool versioning system does not affect the versioning of the project currently in use, but constitutes only a means for the linker to keep track of incompatibilities between different releases of the librarysrc/winres.rc; conditionally added option -avoid-version to LDFLAGS in order to skip foreign libtool versioning system under Microsoft Windows; created batch script mgwmake.bat for compiling libconfini under Microsoft Windows without Autotools)ini_fton() and ini_ntof())examples/topics/ini_array_foreach.c, examples/topics/ini_array_split.c and examples/miscellanea/stats_only.c)Changes:
load_ini_file(), private function get_type_as_active())CLOSE_SECTION character (]) is never followed by anything else than empty spacesChanges:
load_ini_path() – see issue #6 concerning file access under Microsoft Windows)Changes:
--disable-doc and --disable-examples options to the configure script--noconfigure and --help options to the autogen.sh scriptChanges:
INI_UNIXLIKE_FORMAT has been createdIniFormat::no_disabled_after_space has been renamed to IniFormat::disabled_after_space (the field has opposite meaning now, please invert your booleans accordingly)#include <stdio.h> from confini.c to confini.hChanges:
CONFINI_EFEOOR has been renamed to CONFINI_EOORChanges:
ltrim_hh(), unescape_cr_lf(), sanitize_section_path(), collapse_everything(), collapse_spaces() and uncomment())Changes:
ini_array_match() has been createdChanges:
ini_array_shift(), ini_array_break(), ini_array_release() have been createdOFF/ON has been added to the list of supported INI booleans0/1 has been removed from the list of supported INI booleansINIFORMAT_HAS_NO_ESC has been createdini_get_lazy_bool() has been removedIniDispatch::append_to is now passed as constini_string_match_ss(), ini_string_match_si(), ini_string_match_ii(), ini_string_parse(), ini_array_get_length(), ini_array_foreach(), ini_array_split(), private functions uncomment() and further_cuts())get_metachar_pos() and collapse_empty_quotes() have been createdsanitize_key_name() and † get_delimiter_pos() have been renamed to collapse_everything() and getn_metachar_pos() (the latter now requires one more argument)Changes:
IniFormat::section_paths option to the IniFormat bitfieldenum IniSectionPathsultrim_h() has been renamed to qultrim_h() and rewrittenini_array_foreach(), ini_array_split(), ini_string_parse(), private functions † get_delimiter_pos() and get_type_as_active())Changes:
IniFormat bitfieldINI_KEY, INI_SECTION, INI_DISABLED_KEY and INI_DISABLED_SECTION (see enum IniNodeType)examples/ini_filesChanges:
IniFormat::preserve_empty_quotes option to the IniFormat bitfieldIniFormat::hash, † IniFormat::semicolon and † IniFormat::multiline_entries have been renamed to IniFormat::hash_marker, IniFormat::semicolon_marker and IniFormat::multiline_nodesini_string_parse() has been createdini_collapse_array() has been renamed to ini_array_collapse()ini_split_array() has been renamed to ini_array_split()ini_set_implicit_value() has been renamed to ini_global_set_implicit_value()confini_global_set_lowercase_mode() has been renamed to ini_global_set_lowercase_mode()INI_INSENSITIVE_LOWERCASE has been renamed to INI_GLOBAL_LOWERCASE_MODEINI_GLOBAL_LOWERCASE_MODE has been set to FALSEIniFormatId has been renamed to IniFormatNumini_format_get_id() has been renamed to ini_fton()ini_format_set_to_id() has been renamed to ini_ntof() – now accepts only one argument and has a return valueINI_PARSE_COMMENT, † INI_SHOW_COMMENT, † INI_FORGET_COMMENT and † INI_NORMAL_CHARACTER have been renamed to INI_DISABLED_OR_COMMENT, INI_ONLY_COMMENT, INI_IGNORE and INI_IS_NOT_A_MARKERINI_EVERYTHING_MULTILINE, † INI_ACTIVE_AND_DISABLED_MULTILINE and † INI_ACTIVE_MULTILINE have been renamed to INI_MULTILINE_EVERYWHERE, INI_BUT_COMMENTS, and INI_BUT_DISABLED_AND_COMMENTSCONFINI_EIINTR and † CONFINI_EFEINTR have been renamed to CONFINI_IINTR and CONFINI_FEINTRenum tags † ConfiniErrorNo and † IniComments have been renamed to ConfiniInterruptNo and IniCommentMarkersanitize_section_name() has been renamed to sanitize_section_path()sanitize_key_name()ini_array_get_length(), ini_string_match_si(), ini_string_match_ii(), private functions sanitize_section_path() and collapse_spaces())Due to the many renamings this release is largely incompatible with previous versions. However it is possible to reach full backward compatibility with version 1.4.2 by using the following aliases:
#define hash hash_marker #define semicolon semicolon_marker #define multiline_entries multiline_nodes #define ini_collapse_array ini_array_collapse #define ini_split_array ini_array_split #define ini_set_implicit_value ini_global_set_implicit_value #define INI_INSENSITIVE_LOWERCASE INI_GLOBAL_LOWERCASE_MODE #define IniFormatId IniFormatNum #define ini_format_get_id ini_fton #define ini_format_set_to_id(DEST, SRC) (*(DEST) = ini_ntof(SRC)) #define INI_PARSE_COMMENT INI_DISABLED_OR_COMMENT #define INI_SHOW_COMMENT INI_ONLY_COMMENT #define INI_FORGET_COMMENT INI_IGNORE #define INI_NORMAL_CHARACTER INI_IS_NOT_A_MARKER #define INI_EVERYTHING_MULTILINE INI_MULTILINE_EVERYWHERE #define INI_ACTIVE_AND_DISABLED_MULTILINE INI_BUT_COMMENTS #define INI_ACTIVE_MULTILINE INI_BUT_COMMENTS #define CONFINI_EIINTR CONFINI_IINTR #define CONFINI_EFEINTR CONFINI_FEINTR
Changes:
sanitize_section_name()Changes:
CONFINI_ERRORINI_INSENSITIVE_LOWERCASEconfini_global_set_lowercase_mode(), ini_string_match_ss(), ini_string_match_si() and ini_string_match_ii()enum † ConfiniErrorNo, load_ini_file(), ini_unquote())#include <stdint.h> from confini.c to confini.h#include <stdio.h> from confini.h to confini.cChanges:
load_ini_file() now uses a FILE structure instead of a path – in order to use a path (a string), the shortcut load_ini_path() has been created#include <stdint.h> to confini.c#include <stdio.h> from confini.c to confini.hnul characters found in INI files will be skippedunsigned long int replaced with size_t in return values of ini_unquote(), ini_array_get_length() and † ini_collapse_array()unsigned int replaced with int in return values of load_ini_file(), ini_array_foreach() and † ini_split_array()${major}.${minor}.${revision} instead of ${major}.${minor}-${release})Changes:
Changes:
further_cuts()Changes:
Changes:
Changes:
ini_collapse_array() has been createdindex and format parameters have been added to callback function in ini_array_foreach() and † ini_split_array()INI_ERASE_COMMENT has been renamed to † INI_FORGET_COMMENTChanges:
Changes:
IniFormat bitfield has been changedIniFormat::implicit_is_special has been renamed to IniFormat::implicit_is_not_emptyIniFormat::no_collapsed_values has been renamed to IniFormat::do_not_collapse_valuesIniDispatch::d_length has been renamed to IniDispatch::d_lenIniDispatch::v_length has been renamed to IniDispatch::v_lenIniDispatch::at_len (length of IniDispatch::append_to) has been createdChanges:
IniFormatMask has been renamed to IniFormatIdini_format_set_from_mask() has been renamed to † ini_format_set_to_id()ini_format_calculate_mask() has been renamed to † ini_format_get_id()IniFormat::no_spaces_in_names: small bug fixedChanges:
IniDelimiters has been createdINI_ANY_SPACE (0) as delimiter in ini_array_get_length(), ini_array_foreach() and † ini_split_array()IniFormat::no_spaces_in_names has been createdIniFormat::no_disabled_after_spaces has been renamed to † IniFormat::no_disabled_after_spaceIniFormat::preserve_spaces_in_values has been renamed to † IniFormat::no_collapsed_valuesChanges:
ini_array_getlength() has been renamed to ini_array_get_length()ini_getbool() has been renamed to ini_get_bool()ini_getlazybool() has been renamed to ini_get_lazy_bool()ini_getfloat() has been renamed to ini_get_float()ini_getllint() has been renamed to ini_get_llint()get_ini_format_mask() has been renamed to † ini_format_calculate_mask()read_ini_format_mask() has been renamed to † ini_format_set_from_mask()Changes:
Changes:
Changes:
libconfini 0.9-1 is ready to be published!
1.8.14