rc-scripts/trunk/rc.d/init.d/functions
Elan Ruusamäe
glen at delfi.ee
Tue Oct 25 14:17:52 CEST 2005
NB!
$FASTRC crashes mawk, it's ok otoh it doesn't with gawk!
http://glen.alkohol.ee/pld/awk-memfault.txt
http://glen.alkohol.ee/pld/awk-memfault-gdb.txt
On Tuesday 25 October 2005 14:58, baggins wrote:
> Author: baggins
> Date: Tue Oct 25 13:58:26 2005
> New Revision: 6477
>
> Modified:
> rc-scripts/trunk/rc.d/init.d/functions
> Log:
> - better detection of tput functionality
>
>
> Modified: rc-scripts/trunk/rc.d/init.d/functions
> ===========================================================================
>=== --- rc-scripts/trunk/rc.d/init.d/functions (original)
> +++ rc-scripts/trunk/rc.d/init.d/functions Tue Oct 25 13:58:26 2005
> @@ -136,8 +136,16 @@
> # Colors workaround
> termput()
> {
> - if is_yes "$FASTRC" || [ ! -d /usr/share/terminfo ] || \
> - [ ! -x /usr/bin/tput -a ! -x /bin/tput ]; then
> + typeset tputavail
> +
> + if [ -d /usr/share/terminfo ] && [ -x /usr/bin/tput -o -x /bin/tput ] ;
> then + tputavail=yes
> + # check if we are on proper terminal
> + tput longname >/dev/null 2>&1 || tputavail=no
> + else
> + tputavail=no
> + fi
> + if is_yes "$FASTRC" || is_no "$tputavail"
> case "$1" in
> hpa)
> echo -ne "\033[$(($2+1))G"
> @@ -162,9 +170,6 @@
> ;;
> esac
> else
> - # check if we are on proper terminal
> - tput longname > /dev/null 2>&1 || return
> -
> case "$1" in
> hpa | cuu* | el)
> tput "$@"
> _______________________________________________
> pld-cvs-commit mailing list
> pld-cvs-commit at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
--
Elan Ruusamäe
http://www.DELFI.ee/
Rävala pst 6, 10143, Tallinn, Eesti
tel (secretary): +372 650 4922
tel: +372 650 1278
fax: +372 681 4719
More information about the pld-devel-en
mailing list