Scroll to navigation

IniFormat(3) Library Functions Manual IniFormat(3)

NAME

IniFormat - 24-bit bitfield representing the format of an INI file (INI dialect)

SYNOPSIS

#include <confini.h>

Data Fields


unsigned char delimiter_symbol: 7
unsigned char case_sensitive: 1
unsigned char semicolon_marker: 2
unsigned char hash_marker: 2
unsigned char section_paths: 2
unsigned char multiline_nodes: 2
unsigned char no_single_quotes: 1
unsigned char no_double_quotes: 1
unsigned char no_spaces_in_names: 1
unsigned char implicit_is_not_empty: 1
unsigned char do_not_collapse_values: 1
unsigned char preserve_empty_quotes: 1
unsigned char disabled_after_space: 1
unsigned char disabled_can_be_implicit: 1

Detailed Description

24-bit bitfield representing the format of an INI file (INI dialect)

Version

1.0

Date

October 6th, 2018 (version 1.7.0 of the library)

Field Documentation

IniFormat::case_sensitive

If set to true, string comparisons will be always case-sensitive.

IniFormat::delimiter_symbol

The key-value delimiter character (ASCII only allowed); if set to \0, any space is delimiter (/(?:\\(?:\n\r?|\r\n?)|[\t \v\f])+/); if, within the format given, IniFormat::delimiter_symbol matches a metacharacter ('\\', '\'', '\"'), its role as metacharacter will have higher priority than its role as delimiter symbol (i.e., the format will have no key-value delimiter); you may use the IniDelimiters enum for this.

IniFormat::disabled_after_space

If set to true, what follows /\s+[#;]\s+/ is allowed to be parsed as a disabled entry; conversely, only /\s+[#;](?!\s)/ will be able to mark a disabled entry.

IniFormat::disabled_can_be_implicit

If set to false, comments that do not contain a key-value delimiter will never be parsed as disabled keys, but always as simple comments (even if the format supports implicit keys).

IniFormat::do_not_collapse_values

If set to true, sequences of one or more spaces in values (/\s+/) will be dispatched verbatim.

IniFormat::hash_marker

The role of the hash character (use enum IniCommentMarker for this).

IniFormat::implicit_is_not_empty

If set to true, implicit keys (see Library Functions Manual) will be always dispatched using the values provided by the global variables INI_GLOBAL_IMPLICIT_VALUE and INI_GLOBAL_IMPLICIT_V_LEN for the fields IniDispatch::value and to IniDispatch::v_len respectively; if set to false, implicit keys will be considered to be empty keys.

IniFormat::multiline_nodes

Defines which class of entries are allowed to be multi-line (use enum IniMultiline for this).

IniFormat::no_double_quotes

If set to true, the double-quote character (") will be considered as a normal character.

IniFormat::no_single_quotes

If set to true, the single-quote character (') will be considered as a normal character.

IniFormat::no_spaces_in_names

If set to true, key and section names containing spaces (even within quotes) will be dispatched as INI_UNKNOWN. Note that setting IniFormat::delimiter_symbol to INI_ANY_SPACE will not automatically set this option to true (spaces will still be allowed within quotes, and in section names independently of quotes).

IniFormat::preserve_empty_quotes

If set to true, and if single/double quotes are metacharacters, ensures that, within values, empty strings enclosed between quotes ('' or '') will not be collapsed together with the spaces that surround them. This option is useful for values containing space-delimited arrays, in order to preserve their empty members – as in, for instance: coordinates = '' ''. Note that, in section and key names, empty strings enclosed between quotes are always collapsed together with their surrounding spaces.

IniFormat::section_paths

Defines whether and how the format supports sections (use enum IniSectionPaths for this).

IniFormat::semicolon_marker

The role of the semicolon character (use enum IniCommentMarker for this).

Author

Generated automatically by Doxygen for libconfini from the source code.

Thu Jul 21 2022 libconfini