Annotation of mstools/posix/h/termios.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1991  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:    termios.h
                      8: 
                      9: Abstract:
                     10: 
                     11:    This module contains the primitive system data types described in section 
                     12:    7.1.2.1 of IEEE P1003.1-1990
                     13: 
                     14: Author:
                     15: 
                     16:    Ellen Aycock-Wright     06-Aug-1991
                     17: 
                     18: Revision History:
                     19: 
                     20: --*/
                     21: 
                     22: #ifndef _TERMIOS_
                     23: #define _TERMIOS_
                     24: 
                     25: #include <sys/types.h>
                     26: 
                     27: typedef unsigned long cc_t;
                     28: typedef unsigned long speed_t;
                     29: typedef unsigned long tcflag_t;
                     30: 
                     31: #define NCCS 9
                     32: 
                     33: struct termios {
                     34:     tcflag_t c_iflag;          /* input modes                          */
                     35:     tcflag_t c_oflag;          /* output modes                         */
                     36:     tcflag_t c_cflag;          /* control modes                        */
                     37:     tcflag_t c_lflag;          /* local modes                          */
                     38:     cc_t c_cc[NCCS];           /* control characters                   */
                     39: };
                     40: 
                     41: /*
                     42:  * Input modes, for c_iflag member
                     43:  */
                     44: 
                     45: #define BRKINT 0x00000001      /* signal interrupt on break            */
                     46: #define ICRNL  0x00000002      /* map CR to NL on input                */
                     47: #define IGNBRK 0x00000004      /* ignore break condition               */
                     48: #define IGNCR  0x00000008      /* ignore CR                            */
                     49: #define IGNPAR 0x00000010      /* ignore characters with parity errors */
                     50: #define INLCR  0x00000020      /* map NL to CR on input                */
                     51: #define INPCK  0x00000040      /* Enable input parity check            */
                     52: #define ISTRIP 0x00000080      /* strip character                      */
                     53: #define IXOFF  0x00000100      /* enable start/stop input control      */
                     54: #define IXON   0x00000200      /* enable start/stop output control     */
                     55: #define PARMRK 0x00000400      /* mark parity errors                   */
                     56: 
                     57: /*
                     58:  * Output modes, for c_oflag member
                     59:  */
                     60: 
                     61: #define OPOST  0x00000001      /* perform output processing            */
                     62: 
                     63: /*
                     64:  * Control modes, for c_cflag member
                     65:  */
                     66: 
                     67: #define CLOCAL 0x00000001      /* ignore modem status lines            */
                     68: #define CREAD  0x00000002      /* enable receiver                      */
                     69: #define CSIZE  0x000000F0      /* number of bits per byte              */
                     70: #define    CS5 0x00000010      /*      5 bits                          */
                     71: #define    CS6 0x00000020      /*      6 bits                          */
                     72: #define           CS7  0x00000040      /*      7 bits                          */
                     73: #define           CS8  0x00000080      /*      8 bits                          */
                     74: #define CSTOPB 0x00000100      /* send two stop bits, else one         */
                     75: #define HUPCL  0x00000200      /* hang up on last close                */
                     76: #define PARENB 0x00000400      /* parity enable                        */
                     77: #define PARODD 0x00000800      /* odd parity, else even                */
                     78: 
                     79: /*
                     80:  * Local modes, for c_lflag member
                     81:  */
                     82: 
                     83: #define ECHO   0x00000001      /* enable echo                          */
                     84: #define ECHOE  0x00000002      /* echo ERASE as an error-correcting backspace  */
                     85: #define ECHOK  0x00000004      /* echo KILL                            */
                     86: #define ECHONL 0x00000008      /* echo '\n'                            */
                     87: #define ICANON 0x00000010      /* canonical input (erase and kill processing)  */
                     88: #define IEXTEN 0x00000020      /* enable extended functions            */
                     89: #define ISIG   0x00000040      /* enable signals                       */
                     90: #define NOFLSH 0x00000080      /* disable flush after intr, quit, or suspend   */
                     91: #define TOSTOP 0x00000100      /* send SIGTTOU for background output   */
                     92: 
                     93: /*
                     94:  * Indices into c_cc array
                     95:  */
                     96: 
                     97: #define VEOF   0               /* EOF character                        */
                     98: #define VEOL   1               /* EOL character                        */
                     99: #define VERASE 2               /* ERASE character                      */
                    100: #define VINTR  3               /* INTR character                       */
                    101: #define VKILL  4               /* KILL character                       */
                    102: #define VMIN   VEOF            /* MIN value                            */
                    103: #define VQUIT  5               /* QUIT character                       */
                    104: #define VSUSP  6               /* SUSP character                       */
                    105: #define VTIME  VEOL            /* TIME value                           */
                    106: #define VSTART 7               /* START character                      */
                    107: #define VSTOP  8               /* STOP character                       */
                    108: 
                    109: /*
                    110:  * Values for speed_t's
                    111:  */
                    112: 
                    113: #define B0     0
                    114: #define B50    1
                    115: #define B75    2
                    116: #define B110   3
                    117: #define B134   4
                    118: #define B150   5
                    119: #define B200   6
                    120: #define B300   7
                    121: #define B600   8
                    122: #define B1200  9
                    123: #define B1800  10
                    124: #define B2400  11
                    125: #define B4800  12
                    126: #define B9600  13
                    127: #define B19200 14
                    128: #define B38400 15
                    129: 
                    130: /*
                    131:  * Optional actions for tcsetattr()
                    132:  */
                    133: #define TCSANOW                1
                    134: #define TCSADRAIN      2
                    135: #define TCSAFLUSH      3
                    136: 
                    137: /*
                    138:  * Queue selectors for tcflush()
                    139:  */
                    140: 
                    141: #define TCIFLUSH       0
                    142: #define TCOFLUSH       1
                    143: #define TCIOFLUSH      2
                    144: 
                    145: /*
                    146:  * Actions for tcflow()
                    147:  */
                    148: 
                    149: #define TCOOFF                 0
                    150: #define TCOON          1
                    151: #define TCIOFF         2
                    152: #define TCION          3
                    153: 
                    154: 
                    155: int _CRTAPI1 tcgetattr(int, struct termios *);
                    156: int _CRTAPI1 tcsetattr(int, int, const struct termios *);
                    157: int _CRTAPI1 tcsendbreak(int, int);
                    158: int _CRTAPI1 tcdrain(int);
                    159: int _CRTAPI1 tcflush(int, int);
                    160: int _CRTAPI1 tcflow(int, int);
                    161: 
                    162: pid_t _CRTAPI1 tcgetpgrp(int);
                    163: int   _CRTAPI1 tcsetpgrp(int, pid_t);
                    164: 
                    165: speed_t _CRTAPI1 cfgetospeed(const struct termios *);
                    166: int     _CRTAPI1 cfsetospeed(struct termios *, speed_t);
                    167: speed_t _CRTAPI1 cfgetispeed(const struct termios *);
                    168: int     _CRTAPI1 cfsetispeed(struct termios *, speed_t);
                    169: 
                    170: #endif /* _TERMIOS_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.