|
Packit Service |
82fcde |
/* Structure types for pre-termios terminal ioctls. Generic Unix version.
|
|
Packit Service |
82fcde |
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library; if not, see
|
|
Packit Service |
82fcde |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef _SYS_IOCTL_H
|
|
Packit Service |
82fcde |
# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if defined TIOCGETC || defined TIOCSETC
|
|
Packit Service |
82fcde |
/* Type of ARG for TIOCGETC and TIOCSETC requests. */
|
|
Packit Service |
82fcde |
struct tchars
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
char t_intrc; /* Interrupt character. */
|
|
Packit Service |
82fcde |
char t_quitc; /* Quit character. */
|
|
Packit Service |
82fcde |
char t_startc; /* Start-output character. */
|
|
Packit Service |
82fcde |
char t_stopc; /* Stop-output character. */
|
|
Packit Service |
82fcde |
char t_eofc; /* End-of-file character. */
|
|
Packit Service |
82fcde |
char t_brkc; /* Input delimiter character. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# define _IOT_tchars /* Hurd ioctl type field. */ \
|
|
Packit Service |
82fcde |
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if defined TIOCGLTC || defined TIOCSLTC
|
|
Packit Service |
82fcde |
/* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
|
|
Packit Service |
82fcde |
struct ltchars
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
char t_suspc; /* Suspend character. */
|
|
Packit Service |
82fcde |
char t_dsuspc; /* Delayed suspend character. */
|
|
Packit Service |
82fcde |
char t_rprntc; /* Reprint-line character. */
|
|
Packit Service |
82fcde |
char t_flushc; /* Flush-output character. */
|
|
Packit Service |
82fcde |
char t_werasc; /* Word-erase character. */
|
|
Packit Service |
82fcde |
char t_lnextc; /* Literal-next character. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# define _IOT_ltchars /* Hurd ioctl type field. */ \
|
|
Packit Service |
82fcde |
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty). */
|
|
Packit Service |
82fcde |
struct sgttyb
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
char sg_ispeed; /* Input speed. */
|
|
Packit Service |
82fcde |
char sg_ospeed; /* Output speed. */
|
|
Packit Service |
82fcde |
char sg_erase; /* Erase character. */
|
|
Packit Service |
82fcde |
char sg_kill; /* Kill character. */
|
|
Packit Service |
82fcde |
short int sg_flags; /* Mode flags. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define _IOT_sgttyb /* Hurd ioctl type field. */ \
|
|
Packit Service |
82fcde |
_IOT (_IOTS (char), 4, _IOTS (short int), 1, 0, 0)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if defined TIOCGWINSZ || defined TIOCSWINSZ
|
|
Packit Service |
82fcde |
/* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
|
|
Packit Service |
82fcde |
struct winsize
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
unsigned short int ws_row; /* Rows, in characters. */
|
|
Packit Service |
82fcde |
unsigned short int ws_col; /* Columns, in characters. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* These are not actually used. */
|
|
Packit Service |
82fcde |
unsigned short int ws_xpixel; /* Horizontal pixels. */
|
|
Packit Service |
82fcde |
unsigned short int ws_ypixel; /* Vertical pixels. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# define _IOT_winsize /* Hurd ioctl type field. */ \
|
|
Packit Service |
82fcde |
_IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if defined TIOCGSIZE || defined TIOCSSIZE
|
|
Packit Service |
82fcde |
/* The BSD-style ioctl constructor macros use `sizeof', which can't be used
|
|
Packit Service |
82fcde |
in a preprocessor conditional. Since the commands are always unique
|
|
Packit Service |
82fcde |
regardless of the size bits, we can safely define away `sizeof' for the
|
|
Packit Service |
82fcde |
purpose of the conditional. */
|
|
Packit Service |
82fcde |
# define sizeof(type) 0
|
|
Packit Service |
82fcde |
# if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
|
|
Packit Service |
82fcde |
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
|
|
Packit Service |
82fcde |
compatibility with Sun; they define `struct ttysize' to have identical
|
|
Packit Service |
82fcde |
layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
|
|
Packit Service |
82fcde |
(likewise TIOCSSIZE and TIOCSWINSZ). */
|
|
Packit Service |
82fcde |
struct ttysize
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
unsigned short int ts_lines;
|
|
Packit Service |
82fcde |
unsigned short int ts_cols;
|
|
Packit Service |
82fcde |
unsigned short int ts_xxx;
|
|
Packit Service |
82fcde |
unsigned short int ts_yyy;
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
# define _IOT_ttysize _IOT_winsize
|
|
Packit Service |
82fcde |
# else
|
|
Packit Service |
82fcde |
/* Suns use a different layout for `struct ttysize', and TIOCGSIZE and
|
|
Packit Service |
82fcde |
TIOCGWINSZ are separate commands that do the same thing with different
|
|
Packit Service |
82fcde |
structures (likewise TIOCSSIZE and TIOCSWINSZ). */
|
|
Packit Service |
82fcde |
struct ttysize
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
int ts_lines, ts_cols; /* Lines and columns, in characters. */
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
# endif
|
|
Packit Service |
82fcde |
# undef sizeof /* See above. */
|
|
Packit Service |
82fcde |
#endif
|