Author: glen
Date: Sun Sep 17 17:57:33 2006
New Revision: 7770

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
Cache termput calls within same script.

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      Sun Sep 17 17:57:33 2006
@@ -169,7 +169,20 @@
 # Colors workaround
 termput()
 {
+       local ck="_tput_$1_$2_$3"
+       local cv
+       eval cv="\$$ck"
+       if [ -n "$cv" ]; then
+               echo -ne "$cv"
+               return
+       fi
+       cv=$(_termput "$@")
+       echo -ne "$cv"
+       eval "$ck='$cv'"
+}
 
+_termput()
+{
        if is_yes "$FASTRC" || is_no "$TPUT"; then
                case "$1" in
                  hpa)
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to