April 2024 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
001: /* Copyright (C) 1991-1994,1996-1999,2003,2010 Free Software Foundation, Inc. 002: This file is part of the GNU C Library. 003: 004: The GNU C Library is free software; you can redistribute it and/or 005: modify it under the terms of the GNU Lesser General Public 006: License as published by the Free Software Foundation; either 007: version 2.1 of the License, or (at your option) any later version. 008: 009: The GNU C Library is distributed in the hope that it will be useful, 010: but WITHOUT ANY WARRANTY; without even the implied warranty of 011: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012: Lesser General Public License for more details. 013: 014: You should have received a copy of the GNU Lesser General Public 015: License along with the GNU C Library; if not, write to the Free 016: Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 017: 02111-1307 USA. */ 018: 019: /* 020: * POSIX Standard: 7.1-2 General Terminal Interface <termios.h> 021: */ 022: 023: #ifndef _TERMIOS_H 024: #define _TERMIOS_H 1 025: 026: #include <features.h> 027: #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 028: /* We need `pid_t'. */ 029: # include <bits/types.h> 030: # ifndef __pid_t_defined 031: typedef __pid_t pid_t; 032: # define __pid_t_defined 033: # endif 034: #endif 035: 036: __BEGIN_DECLS 037: 038: /* Get the system-dependent definitions of `struct termios', `tcflag_t', 039: `cc_t', `speed_t', and all the macros specifying the flag bits. */ 040: #include <bits/termios.h> 041: 042: #ifdef __USE_BSD 043: /* Compare a character C to a value VAL from the `c_cc' array in a 044: `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */ 045: # define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE) 046: #endif 047: 048: /* Return the output baud rate stored in *TERMIOS_P. */ 049: extern speed_t cfgetospeed (__const struct termios *__termios_p) __THROW; 050: 051: /* Return the input baud rate stored in *TERMIOS_P. */ 052: extern speed_t cfgetispeed (__const struct termios *__termios_p) __THROW; 053: 054: /* Set the output baud rate stored in *TERMIOS_P to SPEED. */ 055: extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW; 056: 057: /* Set the input baud rate stored in *TERMIOS_P to SPEED. */ 058: extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW; 059: 060: #ifdef __USE_BSD 061: /* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */ 062: extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW; 063: #endif 064: 065: 066: /* Put the state of FD into *TERMIOS_P. */ 067: extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW; 068: 069: /* Set the state of FD to *TERMIOS_P. 070: Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>. */ 071: extern int tcsetattr (int __fd, int __optional_actions, 072: __const struct termios *__termios_p) __THROW; 073: 074: 075: #ifdef __USE_BSD 076: /* Set *TERMIOS_P to indicate raw mode. */ 077: extern void cfmakeraw (struct termios *__termios_p) __THROW; 078: #endif 079: 080: /* Send zero bits on FD. */ 081: extern int tcsendbreak (int __fd, int __duration) __THROW; 082: 083: /* Wait for pending output to be written on FD. 084: 085: This function is a cancellation point and therefore not marked with 086: __THROW. */ 087: extern int tcdrain (int __fd); 088: 089: /* Flush pending data on FD. 090: Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <bits/termios.h>. */ 091: extern int tcflush (int __fd, int __queue_selector) __THROW; 092: 093: /* Suspend or restart transmission on FD. 094: Values for ACTION (TC[IO]{OFF,ON}) are in <bits/termios.h>. */ 095: extern int tcflow (int __fd, int __action) __THROW; 096: 097: 098: #ifdef __USE_UNIX98 099: /* Get process group ID for session leader for controlling terminal FD. */ 100: extern __pid_t tcgetsid (int __fd) __THROW; 101: #endif 102: 103: 104: #ifdef __USE_BSD 105: # include <sys/ttydefaults.h> 106: #endif 107: 108: __END_DECLS 109: 110: #endif /* termios.h */ 111: