Annotation of coherent/f/usr/include.78/sgtty.h, revision 1.1

1.1     ! root        1: /* (-lgl
        !             2:  *     COHERENT Version 4.0
        !             3:  *     Copyright (c) 1982, 1993 by Mark Williams Company.
        !             4:  *     All rights reserved. May not be copied without permission.
        !             5:  -lgl) */
        !             6: /*
        !             7:  * Terminal ioctl.
        !             8:  * This is an ibm-pc special case file, many of these ioctls apply
        !             9:  * only to the pc console and pc asynchronous ports.
        !            10:  */
        !            11: 
        !            12: #ifndef         __SGTTY_H__
        !            13: #define         __SGTTY_H__
        !            14: 
        !            15: #include <sys/types.h>
        !            16: 
        !            17: /*
        !            18:  *******************************
        !            19:  *
        !            20:  *      386 version
        !            21:  *
        !            22:  *******************************
        !            23:  */
        !            24: #ifdef _I386
        !            25: /*
        !            26:  * Ioctl functions.
        !            27:  */
        !            28: #define        TIOCHPCL        ('t'<<8|2)      /* Hang up on last close */
        !            29: #define        TIOCGETP        ('t'<<8|8)      /* Terminal get modes (old gtty) */
        !            30: #define        TIOCSETP        ('t'<<8|9)      /* Terminal set modes (old stty) */
        !            31: #define        TIOCSETN        ('t'<<8|10)     /* Set modes w/o delay or out flush */
        !            32: #define        TIOCEXCL        ('t'<<8|13)     /* Set exclusive use */
        !            33: #define        TIOCNXCL        ('t'<<8|14)     /* Set non-exclusive use */
        !            34: #define TIOCFLUSH      ('t'<<8|16)     /* Flush characters in I/O queues */
        !            35: #define        TIOCSETC        ('t'<<8|17)     /* Set characters */
        !            36: #define        TIOCGETC        ('t'<<8|18)     /* Get characters */
        !            37: 
        !            38: /*
        !            39:  * Structure for TIOVGETB/TIOVPUTB
        !            40:  */
        !            41: struct vidctl {
        !            42:        short   v_position;             /* Position in video memory */
        !            43:        short   v_count;                /* Number of characters to transfer */
        !            44:        short   v_buffer;               /* Character buffer to read/write */
        !            45: };
        !            46: 
        !            47: /*
        !            48:  * stty/gtty modes.
        !            49:  */
        !            50: #define        XTABS   0x0002          /* Expand tabs to spaces */
        !            51: #define        LCASE   0x0004          /* Lowercase mapping on input */
        !            52: #define        ECHO    0x0008          /* Echo input characters */
        !            53: #define CRMOD  0x0010          /* Map '\r' to '\n' */
        !            54: #define        RAW     0x0020
        !            55: #define        ODDP    0x0040          /* Allow odd parity */
        !            56: #define        EVENP   0x0080          /* Allow even parity */
        !            57: #define        ANYP    0x00C0          /* Allow any parity */
        !            58: 
        !            59: /*
        !            60:  * The following are not part of S5 sgtty.
        !            61:  * They are here to allow compilation of old V7 sources.
        !            62:  */
        !            63: #define        CBREAK  0x010000        /* Each input character causes wakeup */
        !            64: #define        TANDEM  0x020000        /* flow control protocol */
        !            65: #define        CRT     0x040000        /* CRT character erase */
        !            66: #define RAWIN  0x080000
        !            67: #define RAWOUT 0x100000
        !            68: 
        !            69: /*
        !            70:  * Names for terminal speeds.
        !            71:  */
        !            72: #define        B0      0               /* Hangup if modem control enabled */
        !            73: #define        B50     1               /* 50 bps */
        !            74: #define        B75     2               /* 75 bps */
        !            75: #define        B110    3               /* 110 bps */
        !            76: #define        B134    4               /* 134.5 bps (IBM 2741) */
        !            77: #define        B150    5               /* 150 bps */
        !            78: #define        B200    6               /* 200 bps */
        !            79: #define        B300    7               /* 300 bps */
        !            80: #define        B600    8               /* 600 bps */
        !            81: #define        B1200   9               /* 1200 bps */
        !            82: #define        B1800   10              /* 1800 bps */
        !            83: #define        B2400   11              /* 2400 bps */
        !            84: #define        B4800   12              /* 4800 bps */
        !            85: #define        B9600   13              /* 9600 bps */
        !            86: #define        B19200  14              /* 19200 bps */
        !            87: #define        B38400  15
        !            88: #define        EXTA    14
        !            89: #define        EXTB    15
        !            90: #else
        !            91: /*
        !            92:  *******************************
        !            93:  *
        !            94:  *      286 version
        !            95:  *
        !            96:  *******************************
        !            97:  */
        !            98: 
        !            99: /*
        !           100:  * Ioctl functions.
        !           101:  */
        !           102: #define        TIOCSETP        0100            /* Terminal set modes (old stty) */
        !           103: #define        TIOCGETP        0101            /* Terminal get modes (old gtty) */
        !           104: #define        TIOCSETC        0102            /* Set characters */
        !           105: #define        TIOCGETC        0103            /* Get characters */
        !           106: #define        TIOCSETN        0104            /* Set modes w/o delay or out flush */
        !           107: #define        TIOCEXCL        0105            /* Set exclusive use */
        !           108: #define        TIOCNXCL        0106            /* Set non-exclusive use */
        !           109: #define        TIOCHPCL        0107            /* Hang up on last close */
        !           110: #define TIOCFLUSH      0110            /* Flush characters in I/O queues */
        !           111: 
        !           112: /*
        !           113:  * Compatibility with gtty and stty.
        !           114:  */
        !           115: #define        stty(u,v)       ioctl(u,TIOCSETP,v)
        !           116: #define        gtty(u,v)       ioctl(u,TIOCGETP,v)
        !           117: 
        !           118: /*
        !           119:  * Structure for TIOVGETB/TIOVPUTB
        !           120:  */
        !           121: struct vidctl {
        !           122:        int     v_position;             /* Position in video memory */
        !           123:        int     v_count;                /* Number of characters to transfer */
        !           124:        char    *v_buffer;              /* Character buffer to read/write */
        !           125: };
        !           126: 
        !           127: /*
        !           128:  * Bits from old stty/gtty modes.
        !           129:  */
        !           130: #define        EVENP   01              /* Allow even parity */
        !           131: #define        ODDP    02              /* Allow odd parity */
        !           132: #define        ANYP    03              /* Allow any parity */
        !           133: #define CRMOD  04              /* Map '\r' to '\n' */
        !           134: #define        ECHO    010             /* Echo input characters */
        !           135: #define        LCASE   020             /* Lowercase mapping on input */
        !           136: #define        CBREAK  040             /* Each input character causes wakeup */
        !           137: #define        RAWIN   0100            /* 8-bit input raw */
        !           138: #define        RAWOUT  0200            /* 8-bit output raw */
        !           139: #define        TANDEM  0400            /* flow control protocol */
        !           140: #define        XTABS   01000           /* Expand tabs to spaces */
        !           141: #define        CRT     02000           /* CRT character erase */
        !           142: 
        !           143: /*
        !           144:  * Compatibility.
        !           145:  */
        !           146: #define        RAW     (RAWIN|RAWOUT)  /* Raw mode */
        !           147: 
        !           148: /*
        !           149:  * Names for terminal speeds.
        !           150:  */
        !           151: #define        B0      0               /* Hangup if modem control enabled */
        !           152: #define        B50     1               /* 50 bps */
        !           153: #define        B75     2               /* 75 bps */
        !           154: #define        B110    3               /* 110 bps */
        !           155: #define        B134    4               /* 134.5 bps (IBM 2741) */
        !           156: #define        B150    5               /* 150 bps */
        !           157: #define        B200    6               /* 200 bps */
        !           158: #define        B300    7               /* 300 bps */
        !           159: #define        B600    8               /* 600 bps */
        !           160: #define        B1200   9               /* 1200 bps */
        !           161: #define        B1800   10              /* 1800 bps */
        !           162: #define        B2000   11              /* 2000 bps */
        !           163: #define        B2400   12              /* 2400 bps */
        !           164: #define        B3600   13              /* 3600 bps */
        !           165: #define        B4800   14              /* 4800 bps */
        !           166: #define        B7200   15              /* 7200 bps */
        !           167: #define        B9600   16              /* 9600 bps */
        !           168: #define        B19200  17              /* 19200 bps */
        !           169: #define        EXTA    18              /* External A (DH-11) */
        !           170: #define        EXTB    19              /* External B (DH-11) */
        !           171: #endif
        !           172: 
        !           173: /*
        !           174:  *******************************
        !           175:  *
        !           176:  *      Common definitions for 286/386 versions
        !           177:  *
        !           178:  *******************************
        !           179:  */
        !           180: #define TIOCCHPCL      0111            /* Don't hang up on last close */
        !           181: #define TIOCGETTF      0112            /* Get tty flag word */
        !           182: #define TIOCBREAD      0113            /* Blocking read in CBREAK/RAW mode */
        !           183: #define TIOCCBREAD     0114            /* Turn off TIOCBREAD */
        !           184: #define TIOCSHIFT      0115            /* Switch console left-SHIFT & "\" */
        !           185: #define TIOCCSHIFT     0116            /* Normal console left-SHIFT & "\" */
        !           186: 
        !           187: #define        TIOCQUERY       0120            /* No. of chars waiting for read */
        !           188: 
        !           189: #define        TIOCSETG        0130            /* Set tty process group */
        !           190: 
        !           191: #define        TIOCGETF        0200            /* Get function keys  (dev. dep.) */
        !           192: #define        TIOCSETF        0201            /* Set function keys  (dev. dep.) */
        !           193: #define        TIOCGETKBT      0202            /* Get keyboard table (dev. dep.) */
        !           194: #define        TIOCSETKBT      0203            /* Set keyboard table (dev. dep.) */
        !           195: 
        !           196: /* misc. functions */
        !           197: 
        !           198: #define TIOCSDTR       0301            /* Set DTR */
        !           199: #define TIOCCDTR       0302            /* Clear DTR */
        !           200: #define TIOCSRTS       0303            /* Set RTS */
        !           201: #define TIOCCRTS       0304            /* Clear RTS */
        !           202: #define TIOCSBRK       0305            /* Set BREAK */
        !           203: #define TIOCCBRK       0306            /* Clear BREAK */
        !           204: 
        !           205: #define TIOCRSPEED     0320            /* Set "raw" line I/O speed divisor */
        !           206: #define TIOCWORDL      0321            /* Set line word length and stop bits */
        !           207: 
        !           208: #define TIOCRMSR       0400            /* Get CTS/DSR/RI/RLSD (MSR) */
        !           209: 
        !           210: #define TIOVGETB       0500            /* Read video memory */
        !           211: #define TIOVPUTB       0501            /* Write video memory */
        !           212: 
        !           213: /*
        !           214:  * Bits for TIOCRMSR.
        !           215:  */
        !           216: 
        !           217: #define MSRCTS         1               /* Clear to Send */
        !           218: #define MSRDSR         2               /* Data Set Ready */
        !           219: #define MSRRI          4               /* Ring Indicator */
        !           220: #define MSRRLSD                8               /* Received Line Signal Detect */
        !           221: 
        !           222: /*
        !           223:  * Attribute masks for TIOVPUTB - attributes occupy odd addresses
        !           224:  * in video memory.
        !           225:  */
        !           226: #define        VNORM   0x07                    /* Ordinary Video */
        !           227: #define        VINTE   0x08                    /* Intense video */
        !           228: #define        VBLIN   0x80                    /* Blinking video */
        !           229: #define        VREVE   0x70                    /* Reverse video */
        !           230: #define        VUNDE   0x01                    /* Underline video (mono board) */
        !           231: 
        !           232: /*
        !           233:  * Structure for TIOCSETP/TIOCGETP
        !           234:  */
        !           235: struct sgttyb {
        !           236:        char    sg_ispeed;              /* Input speed */
        !           237:        char    sg_ospeed;              /* Output speed */
        !           238:        char    sg_erase;               /* Character erase */
        !           239:        char    sg_kill;                /* Line kill character */
        !           240:        int     sg_flags;               /* Flags */
        !           241: };
        !           242: 
        !           243: /*
        !           244:  * Structure for TIOCSETC/TIOCGETC
        !           245:  */
        !           246: struct tchars {
        !           247:        char    t_intrc;                /* Interrupt */
        !           248:        char    t_quitc;                /* Quit */
        !           249:        char    t_startc;               /* Start output */
        !           250:        char    t_stopc;                /* Stop output */
        !           251:        char    t_eofc;                 /* End of file */
        !           252:        char    t_brkc;                 /* Input delimiter */
        !           253: };
        !           254: 
        !           255: /*
        !           256:  * Overlying structure for ioctl.
        !           257:  */
        !           258: union ioctl {
        !           259:        struct  sgttyb  io_sgttyb;
        !           260:        struct  tchars  io_tchars;
        !           261:        struct  vidctl  io_vidctl;
        !           262: };
        !           263: 
        !           264: 
        !           265: #endif

unix.superglobalmegacorp.com

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