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
turnon defined in line 19; used 1 times
  • in line 17

Defined struct's

piocb defined in line 4; used 4 times
  • in line 21(2), 35(2)
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 621
Valid CSS Valid XHTML 1.0 Strict