"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "run-tic.sh" between
xterm-363.tgz and xterm-364.tgz

About: xterm is a terminal emulator for X with ISO/ANSI color and vt220 enhancements.

run-tic.sh  (xterm-363.tgz):run-tic.sh  (xterm-364.tgz)
#!/bin/sh #!/bin/sh
# $XTermId: run-tic.sh,v 1.12 2020/01/18 16:27:34 tom Exp $ # $XTermId: run-tic.sh,v 1.13 2021/01/27 01:04:54 tom Exp $
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# this file is part of xterm # this file is part of xterm
# #
# Copyright 2006-2019,2020 by Thomas E. Dickey # Copyright 2006-2020,2021 by Thomas E. Dickey
# #
# All Rights Reserved # All Rights Reserved
# #
# Permission is hereby granted, free of charge, to any person obtaining a # Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the # copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including # "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, # without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to # distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to # permit persons to whom the Software is furnished to do so, subject to
# the following conditions: # the following conditions:
skipping to change at line 63 skipping to change at line 63
VER=`tic6 -V 2>/dev/null` VER=`tic6 -V 2>/dev/null`
test -n "$VER" && TIC_PROG=tic6 test -n "$VER" && TIC_PROG=tic6
test -z "$VER" && need_ncurses test -z "$VER" && need_ncurses
} }
MYTEMP=`mktemp -d 2>/dev/null` MYTEMP=`mktemp -d 2>/dev/null`
if test -z "$MYTEMP" if test -z "$MYTEMP"
then then
MYTEMP=${TMPDIR:-/tmp}/run-tic$$ MYTEMP=${TMPDIR:-/tmp}/run-tic$$
fi fi
mkdir -p $MYTEMP || failed "cannot mkdir $MYTEMP" mkdir -p "$MYTEMP" || failed "cannot mkdir $MYTEMP"
trap "rm -rf $MYTEMP" EXIT INT QUIT HUP TERM trap "rm -rf $MYTEMP" EXIT INT QUIT HUP TERM
STDERR=$MYTEMP/run-tic$$.log STDERR=$MYTEMP/run-tic$$.log
VER=`tic -V 2>/dev/null` VER=`tic -V 2>/dev/null`
OPT= OPT=
TIC_PROG=tic TIC_PROG=tic
TPUT_PROG=tput
INFOCMP_PROG=infocmp INFOCMP_PROG=infocmp
unset TERM unset TERM
unset TERMINFO_DIRS unset TERMINFO_DIRS
PASS1="$@" PASS1="$*"
PASS2="$@" PASS2="$*"
case "x$VER" in case "x$VER" in
*ncurses*) *ncurses*)
OPT="-x" OPT="-x"
# Prefer ncurses 6.1 over 6.0 over any 5, if we can get it, to support # Prefer ncurses 6.1 over 6.0 over any 5, if we can get it, to support
# large numbers (used in xterm-direct) and large entries (an issue with # large numbers (used in xterm-direct) and large entries (an issue with
# xterm-nrc). # xterm-nrc).
case "$VER" in case "$VER" in
*\ [7-9].*|*\ 6.[1-9].20[12][0-9]*) *\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
check=`echo "$VER" | sed -e 's/^.*\.//' -e 's/[^0-9].*$//'` check=`echo "$VER" | sed -e 's/^.*\.//' -e 's/[^0-9].*$//'`
skipping to change at line 102 skipping to change at line 101
# of ncurses. # of ncurses.
use_ncurses6 use_ncurses6
;; ;;
esac esac
echo "** using tic from $VER" echo "** using tic from $VER"
# If this is 6.1.20180127 or later and using ABI 6, then it supports # If this is 6.1.20180127 or later and using ABI 6, then it supports
# entries larger than 4096 bytes (up to 32768). # entries larger than 4096 bytes (up to 32768).
case "$VER" in case "$VER" in
*\ [7-9].*|*\ 6.[1-9].20[12][0-9]*) *\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
expect=" cols#100000," expect=" cols#100000,"
cat >$MYTEMP/fake.ti <<EOF cat >"$MYTEMP"/fake.ti <<EOF
fake|test 32-bit numbers, fake|test 32-bit numbers,
$expect $expect
EOF EOF
TERMINFO=$MYTEMP $TIC_PROG $OPT $MYTEMP/fake.ti 2>/dev/null TERMINFO="$MYTEMP" $TIC_PROG $OPT "$MYTEMP"/fake.ti 2>/dev/null
check=`TERMINFO=$MYTEMP TERM=fake $INFOCMP_PROG -1 fake 2>/dev/nu check=`TERMINFO="$MYTEMP" TERM=fake $INFOCMP_PROG -1 fake 2>/dev/
ll |grep "$expect"` null |grep "$expect"`
test "x$check" = "x$expect" || BIG=no test "x$check" = "x$expect" || BIG=no
;; ;;
*) *)
BIG=no BIG=no
;; ;;
esac esac
if test "$BIG" = no if test "$BIG" = no
then then
# Trim out the SGR 1006 feature, to keep "xterm-nrc" smaller # Trim out the SGR 1006 feature, to keep "xterm-nrc" smaller
# than 4096 bytes. # than 4096 bytes.
echo "...this version does not support large terminal description s" echo "...this version does not support large terminal description s"
PASS2=$MYTEMP/input PASS2=$MYTEMP/input
sed -e 's/use=xterm+sm+1006,//' -e '/^[ ][ ]*$/d' "$PASS1" sed -e 's/use=xterm+sm+1006,//' -e '/^[ ][ ]*$/d' "$PASS1"
>$PASS2 >"$PASS2"
set $PASS2 set "$PASS2"
fi fi
;; ;;
esac esac
echo "** $TIC_PROG $OPT" "$PASS1" echo "** $TIC_PROG $OPT $PASS1"
$TIC_PROG $OPT "$PASS2" 2>$STDERR $TIC_PROG $OPT "$PASS2" 2>"$STDERR"
RET=$? RET=$?
sed -e "s%$PASS2%$PASS1%" $STDERR | \ sed -e "s%$PASS2%$PASS1%" "$STDERR" | \
fgrep -v 'Unknown Capability' | \ ${FGREP-fgrep} -v 'Unknown Capability' | \
fgrep -v 'Capability is not recognized:' | \ ${FGREP-fgrep} -v 'Capability is not recognized:' | \
fgrep -v 'tic: Warning near line ' >&2 ${FGREP-fgrep} -v 'tic: Warning near line ' >&2
rm -f $STDERR rm -f "$STDERR"
exit $RET exit $RET
 End of changes. 10 change blocks. 
20 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)