⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 termios.h

📁 GNU Mach 微内核源代码, 基于美国卡内基美隆大学的 Mach 研究项目
💻 H
字号:
#ifndef _I386_TERMIOS_H#define _I386_TERMIOS_H#include <asm/termbits.h>#include <asm/ioctls.h>struct winsize {	unsigned short ws_row;	unsigned short ws_col;	unsigned short ws_xpixel;	unsigned short ws_ypixel;};#define NCC 8struct termio {	unsigned short c_iflag;		/* input mode flags */	unsigned short c_oflag;		/* output mode flags */	unsigned short c_cflag;		/* control mode flags */	unsigned short c_lflag;		/* local mode flags */	unsigned char c_line;		/* line discipline */	unsigned char c_cc[NCC];	/* control characters */};#ifdef __KERNEL__/*	intr=^C		quit=^\		erase=del	kill=^U	eof=^D		vtime=\0	vmin=\1		sxtc=\0	start=^Q	stop=^S		susp=^Z		eol=\0	reprint=^R	discard=^U	werase=^W	lnext=^V	eol2=\0*/#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"#endif/* modem lines */#define TIOCM_LE	0x001#define TIOCM_DTR	0x002#define TIOCM_RTS	0x004#define TIOCM_ST	0x008#define TIOCM_SR	0x010#define TIOCM_CTS	0x020#define TIOCM_CAR	0x040#define TIOCM_RNG	0x080#define TIOCM_DSR	0x100#define TIOCM_CD	TIOCM_CAR#define TIOCM_RI	TIOCM_RNG/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below *//* line disciplines */#define N_TTY		0#define N_SLIP		1#define N_MOUSE		2#define N_PPP		3#define N_STRIP		4#define N_AX25		5#ifdef __KERNEL__#include <linux/string.h>/* * Translate a "termio" structure into a "termios". Ugh. */extern inline void trans_from_termio(struct termio * termio,	struct termios * termios){#define SET_LOW_BITS(x,y)	(*(unsigned short *)(&x) = (y))	SET_LOW_BITS(termios->c_iflag, termio->c_iflag);	SET_LOW_BITS(termios->c_oflag, termio->c_oflag);	SET_LOW_BITS(termios->c_cflag, termio->c_cflag);	SET_LOW_BITS(termios->c_lflag, termio->c_lflag);#undef SET_LOW_BITS	memcpy(termios->c_cc, termio->c_cc, NCC);}/* * Translate a "termios" structure into a "termio". Ugh. */extern inline void trans_to_termio(struct termios * termios,	struct termio * termio){	termio->c_iflag = termios->c_iflag;	termio->c_oflag = termios->c_oflag;	termio->c_cflag = termios->c_cflag;	termio->c_lflag = termios->c_lflag;	termio->c_line	= termios->c_line;	memcpy(termio->c_cc, termios->c_cc, NCC);}#endif	/* __KERNEL__ */#endif	/* _I386_TERMIOS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -