1 #include <autoconf.h> 2 3 /* handle having mutually exclusive termio vs. termios */ 4 /* return 0 if handled */ 5 #ifdef STREAMSPTY 6 #include <sys/types.h> 7 #include <sys/stream.h> 8 #include <sys/ioctl.h> 9 #include <termios.h> 10 #if !defined(TCSETS) && defined(_AIX) /* kludge for AIX */ 11 #include <termio.h> 12 #endif 13 14 #include "defs.h" 15 #include "ext.h" 16 readstream_termios(cmd,ibuf,vstop,vstart,ixon)17int readstream_termios(cmd, ibuf, vstop, vstart, ixon) 18 int cmd; 19 char *ibuf; 20 char *vstop, *vstart; 21 int *ixon; 22 { 23 struct termios *tsp; 24 switch (cmd) { 25 case TCSETS: 26 case TCSETSW: 27 case TCSETSF: 28 tsp = (struct termios *) 29 (ibuf+1 + sizeof(struct iocblk)); 30 *vstop = tsp->c_cc[VSTOP]; 31 *vstart = tsp->c_cc[VSTART]; 32 *ixon = tsp->c_iflag & IXON; 33 return 0; 34 } 35 return -1; 36 } 37 38 #else 39 int silence_warnings_about_empty_source_file_termios = 42; 40 #endif /* STREAMSPTY */ 41