Blame bits/ioctl-types.h

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