Annotation of coherent/a/usr/include.b4ps2/sgtty.h, revision 1.1

1.1     ! root        1: /* (-lgl
        !             2:  *     COHERENT Version 3.2
        !             3:  *     Copyright (c) 1982, 1991 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        SGTTY_H
        !            14: 
        !            15: #include <sys/types.h>
        !            16: 
        !            17: /*
        !            18:  * Ioctl functions.
        !            19:  */
        !            20: #define        TIOCSETP        0100            /* Terminal set modes (old stty) */
        !            21: #define        TIOCGETP        0101            /* Terminal get modes (old gtty) */
        !            22: #define        TIOCSETC        0102            /* Set characters */
        !            23: #define        TIOCGETC        0103            /* Get characters */
        !            24: #define        TIOCSETN        0104            /* Set modes w/o delay or out flush */
        !            25: #define        TIOCEXCL        0105            /* Set exclusive use */
        !            26: #define        TIOCNXCL        0106            /* Set non-exclusive use */
        !            27: #define        TIOCHPCL        0107            /* Hang up on last close */
        !            28: #define TIOCCHPCL      0111            /* Don't hang up on last close */
        !            29: #define TIOCFLUSH      0110            /* Flush characters in I/O queues */
        !            30: #define TIOCGETTF      0112            /* Get tty flag word */
        !            31: #define TIOCBREAD      0113            /* Blocking read in CBREAK/RAW mode */
        !            32: #define TIOCCBREAD     0114            /* Turn off TIOCBREAD */
        !            33: #define TIOCSHIFT      0115            /* Switch console left-SHIFT & "\" */
        !            34: #define TIOCCSHIFT     0116            /* Normal console left-SHIFT & "\" */
        !            35: 
        !            36: #define        TIOCQUERY       0120            /* No. of chars waiting for read */
        !            37: 
        !            38: #define        TIOCSETG        0130            /* Set tty process group */
        !            39: 
        !            40: #define        TIOCGETF        0200            /* Get function keys  (dev. dep.) */
        !            41: #define        TIOCSETF        0201            /* Set function keys  (dev. dep.) */
        !            42: #define        TIOCGETKBT      0202            /* Get keyboard table (dev. dep.) */
        !            43: #define        TIOCSETKBT      0203            /* Set keyboard table (dev. dep.) */
        !            44: 
        !            45: /* misc. functions */
        !            46: 
        !            47: #define TIOCSDTR       0301            /* Set DTR */
        !            48: #define TIOCCDTR       0302            /* Clear DTR */
        !            49: #define TIOCSRTS       0303            /* Set RTS */
        !            50: #define TIOCCRTS       0304            /* Clear RTS */
        !            51: #define TIOCSBRK       0305            /* Set BREAK */
        !            52: #define TIOCCBRK       0306            /* Clear BREAK */
        !            53: 
        !            54: #define TIOCRSPEED     0320            /* Set "raw" line I/O speed divisor */
        !            55: #define TIOCWORDL      0321            /* Set line word length and stop bits */
        !            56: 
        !            57: #define TIOCRMSR       0400            /* Get CTS/DSR/RI/RLSD (MSR) */
        !            58: 
        !            59: #define TIOVGETB       0500            /* Read video memory */
        !            60: #define TIOVPUTB       0501            /* Write video memory */
        !            61: 
        !            62: /*
        !            63:  * Bits for TIOCRMSR.
        !            64:  */
        !            65: 
        !            66: #define MSRCTS         1               /* Clear to Send */
        !            67: #define MSRDSR         2               /* Data Set Ready */
        !            68: #define MSRRI          4               /* Ring Indicator */
        !            69: #define MSRRLSD                8               /* Received Line Signal Detect */
        !            70: 
        !            71: /*
        !            72:  * Attribute masks for TIOVPUTB - attributes occupy odd addresses
        !            73:  * in video memory.
        !            74:  */
        !            75: #define        VNORM   0x07                    /* Ordinary Video */
        !            76: #define        VINTE   0x08                    /* Intense video */
        !            77: #define        VBLIN   0x80                    /* Blinking video */
        !            78: #define        VREVE   0x70                    /* Reverse video */
        !            79: #define        VUNDE   0x01                    /* Underline video (mono board) */
        !            80: 
        !            81: /*
        !            82:  * Compatibility with gtty and stty.
        !            83:  */
        !            84: #define        stty(u,v)       ioctl(u,TIOCSETP,v)
        !            85: #define        gtty(u,v)       ioctl(u,TIOCGETP,v)
        !            86: 
        !            87: /*
        !            88:  * Structure for TIOCSETP/TIOCGETP
        !            89:  */
        !            90: struct sgttyb {
        !            91:        char    sg_ispeed;              /* Input speed */
        !            92:        char    sg_ospeed;              /* Output speed */
        !            93:        char    sg_erase;               /* Character erase */
        !            94:        char    sg_kill;                /* Line kill character */
        !            95:        int     sg_flags;               /* Flags */
        !            96: };
        !            97: 
        !            98: /*
        !            99:  * Structure for TIOCSETC/TIOCGETC
        !           100:  */
        !           101: struct tchars {
        !           102:        char    t_intrc;                /* Interrupt */
        !           103:        char    t_quitc;                /* Quit */
        !           104:        char    t_startc;               /* Start output */
        !           105:        char    t_stopc;                /* Stop output */
        !           106:        char    t_eofc;                 /* End of file */
        !           107:        char    t_brkc;                 /* Input delimiter */
        !           108: };
        !           109: 
        !           110: /*
        !           111:  * Structure for TIOVGETB/TIOVPUTB
        !           112:  */
        !           113: struct vidctl {
        !           114:        int     v_position;             /* Position in video memory */
        !           115:        int     v_count;                /* Number of characters to transfer */
        !           116:        char    *v_buffer;              /* Character buffer to read/write */
        !           117: };
        !           118: 
        !           119: /*
        !           120:  * Overlying structure for ioctl.
        !           121:  */
        !           122: union ioctl {
        !           123:        struct  sgttyb  io_sgttyb;
        !           124:        struct  tchars  io_tchars;
        !           125:        struct  vidctl  io_vidctl;
        !           126: };
        !           127: 
        !           128: /*
        !           129:  * Bits from old stty/gtty modes.
        !           130:  */
        !           131: #define        EVENP   01              /* Allow even parity */
        !           132: #define        ODDP    02              /* Allow odd 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: 
        !           172: #endif

unix.superglobalmegacorp.com

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