zero tmp
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4995 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -73,6 +73,7 @@ get_window_size(int fd, struct winsize *wp)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
memset(wp, 0, sizeof(*wp));
|
memset(wp, 0, sizeof(*wp));
|
||||||
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
if((s = getenv("COLUMNS")))
|
if((s = getenv("COLUMNS")))
|
||||||
wp->ws_col = atoi(s);
|
wp->ws_col = atoi(s);
|
||||||
if((s = getenv("LINES")))
|
if((s = getenv("LINES")))
|
||||||
@@ -107,14 +108,14 @@ get_window_size(int fd, struct winsize *wp)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(ret == 0) {
|
if(ret == 0) {
|
||||||
if(wp->ws_col == 0)
|
if(wp->ws_col == 0) {
|
||||||
wp->ws_col = tmp.ws_col;
|
wp->ws_col = tmp.ws_col;
|
||||||
if(wp->ws_row == 0)
|
|
||||||
wp->ws_row = tmp.ws_row;
|
|
||||||
if(wp->ws_xpixel == 0)
|
|
||||||
wp->ws_xpixel = tmp.ws_xpixel;
|
wp->ws_xpixel = tmp.ws_xpixel;
|
||||||
if(wp->ws_ypixel == 0)
|
}
|
||||||
|
if(wp->ws_row == 0) {
|
||||||
|
wp->ws_row = tmp.ws_row;
|
||||||
wp->ws_ypixel = tmp.ws_ypixel;
|
wp->ws_ypixel = tmp.ws_ypixel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user