diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-10 15:20:37 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-10 15:20:57 +0200 |
commit | dd923ed06525d4f927c472be89259637916fd540 (patch) | |
tree | 368413c03c5881a4f6eee988f4d46f8b389ce9b2 /src/print.c | |
parent | 073df81973907469a0e5dfb1a064201df8e05b80 (diff) | |
download | apk-tools-dd923ed06525d4f927c472be89259637916fd540.tar.gz apk-tools-dd923ed06525d4f927c472be89259637916fd540.tar.bz2 apk-tools-dd923ed06525d4f927c472be89259637916fd540.tar.xz apk-tools-dd923ed06525d4f927c472be89259637916fd540.zip |
print: minimum screen width of 50
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c index 92c1b05..b47d8d7 100644 --- a/src/print.c +++ b/src/print.c @@ -31,8 +31,9 @@ int apk_get_screen_width(void) struct winsize w; if (apk_screen_width == 0) { - apk_screen_width = 70; - if (ioctl(STDERR_FILENO,TIOCGWINSZ, &w) == 0) + apk_screen_width = 50; + if (ioctl(STDERR_FILENO, TIOCGWINSZ, &w) == 0 && + w.ws_col > 50) apk_screen_width = w.ws_col; } |