configparser
INI File Parser
Functions
| Function | Description |
|---|---|
_ini_byte_at | Internal byte reader. |
_ini_copy | Internal: copy bytes from src+off to dst, length len. |
_ini_eq | Internal: compare two byte ranges for equality. |
_ini_skip_ws | Internal: skip whitespace at pos. Returns new pos. |
_ini_skip_line | Internal: skip to end of line. Returns pos after newline. |
_ini_add_entry | Internal: add one entry. Val info passed via h[11], h[12]. |
_ini_parse_section | Internal: parse section header. Sets h[9], h[10]. Returns pos after line. |
_ini_trim_end | Internal: trim trailing whitespace. Returns new end position. |
_ini_parse_kv | Internal: parse key=value line. Returns pos after line. |
ini_parse | Parse INI data from buf. Returns handle. |
ini_parse_full | Alias for compatibility. |
ini_count | Number of entries in the INI handle. |
ini_get | Get value for section+key. Copies to out, returns length. -1 if not found. |
ini_get_i64 | Get value as i64. Returns 0 if not found. Parses directly from data buffer to… |
ini_has_section | Check if section exists. Returns 1 if found, 0 otherwise. |
ini_set | Set a value for section+key. Overwrites if exists, appends if new. Val and vl… |
_ini_write_section_kvs | Internal: write section’s key=value pairs. |
ini_write | Write INI data to out buffer. Returns length written. |
Details
_ini_byte_at
fn _ini_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
_ini_copy
fn _ini_copy(dst: &i8, src: &i8, off: i64, len: i64) -> i64Internal: copy bytes from src+off to dst, length len.
_ini_eq
fn _ini_eq(a: &i8, aoff: i64, alen: i64, b: &i8, boff: i64, blen: i64) -> i64Internal: compare two byte ranges for equality.
_ini_skip_ws
fn _ini_skip_ws(buf: &i8, pos: i64, len: i64) -> i64Internal: skip whitespace at pos. Returns new pos.
_ini_skip_line
fn _ini_skip_line(buf: &i8, pos: i64, len: i64) -> i64Internal: skip to end of line. Returns pos after newline.
_ini_add_entry
fn _ini_add_entry(h: &i64, sec_off: i64, sec_len: i64, key_off: i64, key_len: i64) -> i64Internal: add one entry. Val info passed via h[11], h[12].
_ini_parse_section
fn _ini_parse_section(h: &i64, buf: &i8, pos: i64, len: i64) -> i64Internal: parse section header. Sets h[9], h[10]. Returns pos after line.
_ini_trim_end
fn _ini_trim_end(buf: &i8, start: i64, end_pos: i64) -> i64Internal: trim trailing whitespace. Returns new end position.
_ini_parse_kv
fn _ini_parse_kv(h: &i64, buf: &i8, pos: i64, len: i64) -> i64Internal: parse key=value line. Returns pos after line.
ini_parse
fn ini_parse(buf: &i8, len: i64) -> &i64Parse INI data from buf. Returns handle.
ini_parse_full
fn ini_parse_full(buf: &i8, len: i64) -> &i64Alias for compatibility.
ini_count
fn ini_count(h: &i64) -> i64Number of entries in the INI handle.
ini_get
fn ini_get(h: &i64, sec: &i8, slen: i64, key: &i8, klen: i64, out: &i8) -> i64Get value for section+key. Copies to out, returns length. -1 if not found.
ini_get_i64
fn ini_get_i64(h: &i64, sec: &i8, slen: i64, key: &i8, klen: i64) -> i64Get value as i64. Returns 0 if not found. Parses directly from data buffer to avoid alloc_pages overlap.
ini_has_section
fn ini_has_section(h: &i64, sec: &i8, slen: i64) -> i64Check if section exists. Returns 1 if found, 0 otherwise.
ini_set
fn ini_set(h: &i64, sec: &i8, slen: i64, key: &i8, klen: i64) -> i64Set a value for section+key. Overwrites if exists, appends if new. Val and vlen passed via h[11], h[12] to avoid 7-arg limit.
_ini_write_section_kvs
fn _ini_write_section_kvs(h: &i64, out: &i8, pos: i64, data: &i8, sec_off: i64, sec_len: i64) -> i64Internal: write section’s key=value pairs.
ini_write
fn ini_write(h: &i64, out: &i8, max: i64) -> i64Write INI data to out buffer. Returns length written.