|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
#include "mrtklib/mrtk_options.h"Go to the source code of this file.
Functions | |
| int | loadopts_toml (const char *file, opt_t *opts) |
| Load options from a TOML configuration file. | |
| int | saveopts_toml (const char *file, const char *comment, const opt_t *opts) |
| Save options to a TOML configuration file. | |
|
extern |
Load options from a TOML configuration file.
| [in] | file | Path to the TOML file. |
| [out] | opts | Options table (sysopts[]-compatible, terminated by empty name). |
Reads a TOML file and maps semantic section.key paths to legacy option names in the opts table. Unknown TOML keys are silently skipped.
Definition at line 608 of file mrtk_toml.c.
References check_unknown_keys(), free, toml_alias_t::legacy_name, toml_map_t::legacy_name, MAXSTRPATH, navigate_table(), navsys_str2mask(), toml_alias_t::new_key, toml_alias_t::new_section, toml_datum_t::ok, toml_alias_t::old_key, toml_alias_t::old_section, toml_datum_t::s, searchopt(), str2opt(), toml_alias, toml_array_in(), toml_array_nelem(), toml_free(), toml_map_t::toml_key, toml_key_exists(), toml_mapping, toml_parse_file(), toml_map_t::toml_section, toml_string_at(), toml_val_to_str(), trace(), toml_datum_t::u, and opt_t::var.
Referenced by loadopts().
|
extern |
Save options to a TOML configuration file.
| [in] | file | Path to the output TOML file. |
| [in] | comment | Header comment (NULL for none). |
| [in] | opts | Options table (terminated by empty name). |
Definition at line 785 of file mrtk_toml.c.
References opt_t::format, toml_map_t::legacy_name, opt2str(), searchopt(), toml_map_t::toml_key, toml_mapping, toml_map_t::toml_section, and trace().
Referenced by saveopts().