2 # $Id: MKfallback.sh,v 1.11 2001/12/02 01:55:30 tom Exp $
4 # MKfallback.sh -- create fallback table for entry reads
6 # This script generates source code for a custom version of read_entry.c
7 # that (instead of reading capabilities for an argument terminal type
8 # from an on-disk terminfo tree) tries to match the type with one of a
9 # specified list of types generated in.
18 if test $# != 0 ; then
20 echo creating temporary terminfo directory... >&2
22 TERMINFO=`pwd`/$tmp_info
25 TERMINFO_DIRS=$TERMINFO:$terminfo_dir
35 * DO NOT EDIT THIS FILE BY HAND! It is generated by MKfallback.sh.
38 #include <curses.priv.h>
48 /* fallback entries for: $* */
57 static const TERMTYPE fallbacks[$#] =
63 echo "$comma /* $x */"
75 NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *name GCC_UNUSED)
85 tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE);
87 if (_nc_name_match(tp->term_names, name, "|"))
91 echo " /* the fallback list is empty */";
95 return((TERMTYPE *)0);
99 if test -n "$tmp_info" ; then
100 echo removing temporary terminfo directory... >&2