~ubuntu-branches/ubuntu/precise/xcircuit/precise

« back to all changes in this revision

Viewing changes to lib/tcl/tkcon.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Aanjhan Ranganathan
  • Date: 2006-04-18 23:51:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060418235139-s49pkhwdzxvsxm5k
Tags: 3.4.21-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# \
3
 
exec wish "$0" ${1+"$@"}
 
3
exec ${XCIRCUIT_WISH:=wish} "$0" ${1+"$@"}
4
4
 
5
5
#
6
6
## tkcon.tcl
2552
2552
            ## 'congets' a replacement for [gets stdin]
2553
2553
            # Use the 'gets' alias of 'tkcon_gets' command instead of
2554
2554
            # calling the *get* methods directly for best compatability
2555
 
            if {[llength $args]} {
2556
 
                return -code error "wrong # args: must be \"tkcon congets\""
 
2555
            if {[llength $args] > 1} {
 
2556
                return -code error "wrong # args: must be \"tkcon congets [pfix]\""
2557
2557
            }
2558
2558
            tkcon show
2559
2559
            set old [bind TkConsole <<TkCon_Eval>>]
2561
2561
            set w $::tkcon::PRIV(console)
2562
2562
            # Make sure to move the limit to get the right data
2563
2563
            $w mark set insert end
2564
 
            $w mark set limit insert
 
2564
            if {[llength $args]} {
 
2565
                $w mark set limit insert
 
2566
                $w insert end $args
 
2567
            } else {
 
2568
                $w mark set limit insert
 
2569
            }
2565
2570
            $w see end
2566
2571
            vwait ::tkcon::PRIV(wait)
2567
2572
            set line [::tkcon::CmdGet $w]