Blame termios/termios.h

Packit 6c4009
/* Copyright (C) 1991-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
/*
Packit 6c4009
 *	POSIX Standard: 7.1-2 General Terminal Interface	<termios.h>
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#ifndef	_TERMIOS_H
Packit 6c4009
#define	_TERMIOS_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
Packit 6c4009
/* We need `pid_t'.  */
Packit 6c4009
# include <bits/types.h>
Packit 6c4009
# ifndef __pid_t_defined
Packit 6c4009
typedef __pid_t pid_t;
Packit 6c4009
#  define __pid_t_defined
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* Get the system-dependent definitions of `struct termios', `tcflag_t',
Packit 6c4009
   `cc_t', `speed_t', and all the macros specifying the flag bits.  */
Packit 6c4009
#include <bits/termios.h>
Packit 6c4009
Packit 6c4009
#ifdef __USE_MISC
Packit 6c4009
/* Compare a character C to a value VAL from the `c_cc' array in a
Packit 6c4009
   `struct termios'.  If VAL is _POSIX_VDISABLE, no character can match it.  */
Packit 6c4009
# define CCEQ(val, c)	((c) == (val) && (val) != _POSIX_VDISABLE)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Return the output baud rate stored in *TERMIOS_P.  */
Packit 6c4009
extern speed_t cfgetospeed (const struct termios *__termios_p) __THROW;
Packit 6c4009
Packit 6c4009
/* Return the input baud rate stored in *TERMIOS_P.  */
Packit 6c4009
extern speed_t cfgetispeed (const struct termios *__termios_p) __THROW;
Packit 6c4009
Packit 6c4009
/* Set the output baud rate stored in *TERMIOS_P to SPEED.  */
Packit 6c4009
extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW;
Packit 6c4009
Packit 6c4009
/* Set the input baud rate stored in *TERMIOS_P to SPEED.  */
Packit 6c4009
extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW;
Packit 6c4009
Packit 6c4009
#ifdef	__USE_MISC
Packit 6c4009
/* Set both the input and output baud rates in *TERMIOS_OP to SPEED.  */
Packit 6c4009
extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW;
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Put the state of FD into *TERMIOS_P.  */
Packit 6c4009
extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW;
Packit 6c4009
Packit 6c4009
/* Set the state of FD to *TERMIOS_P.
Packit 6c4009
   Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>.  */
Packit 6c4009
extern int tcsetattr (int __fd, int __optional_actions,
Packit 6c4009
		      const struct termios *__termios_p) __THROW;
Packit 6c4009
Packit 6c4009
Packit 6c4009
#ifdef	__USE_MISC
Packit 6c4009
/* Set *TERMIOS_P to indicate raw mode.  */
Packit 6c4009
extern void cfmakeraw (struct termios *__termios_p) __THROW;
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Send zero bits on FD.  */
Packit 6c4009
extern int tcsendbreak (int __fd, int __duration) __THROW;
Packit 6c4009
Packit 6c4009
/* Wait for pending output to be written on FD.
Packit 6c4009
Packit 6c4009
   This function is a cancellation point and therefore not marked with
Packit 6c4009
   __THROW.  */
Packit 6c4009
extern int tcdrain (int __fd);
Packit 6c4009
Packit 6c4009
/* Flush pending data on FD.
Packit 6c4009
   Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <bits/termios.h>.  */
Packit 6c4009
extern int tcflush (int __fd, int __queue_selector) __THROW;
Packit 6c4009
Packit 6c4009
/* Suspend or restart transmission on FD.
Packit 6c4009
   Values for ACTION (TC[IO]{OFF,ON}) are in <bits/termios.h>.  */
Packit 6c4009
extern int tcflow (int __fd, int __action) __THROW;
Packit 6c4009
Packit 6c4009
Packit 6c4009
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
Packit 6c4009
/* Get process group ID for session leader for controlling terminal FD.  */
Packit 6c4009
extern __pid_t tcgetsid (int __fd) __THROW;
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
#ifdef __USE_MISC
Packit 6c4009
# include <sys/ttydefaults.h>
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* termios.h  */