1: /* @(#)pkon.c 2.1 SCCS id keyword */
2: #include <sgtty.h>
3:
4: struct piocb {
5: unsigned t;
6: short psize;
7: short mode;
8: short state;
9: char window;
10: };
11: pkon(fd, size)
12: {
13: if (size&037 || size > 128) {
14: write(2,"bad packet size\n",16);
15: return(-1);
16: }
17: return(turnon(fd, size, 2, 0));
18: }
19: turnon(fd,psize,window,mode)
20: {
21: struct piocb p;
22:
23: p.window = window;
24: p.psize = psize;
25: p.mode = mode;
26: p.t = 1;
27: if (ioctl(fd,TIOCSETD,&p) < 0 || ioctl(fd,DIOCGETP,&p) < 0) {
28: return(-1);
29: }
30: return(p.psize);
31: }
32:
33: pkoff(fd)
34: {
35: struct piocb p;
36:
37: close(fd);
38: return;
39: /*
40: p.t = 0;
41: return(ioctl(fd,TIOCSETD,&p));
42: */
43: }
Defined functions
pkoff
defined in line
33;
never used
pkon
defined in line
11;
never used
Defined struct's
piocb
defined in line
4; used 4 times