From: Jeff Hobbs Date: Wed, 20 Sep 2000 20:52:54 +0000 (+0000) Subject: (EvalCmd): Changed EvalSocket functionality to have the \'s X-Git-Tag: tkcon-2-1~8 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=368e07c87d71f43cbc28c00b64cba752a91935a6;p=tkcon (EvalCmd): Changed EvalSocket functionality to have the \'s substituted before sending data, to allow for special chars to be added to the string. --- diff --git a/ChangeLog b/ChangeLog index f2fcb15..053f915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ they accept only one arg as the command string to be evaluated. Prior behavior left some ambiguity as to what was eval'ed where. EvalOther, EvalSlave may need some sanitation as well. + (EvalCmd): Changed EvalSocket functionality to have the \'s + substituted before sending data, to allow for special chars to be + added to the string. 2000-09-19 Jeff Hobbs diff --git a/tkcon.tcl b/tkcon.tcl index b4bdf68..dedd014 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -771,6 +771,9 @@ proc ::tkcon::EvalSocket cmd { Prompt "\n\"$PRIV(app)\" alive\n" [CmdGet $PRIV(console)] } } + # Sockets get \'s interpreted, so that users can + # send things like \n\r or explicit hex values + set cmd [subst -novariables -nocommands $cmd] #puts [list $PRIV(app) $cmd] set code [catch {puts $PRIV(app) $cmd ; flush $PRIV(app)} result] if {$code && [eof $PRIV(app)]} {