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

📄 setterm.c

📁 操作系统源代码
💻 C
字号:
#include <curses.h>#include "curspriv.h"_PROTOTYPE( static void ttysetflags, (void) );static void ttysetflags(){  _tty.c_iflag |= ICRNL | IXON;  _tty.c_oflag |= OPOST | ONLCR;  _tty.c_lflag |= ECHO | ICANON | IEXTEN | ISIG;  if (_cursvar.rawmode) {	_tty.c_iflag &= ~(ICRNL | IXON);	_tty.c_oflag &= ~(OPOST);	_tty.c_lflag &= ~(ICANON | IEXTEN | ISIG);  }  if (_cursvar.cbrkmode) {	_tty.c_lflag &= ~(ICANON);  }  if (!_cursvar.echoit) {	_tty.c_lflag &= ~(ECHO | ECHONL);  }  if (NONL) {	_tty.c_iflag &= ~(ICRNL);	_tty.c_oflag &= ~(ONLCR);  }  tcsetattr(0, TCSANOW, &_tty);}				/* ttysetflags */void raw(){  _cursvar.rawmode = TRUE;  ttysetflags();}				/* raw */void noraw(){  _cursvar.rawmode = FALSE;  ttysetflags();}				/* noraw */void echo(){  _cursvar.echoit = TRUE;  ttysetflags();}void noecho(){  _cursvar.echoit = FALSE;  ttysetflags();}void nl(){  NONL = FALSE;  ttysetflags();}				/* nl */void nonl(){  NONL = TRUE;  ttysetflags();}				/* nonl */void cbreak(){  _cursvar.cbrkmode = TRUE;  ttysetflags();}				/* cbreak */void nocbreak(){  _cursvar.cbrkmode = FALSE;  ttysetflags();}				/* nocbreak */

⌨️ 快捷键说明

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