diff options
| author | Stefan Boberg <[email protected]> | 2026-03-31 09:57:25 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-03-31 09:57:25 +0200 |
| commit | 0951f7ce5cc21096180dcf8ed3aa0aa4aef80e63 (patch) | |
| tree | cd2d85c65b33329205fbd0bc29532c92c858412d | |
| parent | Add Markdown reference generation and interactive browser with word wrapping (diff) | |
| download | zen-sb/zen-help.tar.xz zen-sb/zen-help.zip | |
Fix forward declaration order for s_GotSigWinch and SigWinchHandlersb/zen-help
Move the SIGWINCH signal handler and its flag variable before
RawModeGuard, which references them in its constructor.
| -rw-r--r-- | src/zenutil/consoletui.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/zenutil/consoletui.cpp b/src/zenutil/consoletui.cpp index 84af1d372..354d24d8d 100644 --- a/src/zenutil/consoletui.cpp +++ b/src/zenutil/consoletui.cpp @@ -74,6 +74,15 @@ EnableVirtualTerminal() // ANSI escape codes are native on POSIX terminals; nothing to do } +// SIGWINCH (terminal resize) flag — set by signal handler, consumed by TuiReadKey() +static volatile sig_atomic_t s_GotSigWinch = 0; + +static void +SigWinchHandler(int /*Sig*/) +{ + s_GotSigWinch = 1; +} + // RAII guard: switches the terminal to raw/unbuffered input mode and restores // the original attributes on destruction. class RawModeGuard @@ -146,15 +155,6 @@ static bool s_InLiveMode = false; static char s_LastChar = 0; -// SIGWINCH (terminal resize) flag — set by signal handler, consumed by TuiReadKey() -static volatile sig_atomic_t s_GotSigWinch = 0; - -static void -SigWinchHandler(int /*Sig*/) -{ - s_GotSigWinch = 1; -} - #endif // ZEN_PLATFORM_WINDOWS / POSIX ////////////////////////////////////////////////////////////////////////// |