|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Internal helper functions for registry implementation. More...
Go to the source code of this file.
Functions | |
| void | registry_init_from_builders (void) |
| Initialize registry from category builders Populates g_options_registry by concatenating all category arrays. | |
| asciichat_error_t | registry_validate_unique_options (void) |
| Validate that no short or long options appear more than once in the registry. | |
| void | registry_init_size (void) |
| Initialize registry size and metadata. | |
| const registry_entry_t * | registry_find_entry_by_name (const char *long_name) |
| Get a registry entry by long name. | |
| const registry_entry_t * | registry_find_entry_by_short (char short_name) |
| Get a registry entry by short name. | |
| option_descriptor_t | registry_entry_to_descriptor (const registry_entry_t *entry) |
| Convert registry entry to option descriptor. | |
| bool | registry_entry_applies_to_mode (const registry_entry_t *entry, asciichat_mode_t mode, bool for_binary_help) |
| Check if an option applies to the given mode for display purposes. | |
Internal helper functions for registry implementation.
This file contains all the static helper functions used internally by the registry implementation. These functions are not part of the public API and are only used by public_api.c.
Definition in file core.c.
| bool registry_entry_applies_to_mode | ( | const registry_entry_t * | entry, |
| asciichat_mode_t | mode, | ||
| bool | for_binary_help | ||
| ) |
Check if an option applies to the given mode for display purposes.
This implements the same filtering logic as the help system's option_applies_to_mode(). Used by options_registry_get_for_display() to ensure completions match help output.
| entry | Registry entry to check |
| mode | Mode to check (use MODE_DISCOVERY for binary help) |
| for_binary_help | If true, show all options for any mode; if false, filter by mode |
Definition at line 200 of file core.c.
Referenced by options_registry_get_for_display().
| option_descriptor_t registry_entry_to_descriptor | ( | const registry_entry_t * | entry | ) |
Convert registry entry to option descriptor.
Definition at line 161 of file core.c.
Referenced by options_registry_get_binary_options(), options_registry_get_for_display(), and options_registry_get_for_mode().
| const registry_entry_t * registry_find_entry_by_name | ( | const char * | long_name | ) |
Get a registry entry by long name.
Definition at line 127 of file core.c.
References g_options_registry.
Referenced by options_registry_find_by_name().
| const registry_entry_t * registry_find_entry_by_short | ( | char | short_name | ) |
Get a registry entry by short name.
Definition at line 145 of file core.c.
References g_options_registry.
Referenced by options_registry_find_by_short().
| void registry_init_from_builders | ( | void | ) |
Initialize registry from category builders Populates g_options_registry by concatenating all category arrays.
Definition at line 23 of file core.c.
References g_category_builders, g_options_registry, and initialized.
Referenced by registry_init_size().
| void registry_init_size | ( | void | ) |
Initialize registry size and metadata.
Definition at line 108 of file core.c.
References g_metadata_populated, g_options_registry, g_registry_size, registry_init_from_builders(), and registry_validate_unique_options().
Referenced by options_get_help_text(), options_registry_add_all_to_builder(), options_registry_find_by_name(), options_registry_find_by_short(), options_registry_get_binary_options(), options_registry_get_count(), options_registry_get_for_display(), options_registry_get_for_mode(), options_registry_get_metadata(), and options_registry_get_raw().
| asciichat_error_t registry_validate_unique_options | ( | void | ) |
Validate that no short or long options appear more than once in the registry.
Definition at line 71 of file core.c.
References g_options_registry.
Referenced by registry_init_size().