|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
🔧 Core utilities: memory management, safe macros, and cross-platform helpers More...
Go to the source code of this file.
Functions | |
| bool | shutdown_is_requested (void) |
| __attribute__ ((constructor)) | |
| Register fork handlers for common module. | |
| asciichat_error_t | asciichat_shared_init (const char *log_file, bool is_client) |
| void | asciichat_shared_destroy (void) |
| Clean up all shared library subsystems. | |
Variables | |
| ASCIICHAT_API int | g_argc = 0 |
| ASCIICHAT_API char ** | g_argv = NULL |
| ASCIICHAT_API bool | g_color_flag_passed = false |
| ASCIICHAT_API bool | g_color_flag_value = false |
🔧 Core utilities: memory management, safe macros, and cross-platform helpers
Definition in file common.c.
| __attribute__ | ( | (constructor) | ) |
| void asciichat_shared_destroy | ( | void | ) |
Clean up all shared library subsystems.
Performs comprehensive cleanup of all subsystems initialized by asciichat_shared_init(). All cleanup functions are idempotent (safe to call multiple times), so this can be called explicitly and also via atexit() without issues.
Cleanup order is carefully chosen to be the reverse of initialization, ensuring dependencies are respected (e.g., timer cleanup before memory reporting, memory reporting before errno cleanup).
Definition at line 164 of file common.c.
References acds_strings_destroy(), asciichat_errno_destroy(), asciichat_pcre2_cleanup_all(), buffer_pool_cleanup_global(), colorscheme_destroy(), known_hosts_destroy(), lock_debug_cleanup_thread(), lock_debug_destroy(), log_cleanup_colors(), log_destroy(), log_shutdown_begin(), log_shutdown_end(), options_state_destroy(), platform_destroy(), simd_caches_destroy_all(), timer_system_destroy(), and webcam_destroy().
Referenced by client_main(), and main().
| asciichat_error_t asciichat_shared_init | ( | const char * | log_file, |
| bool | is_client | ||
| ) |
Definition at line 109 of file common.c.
References buffer_pool_init_global(), log_init(), platform_init(), terminal_is_piped_output(), and timer_system_init().
Referenced by main().
| bool shutdown_is_requested | ( | void | ) |
Definition at line 65 of file common.c.
Referenced by log_plain_msg(), log_plain_stderr_msg(), and log_plain_stderr_nonewline_msg().
| ASCIICHAT_API int g_argc = 0 |
Definition at line 45 of file common.c.
Referenced by main(), and terminal_should_color_output().
| ASCIICHAT_API char** g_argv = NULL |
Definition at line 46 of file common.c.
Referenced by main(), and terminal_should_color_output().
Definition at line 49 of file common.c.
Referenced by colored_string(), log_msg(), and main().