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

shasha at macports.org shasha at macports.org
Thu Jun 12 09:42:06 PDT 2014


Revision: 120952
          https://trac.macports.org/changeset/120952
Author:   shasha at macports.org
Date:     2014-06-12 09:42:06 -0700 (Thu, 12 Jun 2014)
Log Message:
-----------
added default for yesno

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-06-12 16:38:37 UTC (rev 120951)
+++ branches/gsoc14-interactive/base/src/port/port.tcl	2014-06-12 16:42:06 UTC (rev 120952)
@@ -5333,8 +5333,10 @@
 		# Check for the default and print accordingly
 		if {$def == {y}} {
 			puts -nonewline "Continue? \[Y/n\]: "
+			set default 0
 		} else {
 			puts -nonewline "Continue? \[y/N\]: "
+			set default 1
 		}
 		
 		# User input (probably requires some input error checking code) 
@@ -5344,6 +5346,9 @@
 				return 0
 			} elseif {$input in {n N}} {
 				return 1
+			} elseif {$input == ""} {
+				return $default
+			}
 			} else {
 				puts "Please enter either 'y' or 'n'."
 			}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140612/ab25b00f/attachment.html>


More information about the macports-changes mailing list