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

📄 ttyinit.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/*	ttyinit.c	4.1	83/03/09	*//* * sgtty stuff */#include <sgtty.h>struct	sgttyb	_ttyb;struct	tchars	_otch, _ntch;int	_normf;/* * Routines for dealing with the unix tty modes */#include "2648.h"ttyinit(){	if (strcmp(getenv("TERM"), "hp2648") == 0)		_on2648 = 1;	ioctl(fileno(stdin), TIOCGETP, &_ttyb);	ioctl(fileno(stdin), TIOCGETC, &_otch);	_ntch = _otch;	_ntch.t_quitc = _ntch.t_startc = _ntch.t_stopc = -1;	_normf = _ttyb.sg_flags;	_ttyb.sg_flags |= CBREAK;	_ttyb.sg_flags &= ~(ECHO|CRMOD);	ioctl(fileno(stdin), TIOCSETN, &_ttyb);	ioctl(fileno(stdin), TIOCSETC, &_ntch);	gdefault();	zoomn(1);	zoomon();	kon();	rboff();	_cursoron = 1;	/* to force it off */	_escmode = NONE;	curoff();	clearg();	gon();	aoff();}done(){	goff();	koff();	aon();	sync();	escseq(NONE);	lowleft();	printf("\n");	fflush(stdout);	_ttyb.sg_flags = _normf;	ioctl(fileno(stdin), TIOCSETN, &_ttyb);	ioctl(fileno(stdin), TIOCSETC, &_otch);}

⌨️ 快捷键说明

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