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

📄 settty.c

📁 该代码为unix环境高级编程的源代码
💻 C
字号:
#include	<termios.h>#include	"ourhdr.h"intmain(void){	struct termios	term;	long			vdisable;	if (isatty(STDIN_FILENO) == 0)		err_quit("standard input is not a terminal device");	if ( (vdisable = fpathconf(STDIN_FILENO, _PC_VDISABLE)) < 0)		err_quit("fpathconf error or _POSIX_VDISABLE not in effect");	if (tcgetattr(STDIN_FILENO, &term) < 0)	/* fetch tty state */		err_sys("tcgetattr error");	term.c_cc[VINTR] = vdisable;	/* disable INTR character */	term.c_cc[VEOF]  = 2;			/* EOF is Control-B */	if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &term) < 0)		err_sys("tcsetattr error");	exit(0);}

⌨️ 快捷键说明

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