fix misspelling of TIOCGWINSZ and bad use of fields
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5040 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -81,8 +81,8 @@ get_window_size(int fd, struct winsize *wp)
|
||||
if(wp->ws_col > 0 && wp->ws_row > 0)
|
||||
return 0;
|
||||
|
||||
#if defined(TIOGCWINSZ)
|
||||
ret = ioctl(fd, TIOGCWINSZ, &tmp);
|
||||
#if defined(TIOCGWINSZ)
|
||||
ret = ioctl(fd, TIOCGWINSZ, &tmp);
|
||||
#elif defined(TIOCGSIZE)
|
||||
{
|
||||
struct ttysize ts;
|
||||
@@ -90,7 +90,7 @@ get_window_size(int fd, struct winsize *wp)
|
||||
ret = ioctl(fd, TIOCGSIZE, &ts);
|
||||
if(ret == 0) {
|
||||
tmp.ws_row = ts.ts_lines;
|
||||
tmp.ws_row = ts.ts_cols;
|
||||
tmp.ws_col = ts.ts_cols;
|
||||
tmp.ws_xpixel = 0;
|
||||
tmp.ws_ypixel = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user