|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
📋 TOML configuration file parser with schema validation and CLI override support More...
Go to the source code of this file.
Macros | |
| #define | ASCIICHAT_INSTALL_PREFIX "/usr" |
Internal Macros | |
| #define | CONFIG_WARN(fmt, ...) |
| Print configuration warning to stderr. | |
| #define | CONFIG_DEBUG(fmt, ...) |
| Print configuration debug message. | |
Functions | |
| asciichat_error_t | config_load_and_apply (bool is_client, const char *config_path, bool strict, options_t *opts) |
| Main function to load configuration from file and apply to global options. | |
| asciichat_error_t | config_create_default (const char *config_path, const options_t *opts) |
| Create default configuration file with all default values. | |
| asciichat_error_t | config_load_system_and_user (bool is_client, const char *user_config_path, bool strict, options_t *opts) |
| Load system config first, then user config (user config overrides system) | |
TOML Value Extraction Helpers | |
Helper functions to safely extract typed values from TOML datum structures. | |
Internal Configuration Application Functions | |
These functions apply configuration values from TOML sections to global options, with validation and error handling. | |
📋 TOML configuration file parser with schema validation and CLI override support
Definition in file config.c.
| #define ASCIICHAT_INSTALL_PREFIX "/usr" |
| #define CONFIG_DEBUG | ( | fmt, | |
| ... | |||
| ) |
Print configuration debug message.
Debug messages use the logging system if it's initialized, otherwise they are silently dropped.
Definition at line 59 of file config.c.
| #define CONFIG_WARN | ( | fmt, | |
| ... | |||
| ) |
Print configuration warning to stderr.
Config warnings are printed directly to stderr because logging may not be initialized yet when configuration is loaded. This ensures users see validation errors immediately.
Definition at line 47 of file config.c.