Subversion Repositories planix.SVN

Rev

Rev 105 | Rev 113 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 105 Rev 107
Line 19... Line 19...
19
/* short	ospeed = -1;	mjm: def also in tputs.c of termcap.a  */
19
/* short	ospeed = -1;	mjm: def also in tputs.c of termcap.a  */
20
short	o_speed = -1;
20
short	o_speed = -1;
21
 
21
 
22
gettmode()
22
gettmode()
23
{
23
{
24
 
24
/*a XXX
25
#ifndef USG3TTY
25
#ifndef USG3TTY
26
	if (gtty(1, &tty) < 0)
26
	if (gtty(1, &tty) < 0)
27
		return;
27
		return;
28
	if (o_speed != tty.sg_ospeed)
28
	if (o_speed != tty.sg_ospeed)
29
		value(SLOWOPEN) = tty.sg_ospeed < B1200;
29
		value(SLOWOPEN) = tty.sg_ospeed < B1200;
30
	o_speed = tty.sg_ospeed;
30
	o_speed = tty.sg_ospeed;
31
	normf = tty.sg_flags;
31
	normf = tty.sg_flags;
32
	GT = (tty.sg_flags & XTABS) != XTABS && !XT;
32
	GT = (tty.sg_flags & XTABS) != XTABS && !XT;
33
	NONL = (tty.sg_flags & CRMOD) == 0;
33
	NONL = (tty.sg_flags & CRMOD) == 0;
34
#else
34
#else
35
	if (ioctl(1, TCGETA, &tty) < 0)
35
	if (ioctl(1, TCGETA, &tty) < 0)
36
		return;
36
		return;
37
	if (o_speed != (tty.c_cflag & CBAUD))	/* mjm */
37
	if (o_speed != (tty.c_cflag & CBAUD))	// mjm 
38
		value(SLOWOPEN) = (tty.c_cflag & CBAUD) < B1200;
38
		value(SLOWOPEN) = (tty.c_cflag & CBAUD) < B1200;
39
	o_speed = tty.c_cflag & CBAUD;
39
	o_speed = tty.c_cflag & CBAUD;
40
	normf = tty;
40
	normf = tty;
41
	GT = (tty.c_oflag & TABDLY) != TAB3 && !XT;
41
	GT = (tty.c_oflag & TABDLY) != TAB3 && !XT;
42
	NONL = (tty.c_oflag & ONLCR) == 0;
42
	NONL = (tty.c_oflag & ONLCR) == 0;
43
#endif
43
#endif */
44
}
44
}
45
 
45
 
46
char *xPC;
46
char *xPC;
47
char **sstrs[] = {
47
char **sstrs[] = {
48
	&AL, &BC, &BT, &CD, &CE, &CL, &CM, &xCR, &CS, &DC, &DL, &DM, &DO,
48
	&AL, &BC, &BT, &CD, &CE, &CL, &CM, &xCR, &CS, &DC, &DL, &DM, &DO,
Line 152... Line 152...
152
		serror("%s: Unknown terminal type", type);
152
		serror("%s: Unknown terminal type", type);
153
}
153
}
154
 
154
 
155
setsize()
155
setsize()
156
{
156
{
-
 
157
		
157
	register int l, i;
158
/* XXX	register int l, i;
158
	struct winsize win;
159
	struct winsize win;
159
 
160
 
160
	if (ioctl(0, TIOCGWINSZ, &win) < 0) {
161
	if (ioctl(0, TIOCGWINSZ, &win) < 0) {
161
		i = LINES = tgetnum("li");
162
		i = LINES = tgetnum("li");
162
		COLUMNS = tgetnum("co");
163
		COLUMNS = tgetnum("co");
Line 171... Line 172...
171
		LINES = 24;
172
		LINES = 24;
172
	if (LINES > TUBELINES)
173
	if (LINES > TUBELINES)
173
		LINES = TUBELINES;
174
		LINES = TUBELINES;
174
	l = LINES;
175
	l = LINES;
175
	if (o_speed < B1200)
176
	if (o_speed < B1200)
176
		l = 9;	/* including the message line at the bottom */
177
		l = 9;	// including the message line at the bottom 
177
	else if (o_speed < B2400)
178
	else if (o_speed < B2400)
178
		l = 17;
179
		l = 17;
179
	if (l > LINES)
180
	if (l > LINES)
180
		l = LINES;
181
		l = LINES;
181
	if (COLUMNS <= 4)
182
	if (COLUMNS <= 4)
Line 183... Line 184...
183
	options[WINDOW].ovalue = options[WINDOW].odefault = l - 1;
184
	options[WINDOW].ovalue = options[WINDOW].odefault = l - 1;
184
	if (defwind) options[WINDOW].ovalue = defwind;
185
	if (defwind) options[WINDOW].ovalue = defwind;
185
	options[SCROLL].ovalue = options[SCROLL].odefault = HC ? 11 : ((l-1) / 2);
186
	options[SCROLL].ovalue = options[SCROLL].odefault = HC ? 11 : ((l-1) / 2);
186
	if (i <= 0)
187
	if (i <= 0)
187
		LINES = 2;
188
		LINES = 2;
-
 
189
*/
188
}
190
}
189
 
191
 
190
zap()
192
zap()
191
{
193
{
192
	register char *namp;
194
	register char *namp;