apk: default screen width 70 if ioctl says 0 as width
parent
cec1fa2b0f
commit
595c66595c
|
@ -249,7 +249,7 @@ static void setup_terminal(void)
|
||||||
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
||||||
if (ioctl(STDERR_FILENO,TIOCGWINSZ, &w) == 0)
|
if (ioctl(STDERR_FILENO,TIOCGWINSZ, &w) == 0)
|
||||||
apk_screen_width = w.ws_col;
|
apk_screen_width = w.ws_col;
|
||||||
else
|
if (apk_screen_width == 0)
|
||||||
apk_screen_width = 70;
|
apk_screen_width = 70;
|
||||||
if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && isatty(STDIN_FILENO))
|
if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && isatty(STDIN_FILENO))
|
||||||
apk_flags |= APK_PROGRESS;
|
apk_flags |= APK_PROGRESS;
|
||||||
|
|
Loading…
Reference in New Issue