projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
only set window size if not previously set
[unix-history]
/
usr
/
src
/
usr.bin
/
tset
/
tset.c
diff --git
a/usr/src/usr.bin/tset/tset.c
b/usr/src/usr.bin/tset/tset.c
index
f86274c
..
7e44cb1
100644
(file)
--- a/
usr/src/usr.bin/tset/tset.c
+++ b/
usr/src/usr.bin/tset/tset.c
@@
-1112,9
+1112,12
@@
ask:
/* Set window size */
if (DoSetenv) {
/* Set window size */
if (DoSetenv) {
- win.ws_row = lines;
- win.ws_col = columns;
- ioctl(FILEDES, TIOCSWINSZ, &win);
+ ioctl(FILEDES, TIOCGWINSZ, &win);
+ if (win.ws_row == 0 && win.ws_col == 0) {
+ win.ws_row = lines;
+ win.ws_col = columns;
+ ioctl(FILEDES, TIOCSWINSZ, &win);
+ }
}
/* output startup string */
if (!NoInit)
}
/* output startup string */
if (!NoInit)