← Commit list

20c7877dcb

AlanKingPL
AlanKingPL
2026-07-24
SUCCESS Duration: 230s

Subject

terminal: Enhance terminal size detection for multiple outputs

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/terminal.c+4 -0
@@ -62,6 +62,10 @@ unsigned int get_terminal_columns(void)
struct winsize ts;
if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
cols = (int)ts.ws_col;
+ else if(!ioctl(STDOUT_FILENO, TIOCGWINSZ, &ts))
+ cols = (int)ts.ws_col;
+ else if(!ioctl(STDERR_FILENO, TIOCGWINSZ, &ts))
+ cols = (int)ts.ws_col;
#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
{
HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);