summaryrefslogtreecommitdiffstats
path: root/src/appl/telnet/telnetd/termio-tn.c
blob: 8f27d59d3b905e01d976e1adac30e3b190c57180 (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
31
32
33
34
35
36
/* 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 <termio.h>

#include "defs.h"
#include "ext.h"

int readstream_termio(cmd, ibuf, vstop, vstart, ixon)
     int cmd;
     char *ibuf;
     char *vstop, *vstart;
     int *ixon;
{
  struct termio *tp;
  switch (cmd) {
  case TCSETA:
  case TCSETAW:
  case TCSETAF:
    tp = (struct termio *) (ibuf+1 + sizeof(struct iocblk));
#if 0				/* VSTOP/VSTART only in termios!? */
    *vstop = tp->c_cc[VSTOP];
    *vstart = tp->c_cc[VSTART];
#endif
    *ixon = tp->c_iflag & IXON;
    return 0;
  }
  return -1;
}

#else
int silence_warnings_about_empty_source_file_termio = 42;
#endif /* STREAMSPTY */