1 /* Structure types for pre-termios terminal ioctls. Generic Unix version.
2 Copyright (C) 1996 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
21 * Never include this file directly; use <sys/ioctl.h> instead.
24 #ifndef _BITS_IOCTL_TYPES_H
25 #define _BITS_IOCTL_TYPES_H 1
28 #if defined(TIOCGETC) || defined(TIOCSETC)
29 /* Type of ARG for TIOCGETC and TIOCSETC requests. */
32 char t_intrc; /* Interrupt character. */
33 char t_quitc; /* Quit character. */
34 char t_startc; /* Start-output character. */
35 char t_stopc; /* Stop-output character. */
36 char t_eofc; /* End-of-file character. */
37 char t_brkc; /* Input delimiter character. */
40 #define _IOT_tchars /* Hurd ioctl type field. */ \
41 _IOT (_IOTS (char), 6, 0, 0, 0, 0)
44 #if defined(TIOCGLTC) || defined(TIOCSLTC)
45 /* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
48 char t_suspc; /* Suspend character. */
49 char t_dsuspc; /* Delayed suspend character. */
50 char t_rprntc; /* Reprint-line character. */
51 char t_flushc; /* Flush-output character. */
52 char t_werasc; /* Word-erase character. */
53 char t_lnextc; /* Literal-next character. */
56 #define _IOT_ltchars /* Hurd ioctl type field. */ \
57 _IOT (_IOTS (char), 6, 0, 0, 0, 0)
60 /* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty). */
63 char sg_ispeed; /* Input speed. */
64 char sg_ospeed; /* Output speed. */
65 char sg_erase; /* Erase character. */
66 char sg_kill; /* Kill character. */
67 short int sg_flags; /* Mode flags. */
70 #define _IOT_sgttyb /* Hurd ioctl type field. */ \
71 _IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
73 #if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
74 /* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
77 unsigned short int ws_row; /* Rows, in characters. */
78 unsigned short int ws_col; /* Columns, in characters. */
80 /* These are not actually used. */
81 unsigned short int ws_xpixel; /* Horizontal pixels. */
82 unsigned short int ws_ypixel; /* Vertical pixels. */
85 #define _IOT_winsize /* Hurd ioctl type field. */ \
86 _IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
89 #if defined (TIOCGSIZE) || defined (TIOCSSIZE)
90 /* The BSD-style ioctl constructor macros use `sizeof', which can't be used
91 in a preprocessor conditional. Since the commands are always unique
92 regardless of the size bits, we can safely define away `sizeof' for the
93 purpose of the conditional. */
94 # define sizeof(type) 0
95 # if defined (TIOCGWINSZ) && TIOCGSIZE == TIOCGWINSZ
96 /* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
97 compatibility with Sun; they define `struct ttysize' to have identical
98 layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
99 (likewise TIOCSSIZE and TIOCSWINSZ). */
102 unsigned short int ts_lines;
103 unsigned short int ts_cols;
104 unsigned short int ts_xxx;
105 unsigned short int ts_yyy;
107 #define _IOT_ttysize _IOT_winsize
109 /* Suns use a different layout for `struct ttysize', and TIOCGSIZE and
110 TIOCGWINSZ are separate commands that do the same thing with different
111 structures (likewise TIOCSSIZE and TIOCSWINSZ). */
114 int ts_lines, ts_cols; /* Lines and columns, in characters. */
117 # undef sizeof /* See above. */
121 #endif /* bits/ioctl-types.h */