mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-21 23:29:16 +00:00
176 lines
7.1 KiB
C
176 lines
7.1 KiB
C
/*
|
|
* Copyright (c) 1990, 1993
|
|
* The Regents of the University of California. All rights reserved.
|
|
* (c) UNIX System Laboratories, Inc.
|
|
* All or some portions of this file are derived from material licensed
|
|
* to the University of California by American Telephone and Telegraph
|
|
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
|
* the permission of UNIX System Laboratories, Inc.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by the University of
|
|
* California, Berkeley and its contributors.
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
* may be used to endorse or promote products derived from this software
|
|
* without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
* SUCH DAMAGE.
|
|
*
|
|
* @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94
|
|
* $Id: ioctl.compat.h,v 1.1 1997/02/28 04:42:14 gdr Exp $
|
|
*/
|
|
|
|
#ifndef _SYS_IOCTL_COMPAT_H_
|
|
#define _SYS_IOCTL_COMPAT_H_
|
|
|
|
#ifndef _SYS_TTYCHARS_H_
|
|
#include <sys/ttychars.h>
|
|
#endif
|
|
#ifndef _SYS_TTYDEV_H_
|
|
#include <sys/ttydev.h>
|
|
#endif
|
|
|
|
struct tchars {
|
|
char t_intrc; /* interrupt */
|
|
char t_quitc; /* quit */
|
|
char t_startc; /* start output */
|
|
char t_stopc; /* stop output */
|
|
char t_eofc; /* end-of-file */
|
|
char t_brkc; /* input delimiter (like nl) */
|
|
};
|
|
|
|
struct ltchars {
|
|
char t_suspc; /* stop process signal */
|
|
char t_dsuspc; /* delayed stop process signal */
|
|
char t_rprntc; /* reprint line */
|
|
char t_flushc; /* flush output (toggles) */
|
|
char t_werasc; /* word erase */
|
|
char t_lnextc; /* literal next character */
|
|
};
|
|
|
|
/*
|
|
* Structure for TIOCGETP and TIOCSETP ioctls.
|
|
*/
|
|
#ifndef _SGTTYB_
|
|
#define _SGTTYB_
|
|
struct sgttyb {
|
|
char sg_ispeed; /* input speed */
|
|
char sg_ospeed; /* output speed */
|
|
char sg_erase; /* erase character */
|
|
char sg_kill; /* kill character */
|
|
short sg_flags; /* mode flags */
|
|
};
|
|
#endif
|
|
|
|
#ifdef USE_OLD_TTY
|
|
# undef TIOCGETD
|
|
# define TIOCGETD _IOR('t', 0, int) /* get line discipline */
|
|
# undef TIOCSETD
|
|
# define TIOCSETD _IOW('t', 1, int) /* set line discipline */
|
|
#else
|
|
# define OTIOCGETD _IOR('t', 0, int) /* get line discipline */
|
|
# define OTIOCSETD _IOW('t', 1, int) /* set line discipline */
|
|
#endif
|
|
#define TIOCHPCL _IO('t', 2) /* hang up on last close */
|
|
#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
|
|
#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
|
|
#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
|
|
#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */
|
|
#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */
|
|
#define TANDEM 0x00000001L /* send stopc on out q full */
|
|
#define CBREAK 0x00000002L /* half-cooked mode */
|
|
#define LCASE 0x00000004L /* simulate lower case */
|
|
#ifdef ECHO /* from <sys/termios.h> */
|
|
#undef ECHO
|
|
#endif
|
|
#define ECHO 0x00000008L /* echo input */
|
|
#define CRMOD 0x00000010L /* map \r to \r\n on output */
|
|
#define RAW 0x00000020L /* no i/o processing */
|
|
#define ODDP 0x00000040L /* get/send odd parity */
|
|
#define EVENP 0x00000080L /* get/send even parity */
|
|
#define ANYP 0x000000c0L /* get any parity/send none */
|
|
#define NLDELAY 0x00000300L /* \n delay */
|
|
#define NL0 0x00000000L
|
|
#define NL1 0x00000100L /* tty 37 */
|
|
#define NL2 0x00000200L /* vt05 */
|
|
#define NL3 0x00000300L
|
|
#define TBDELAY 0x00000c00L /* horizontal tab delay */
|
|
#define TAB0 0x00000000L
|
|
#define TAB1 0x00000400L /* tty 37 */
|
|
#define TAB2 0x00000800L
|
|
#define XTABS 0x00000c00L /* expand tabs on output */
|
|
#define CRDELAY 0x00003000L /* \r delay */
|
|
#define CR0 0x00000000L
|
|
#define CR1 0x00001000L /* tn 300 */
|
|
#define CR2 0x00002000L /* tty 37 */
|
|
#define CR3 0x00003000L /* concept 100 */
|
|
#define VTDELAY 0x00004000L /* vertical tab delay */
|
|
#define FF0 0x00000000L
|
|
#define FF1 0x00004000L /* tty 37 */
|
|
#define BSDELAY 0x00008000L /* \b delay */
|
|
#define BS0 0x00000000L
|
|
#define BS1 0x00008000L
|
|
#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
|
|
#define CRTBS 0x00010000L /* do backspacing for crt */
|
|
#define PRTERA 0x00020000L /* \ ... / erase */
|
|
#define CRTERA 0x00040000L /* " \b " to wipe out char */
|
|
#define TILDE 0x00080000L /* hazeltine tilde kludge */
|
|
#define MDMBUF 0x00100000L /*start/stop output on carrier*/
|
|
#define LITOUT 0x00200000L /* literal output */
|
|
#define TOSTOP 0x00400000L /*SIGSTOP on background output*/
|
|
#define FLUSHO 0x00800000L /* flush output to terminal */
|
|
#define NOHANG 0x01000000L /* (no-op) was no SIGHUP on carrier drop */
|
|
#define L001000 0x02000000L
|
|
#define CRTKIL 0x04000000L /* kill line with " \b " */
|
|
#define PASS8 0x08000000L
|
|
#define CTLECH 0x10000000L /* echo control chars as ^X */
|
|
#define PENDIN 0x20000000L /* tp->t_rawq needs reread */
|
|
#define DECCTQ 0x40000000L /* only ^Q starts after ^S */
|
|
#define NOFLSH 0x80000000L /* no output flush on signal */
|
|
#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
|
|
#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */
|
|
#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */
|
|
#define TIOCLGET _IOR('t', 124, int) /* get local modes */
|
|
#define LCRTBS (CRTBS>>16)
|
|
#define LPRTERA (PRTERA>>16)
|
|
#define LCRTERA (CRTERA>>16)
|
|
#define LTILDE (TILDE>>16)
|
|
#define LMDMBUF (MDMBUF>>16)
|
|
#define LLITOUT (LITOUT>>16)
|
|
#define LTOSTOP (TOSTOP>>16)
|
|
#define LFLUSHO (FLUSHO>>16)
|
|
#define LNOHANG (NOHANG>>16)
|
|
#define LCRTKIL (CRTKIL>>16)
|
|
#define LPASS8 (PASS8>>16)
|
|
#define LCTLECH (CTLECH>>16)
|
|
#define LPENDIN (PENDIN>>16)
|
|
#define LDECCTQ (DECCTQ>>16)
|
|
#define LNOFLSH (NOFLSH>>16)
|
|
#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/
|
|
#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/
|
|
#define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */
|
|
#define OTTYDISC 0
|
|
#define NETLDISC 1
|
|
#define NTTYDISC 2
|
|
|
|
#endif /* !_SYS_IOCTL_COMPAT_H_ */
|