📄 tcout.c
字号:
/* tcout.c - tcout */#ifdef BSD#include <newcurses.h>#else#include <curses.h>#endif#include <stdlib.h>#include <stdio.h>#define TBUFSIZE 2048int xfputs(char *str, FILE *fp);/*------------------------------------------------------------------------ * tcout - print the indicated terminal capability on the given stream *------------------------------------------------------------------------ */inttcout(char *cap, FILE *tfp){ static init; static char *term; static char tbuf[TBUFSIZE], buf[TBUFSIZE], *bp = buf; char *sv; if (!init) { init = 1; term = getenv("TERM"); } if (term == 0 || tgetent(&tbuf[0], term) != 1) return 0; if (sv = tgetstr(cap, &bp)) { xfputs(sv, tfp); return 1; } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -