1 /* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
20 * POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
30 /* Get the system-dependent definitions of `struct termios', `tcflag_t',
31 `cc_t', `speed_t', and all the macros specifying the flag bits. */
35 /* Compare a character C to a value VAL from the `c_cc' array in a
36 `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */
37 #define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
40 /* Return the output baud rate stored in *TERMIOS_P. */
41 extern speed_t cfgetospeed
__P ((__const
struct termios
*__termios_p
));
43 /* Return the input baud rate stored in *TERMIOS_P. */
44 extern speed_t cfgetispeed
__P ((__const
struct termios
*__termios_p
));
46 /* Set the output baud rate stored in *TERMIOS_P to SPEED. */
47 extern int cfsetospeed
__P ((struct termios
*__termios_p
, speed_t __speed
));
49 /* Set the input baud rate stored in *TERMIOS_P to SPEED. */
50 extern int cfsetispeed
__P ((struct termios
*__termios_p
, speed_t __speed
));
53 /* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */
54 extern void cfsetspeed
__P ((struct termios
*__termios_p
, speed_t __speed
));
58 /* Put the state of FD into *TERMIOS_P. */
59 extern int __tcgetattr
__P ((int __fd
, struct termios
*__termios_p
));
60 extern int tcgetattr
__P ((int __fd
, struct termios
*__termios_p
));
62 /* Set the state of FD to *TERMIOS_P.
63 Values for OPTIONAL_ACTIONS (TCSA*) are in <termbits.h>. */
64 extern int tcsetattr
__P ((int __fd
, int __optional_actions
,
65 __const
struct termios
*__termios_p
));
69 /* Set *TERMIOS_P to indicate raw mode. */
70 extern void cfmakeraw
__P ((struct termios
*__termios_p
));
73 /* Send zero bits on FD. */
74 extern int tcsendbreak
__P ((int __fd
, int __duration
));
76 /* Wait for pending output to be written on FD. */
77 extern int tcdrain
__P ((int __fd
));
79 /* Flush pending data on FD.
80 Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <termbits.h>. */
81 extern int tcflush
__P ((int __fd
, int __queue_selector
));
83 /* Suspend or restart transmission on FD.
84 Values for ACTION (TC[IO]{OFF,ON}) are in <termbits.h>. */
85 extern int tcflow
__P ((int __fd
, int __action
));
89 #include <sys/ttydefaults.h>
94 #endif /* termios.h */