X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=testing%2Ftcl_server.tcl;h=2e229c10660c694e53695e1e6b6d46a1b47d1047;hp=c5ec229171bc09689e69f8faf3111620440866b0;hb=a4bacdcb84f0d0cbd19a8db3833f65445c47904c;hpb=a65255a06d7252614f0061823860568f4aefe1b7 diff --git a/testing/tcl_server.tcl b/testing/tcl_server.tcl index c5ec229171..2e229c1066 100644 --- a/testing/tcl_server.tcl +++ b/testing/tcl_server.tcl @@ -1,15 +1,15 @@ -# Simple tcl client to connect to openocd -puts "Use empty line to exit" -set fo [socket 127.0.0.1 6666] -puts -nonewline stdout "> " -flush stdout -while {[gets stdin line] >= 0} { - if {$line eq {}} break - puts $fo $line - flush $fo - gets $fo line - puts $line - puts -nonewline stdout "> " - flush stdout -} -close $fo +# Simple tcl client to connect to openocd +puts "Use empty line to exit" +set fo [socket 127.0.0.1 6666] +puts -nonewline stdout "> " +flush stdout +while {[gets stdin line] >= 0} { + if {$line eq {}} break + puts $fo $line + flush $fo + gets $fo line + puts $line + puts -nonewline stdout "> " + flush stdout +} +close $fo