Changeset 37251 for trunk/base/src
- Timestamp:
- 05/31/08 21:52:50 (6 months ago)
- Files:
-
- 1 modified
-
trunk/base/src/port/port.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port/port.tcl
r37249 r37251 2503 2503 # expects text arguments or wants an expanded list of ports 2504 2504 # Return value: 2505 # 0 Does not expect any text argument 2506 # 1 Expects some strings as text argument 2507 # 2 Wants an expanded list of ports as text argument 2505 # 0 none Does not expect any text argument 2506 # 1 strings Expects some strings as text argument 2507 # 2 ports Wants an expanded list of ports as text argument 2508 # Use action_args_const to translate them 2508 2509 proc action_needs_portlist { action } { 2509 2510 global action_array … … 2514 2515 } 2515 2516 2516 return [expr $ret > 2 ? 2 : $ret]2517 return $ret 2517 2518 } 2518 2519 … … 2750 2751 } 2751 2752 2752 # Does the port need text arguments?2753 # What kind of arguments does the command expect? 2753 2754 set expand [action_needs_portlist $action] 2754 2755 … … 2763 2764 } 2764 2765 default { 2765 switch -- $expand { 2766 0 { 2767 ui_error "$action does not accept string arguments" 2766 if {[action_args_const none] == $expand} { 2767 ui_error "$action does not accept string arguments" 2768 set action_status 1 2769 break 2770 } elseif {[action_args_const strings] == $expand} { 2771 while { [moreargs] && ![match ";"] } { 2772 lappend portlist [lookahead] 2773 advance 2774 } 2775 } elseif {[action_args_const ports] == $expand} { 2776 # Parse port specifications into portlist 2777 if {![portExpr portlist]} { 2778 ui_error "Improper expression syntax while processing parameters" 2768 2779 set action_status 1 2769 2780 break 2770 }2771 1 {2772 while { [moreargs] && ![match ";"] } {2773 lappend portlist [lookahead]2774 advance2775 }2776 }2777 2 {2778 # Parse port specifications into portlist2779 if {![portExpr portlist]} {2780 ui_error "Improper expression syntax while processing parameters"2781 set action_status 12782 break2783 }2784 2781 } 2785 2782 }

