blob: 52578fbaa1f128732b906d06f95c2d2e29b66c30 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
include <syserr.h>
include <chars.h>
include <ttyset.h>
include "tty.h"
# TTYSTATI -- Fetch a TTY parameter.
int procedure ttystati (tty, parameter)
pointer tty
int parameter
char parnum[3]
int value, junk, itoc()
begin
switch (parameter) {
case TTY_PADCHAR:
value = T_PADCHAR(tty)
case TTY_TABS:
value = T_HTOK(tty)
case TTY_SOTYPE:
value = T_SOTYPE(tty)
case TTY_BAUD:
value = T_BAUD(tty)
case TTY_NLINES:
value = T_NLINES(tty)
case TTY_NCOLS:
value = T_NCOLS(tty)
default:
junk = itoc (parameter, parnum, 3)
call syserrs (SYS_TTYSTAT, parnum)
}
return (value)
end
|