aboutsummaryrefslogtreecommitdiff
path: root/src/appl/telnet/telnetd/termios-tn.c
blob: 4712a3326c6ff367e8eddd445202d8e08b5f6048 (plain)
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
/* handle having mutually exclusive termio vs. termios */
/* return 0 if handled */
#ifdef	STREAMSPTY
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ioctl.h>
#include <termios.h>

int readstream_termios(cmd, ibuf, vstop, vstart, ixon)
     int cmd;
     char *ibuf;
     char *vstop, *vstart;
     int *ixon;
{
  struct termios *tsp;
  switch (cmd) {
  case TCSETS:
  case TCSETSW:
  case TCSETSF:
    tsp = (struct termios *)
      (ibuf+1 + sizeof(struct iocblk));
    *vstop = tsp->c_cc[VSTOP];
    *vstart = tsp->c_cc[VSTART];
    *ixon = tsp->c_iflag & IXON;
    return 0;
  }
  return -1;
}

#endif /* STREAMSPTY */