/* SPDX-License-Identifier: GPL-3.0-or-later */ /* * vfetch - neofetch but the ascii part is a video * * Copyright (C) 2026 Doan Luu Duc Tai * */ #include #include #include "src/config.h" #include "src/core.h" #include "src/error.h" #include "src/state.h" /* Required for the POSIX signal handler, which has a fixed signature and cannot * be passed user context. This global is the standard mechanism for the handler * to access application state. * NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) */ AppState *global_signal_handler_state_ptr = NULL; /* Required for the self-pipe mechanism, which allows the signal handler to * safely communicate with the main application thread. * NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) */ int global_signal_pipe[2] = {-1, -1}; int main(int argc, const char *argv[]) { AppState state = {0}; VfetchArgs args = {0}; VfetchError err = execute_program(argc, argv, &state, &args); int exit_code = EX_OK; if (err) { exit_code = map_vfetch_error_to_exit_code(err); } cleanup_application(&state, &args); return exit_code; }