Tk Library Source Code

Artifact [1f9cab2d89]
Login

Artifact 1f9cab2d89feed4942a6ea324845225684a848b7:

Attachment "cmdline.diff" to ticket [472259ffff] added by glennjnn 2001-10-18 05:12:29.
*** cmdline.tcl~	Thu Oct 11 12:05:25 2001
--- cmdline.tcl	Wed Oct 17 18:06:50 2001
***************
*** 147,158 ****
      set argc [llength $argv]
      while {[set err [cmdline::getopt argv $opts opt arg]]} {
  	if {$err < 0} {
! 	    error [cmdline::usage $optlist $usage]
  	}
  	set result($opt) $arg
      }
      if {[info exist result(?)] || [info exists result(help)]} {
! 	error [cmdline::usage $optlist $usage]
      }
      return [array get result]
  }
--- 147,158 ----
      set argc [llength $argv]
      while {[set err [cmdline::getopt argv $opts opt arg]]} {
  	if {$err < 0} {
! 	    error "$arg\n[cmdline::usage $optlist $usage]"
  	}
  	set result($opt) $arg
      }
      if {[info exist result(?)] || [info exists result(help)]} {
! 	return -code -1 [cmdline::usage $optlist $usage]
      }
      return [array get result]
  }