|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Mode-aware default value getters for options. More...
Go to the source code of this file.
Functions | |
| const void * | get_default_log_file (asciichat_mode_t mode) |
| Get mode-specific default value for –log-file. | |
| const void * | get_default_port (asciichat_mode_t mode) |
| Get mode-specific default value for –port. | |
| const void * | get_default_websocket_port (asciichat_mode_t mode) |
| Get mode-specific default value for –websocket-port. | |
| void | apply_mode_specific_defaults (options_t *opts) |
| Apply mode-specific defaults to an options struct after mode detection. | |
Mode-aware default value getters for options.
Provides mode-specific default values for options that vary by mode.
Definition in file options/registry/mode_defaults.c.
| void apply_mode_specific_defaults | ( | options_t * | opts | ) |
Apply mode-specific defaults to an options struct after mode detection.
This function updates options that have mode-dependent defaults (port and websocket_port) based on the detected mode. Log file paths are handled separately by options_get_log_filepath().
| opts | Options struct to update (must have detected_mode already set) |
Definition at line 107 of file options/registry/mode_defaults.c.
References get_default_port(), and get_default_websocket_port().
Referenced by options_init().
| const void * get_default_log_file | ( | asciichat_mode_t | mode | ) |
Get mode-specific default value for –log-file.
Returns empty string - the actual log file path is determined by options_get_log_filepath() which properly handles debug vs release builds and platform-specific temp directories.
Debug builds: Uses current working directory (server.log, client.log, etc.) Release builds: Uses $TMPDIR/ascii-chat/server.log, etc.
Definition at line 32 of file options/registry/mode_defaults.c.
| const void * get_default_port | ( | asciichat_mode_t | mode | ) |
Get mode-specific default value for –port.
Definition at line 50 of file options/registry/mode_defaults.c.
Referenced by apply_mode_specific_defaults().
| const void * get_default_websocket_port | ( | asciichat_mode_t | mode | ) |
Get mode-specific default value for –websocket-port.
Definition at line 78 of file options/registry/mode_defaults.c.
Referenced by apply_mode_specific_defaults().