summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
645dbd4)
size unavailable".
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8290
cda61777-01e9-0310-a592-
d414129be87e
ctx->progress = progress;
{
struct winsize ws;
ctx->progress = progress;
{
struct winsize ws;
- if (progress && ioctl(2, TIOCGWINSZ, &ws) == 0)
+ if (progress &&
+ ioctl(2, TIOCGWINSZ, &ws) == 0 &&
+ ws.ws_col > 0)
ctx->progwidth = ws.ws_col - 1;
else
ctx->progwidth = 79;
ctx->progwidth = ws.ws_col - 1;
else
ctx->progwidth = 79;