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

📄 win_init.c

📁 API
💻 C
字号:
/*
 *
 * 周国祥 2001/05/08 Created
 */
#include	<stdio.h>
#include	<curses.h>
#include	<setjmp.h>
#include	<signal.h>
#include	<fcntl.h>
#include	"color.h"

struct	termio stdin_tty;
struct	termio stdout_tty;

zut_win_initscr()
{
	ioctl(0, TCGETA, &stdin_tty);
	ioctl(1, TCGETA, &stdout_tty);

	signal(SIGINT, SIG_IGN);
	signal(SIGQUIT, SIG_IGN);
	signal(SIGTERM, SIG_IGN);
	initscr();
	start_color();
	init_pair_table();
	noecho();
	nl();
	cbreak();
	keypad(stdscr, TRUE);
}

zut_win_endwin()
{
	clear();
	refresh();
	endwin();
	ioctl(0, TCSETAW, &stdin_tty);
	ioctl(1, TCSETAW, &stdout_tty);
}

⌨️ 快捷键说明

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