Changeset 25789
- Timestamp:
- 06/01/07 22:07:27 (18 months ago)
- Files:
-
- 1 modified
-
trunk/base/src/port/port.tcl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port/port.tcl
r25310 r25789 913 913 914 914 # Walk through each item in a, matching against b 915 #916 # Note: -regexp may not be present in all versions of Tcl we need to work917 # against, in which case we may have to fall back to a slower alternative918 # for those cases. I'm not worrying about that for now, however. -jdb919 915 foreach aitem $a { 920 916 array set port $aitem … … 1510 1506 set restrictedList 0 1511 1507 set ilist {} 1512 if { [llength $portlist] } { 1508 1509 if { [llength $portlist] || ![global_option_isset ports_no_args]} { 1513 1510 set restrictedList 1 1514 1511 foreachport $portlist { … … 1562 1559 set status 0 1563 1560 1564 # If port names were supplied, limit ourselves to those port , else check all installed ports1561 # If port names were supplied, limit ourselves to those ports, else check all installed ports 1565 1562 set ilist {} 1566 1563 set restrictedList 0 1567 if { [llength $portlist] } {1564 if { [llength $portlist] || ![global_option_isset ports_no_args]} { 1568 1565 set restrictedList 1 1569 1566 foreach portspec $portlist { … … 1794 1791 proc action_search { action portlist opts } { 1795 1792 set status 0 1796 if {![llength portlist]} {1793 if {![llength $portlist] && [global_option_isset ports_no_args]} { 1797 1794 ui_error "You must specify a search pattern" 1798 1795 return 1 … … 1842 1839 proc action_list { action portlist opts } { 1843 1840 set status 0 1844 1841 1845 1842 # Default to list all ports if no portnames are supplied 1846 if {![llength $portlist] } {1843 if {![llength $portlist] && [global_option_isset ports_no_args]} { 1847 1844 add_to_portlist portlist [list name "-all-"] 1848 1845 } … … 2341 2338 parse_options $action ui_options global_options 2342 2339 2343 # Parse port specifications into portlist 2340 # Parse action arguments, setting a special flag if there were none 2341 # We otherwise can't tell the difference between arguments that evaluate 2342 # to the empty set, and the empty set itself. 2344 2343 set portlist {} 2345 if {![portExpr portlist]} { 2346 ui_error "Improper expression syntax while processing parameters" 2347 set action_status 1 2348 break 2349 } 2350 2344 switch -- [lookahead] { 2345 ; - 2346 _EOF_ { set global_options(ports_no_args) yes } 2347 default { 2348 # Parse port specifications into portlist 2349 if {![portExpr portlist]} { 2350 ui_error "Improper expression syntax while processing parameters" 2351 set action_status 1 2352 break 2353 } 2354 } 2355 } 2356 2351 2357 # Find an action to execute 2352 2358 set action_proc [find_action_proc $action]

