Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5588


Ignore:
Timestamp:
Jul 28, 2009, 4:53:48 PM (15 years ago)
Author:
landauf
Message:

changes in init.tcl:

  • check if tcl was properly initialized
  • bugfix in puts
  • added backwards compatibility in unknown
Location:
data/media/tcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data/media/tcl/init.tcl

    r5586 r5588  
     1# Check if Tcl was properly initialized
     2info library
     3
     4# Create orxonox namespace
    15namespace eval orxonox {}
    26
     
    163167        execute puts $newline $s
    164168    } else {
    165         ::tcl::puts $args
     169        eval [concat ::tcl::puts $args]
    166170    }
    167171}
     
    180184    # get the returned errormessage if an undefined_proc command is called
    181185    if {[llength [info commands ::tcl::unknown]] == 0} {
    182         set errorcode [catch {unknown undefined_proc} result options]
     186        set errorcode [catch {unknown undefined_proc} result]
    183187    } else {
    184         set errorcode [catch {::tcl::unknown undefined_proc} result options]
     188        set errorcode [catch {::tcl::unknown undefined_proc} result]
    185189    }
    186190
     
    211215
    212216            set cmd [concat ::tcl::unknown $args]
    213             set errorcode [catch {eval $cmd} result options]
     217            if {[info tclversion] < 8.5} {
     218                set errorcode [catch {eval $cmd} result]
     219            } else {
     220                set errorcode [catch {eval $cmd} result options]
     221            }
    214222            set resultlist [split $result]
    215223            set success 1
     
    227235
    228236            if {!$success} {
    229                 return -code $errorcode -options $options $result
     237                if {[info tclversion] < 8.5} {
     238                    return -code $errorcode $result
     239                } else {
     240                    return -code $errorcode -options $options $result
     241                }
    230242            } else {
    231243                return [query $args]
     
    240252    unset errorcode
    241253    unset result
    242     unset options
    243254
    244255    # if the "undefined_proc" command was renamed previously, undo this
  • data/media/tcl/remote.tcl

    r5584 r5588  
    11set telnetserverthreadid [TclThreadManager create]
    2 TclThreadManager execute $telnetserverthreadid source telnet_server.tcl
     2TclThreadManager execute $telnetserverthreadid source $pld/telnet_server.tcl
Note: See TracChangeset for help on using the changeset viewer.