[121817] branches/gsoc14-interactive/base/src/port/port.tcl

shasha at macports.org shasha at macports.org
Tue Jul 8 11:51:31 PDT 2014


Revision: 121817
          https://trac.macports.org/changeset/121817
Author:   shasha at macports.org
Date:     2014-07-08 11:51:30 -0700 (Tue, 08 Jul 2014)
Log Message:
-----------
changed the way timeout is printed

Modified Paths:
--------------
    branches/gsoc14-interactive/base/src/port/port.tcl

Modified: branches/gsoc14-interactive/base/src/port/port.tcl
===================================================================
--- branches/gsoc14-interactive/base/src/port/port.tcl	2014-07-08 18:49:58 UTC (rev 121816)
+++ branches/gsoc14-interactive/base/src/port/port.tcl	2014-07-08 18:51:30 UTC (rev 121817)
@@ -5249,29 +5249,17 @@
 		set multiplier 1
 		set sec 0
 		
-		# Message before starting of timeout
-		puts -nonewline "Press Ctrl-C now to abort "
-		flush stdout
-		
 		# Prints time like 5...4...3...2...1...0
 		while {$timeout >= 0} { 
-			after $sec puts -nonewline $timeout
-			incr sec 1000
-			after [expr {$step * $multiplier}] puts -nonewline "."
-			after [expr {$step * $multiplier + 1}] flush stdout
-			flush stdout
-			incr multiplier
-			after [expr {$step * $multiplier}] puts -nonewline "."
-			after [expr {$step * $multiplier + 1}] flush stdout
-			flush stdout
-			incr multiplier
-			after [expr {$step * $multiplier}] puts -nonewline "."
-			after [expr {$step * $multiplier + 1}] flush stdout
-			flush stdout
-			incr multiplier 2
-			incr timeout -1
+			after $sec {puts -nonewline "Continuing in "}
+		    incr sec 1000
+			after $sec puts -nonewline [format "%02d" $time]
+			after $sec flush stdout
+			after $sec {puts -nonewline ". Press Ctrl-C to exit:"}
+		    after $sec {puts -nonewline "\r"}
+		    after $sec flush stdout
+			incr time -1
 		}
-		incr sec -1000
 		after $sec set result def
 		vwait result
 		puts ""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140708/fa59e5f8/attachment.html>


More information about the macports-changes mailing list