#!/bin/sh
-# $Id: MKfallback.sh,v 1.9 1999/06/15 22:57:45 tom Exp $
+# $Id: MKfallback.sh,v 1.11 2001/12/02 01:55:30 tom Exp $
#
# MKfallback.sh -- create fallback table for entry reads
#
# from an on-disk terminfo tree) tries to match the type with one of a
# specified list of types generated in.
#
+
+terminfo_dir=$1
+shift
+
+terminfo_src=$1
+shift
+
+if 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 >&2
+else
+ tmp_info=
+fi
+
cat <<EOF
/*
* DO NOT EDIT THIS FILE BY HAND! It is generated by MKfallback.sh.
fi
cat <<EOF
-const TERMTYPE *_nc_fallback(const char *name GCC_UNUSED)
+NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *name GCC_UNUSED)
{
EOF
return((TERMTYPE *)0);
}
EOF
+
+if test -n "$tmp_info" ; then
+ echo removing temporary terminfo directory... >&2
+ rm -rf $tmp_info
+fi