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

📄 mkfallback.sh

📁 ncurses 库 可能有用酒用 没用就算了 我觉得还可以用
💻 SH
字号:
#!/bin/sh# $Id: MKfallback.sh,v 1.11 2001/12/02 01:55:30 tom Exp $## MKfallback.sh -- create fallback table for entry reads## This script generates source code for a custom version of read_entry.c# that (instead of reading capabilities for an argument terminal type# from an on-disk terminfo tree) tries to match the type with one of a# specified list of types generated in.#terminfo_dir=$1shiftterminfo_src=$1shiftif test $# != 0 ; then	tmp_info=tmp_info	echo creating temporary terminfo directory... >&2	TERMINFO=`pwd`/$tmp_info	export TERMINFO	TERMINFO_DIRS=$TERMINFO:$terminfo_dir	export TERMINFO_DIRS	tic $terminfo_src >&2else	tmp_info=ficat <<EOF/* * DO NOT EDIT THIS FILE BY HAND!  It is generated by MKfallback.sh. */#include <curses.priv.h>#include <term.h>EOFif [ "$*" ]then	cat <<EOF#include <tic.h>/* fallback entries for: $* */EOF	for x in $*	do		echo "/* $x */"		infocmp -E $x	done	cat <<EOFstatic const TERMTYPE fallbacks[$#] ={EOF	comma=""	for x in $*	do		echo "$comma /* $x */"		infocmp -e $x		comma=","	done	cat <<EOF};EOFficat <<EOFNCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *name GCC_UNUSED){EOFif [ "$*" ]then	cat <<EOF    const TERMTYPE	*tp;    for (tp = fallbacks;	 	tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE);	 	tp++)	if (_nc_name_match(tp->term_names, name, "|"))	    return(tp);EOFelse	echo "	/* the fallback list is empty */";ficat <<EOF	return((TERMTYPE *)0);}EOFif test -n "$tmp_info" ; then	echo removing temporary terminfo directory... >&2	rm -rf $tmp_infofi

⌨️ 快捷键说明

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