Recent Changes - Search:

WikiDoc

Categories

Batch-like interaction via pipes

Pipes.BatchLikeInteractionViaPipes History

Hide minor edits - Show changes to markup

April 19, 2006, at 11:51 PM by Nick -
Changed line 42 from:
    $ maxima --batch-string="diff(sin(x),x);"
to:
    $ maxima --batch-string="diff(sin(x),x);"
Changed lines 90-91 from:
    % set res [maxima diff( $f+$g, x )]
    % maxima expand( $res )
to:
    % set res [maxima diff( $f+$g, x )]
    % maxima expand( $res )
Changed line 126 from:
  # % maxima factor( $f )
to:
  # % maxima factor( $f )
Changed line 158 from:
      fconfigure $data(pipe) -buffering line -blocking 0
to:
      fconfigure $data(pipe) -buffering line -blocking 0
Changed line 160 from:
      fileevent $data(pipe) readable ::maxima::receive
to:
      fileevent $data(pipe) readable ::maxima::receive
Changed line 164 from:
      maximaRunningBatch {DISPLAY2D:FALSE$}
to:
      maximaRunningBatch {DISPLAY2D:FALSE$}
Changed line 171 from:
      catch { close $data(pipe) }
to:
      catch { close $data(pipe) }
Changed line 179 from:
	  return [expr { [lsearch -exact [file channels] $data(pipe)] != -1 }]
to:
	  return [expr { [lsearch -exact [file channels] $data(pipe)] != -1 }]
Changed line 191 from:
      if { [eof $data(pipe)] } {
to:
      if { [eof $data(pipe)] } {
Changed line 197 from:
      append data(transcript) [read $data(pipe)]
to:
      append data(transcript) [read $data(pipe)]
Changed line 199 from:
      if { [regexp -start $data(size) -- {\(C\d+\)\s*$} $data(transcript)] } {
to:
      if { [regexp -start $data(size) -- {\(C\d+\)\s*$} $data(transcript)] } {
Changed lines 201-202 from:
	  if { [regexp -start $data(size) -- {.*\((D\d+)\)(.*)\(C\d+\)\s*$} $data(transcript) "" data(label) tmpRes] } {
	      set data(res) [string trim $tmpRes]
to:
	  if { [regexp -start $data(size) -- {.*\((D\d+)\)(.*)\(C\d+\)\s*$} $data(transcript) "" data(label) tmpRes] } {
	      set data(res) [string trim $tmpRes]
Changed line 208 from:
	  set data(size) [string length $data(transcript)]
to:
	  set data(size) [string length $data(transcript)]
Changed line 216 from:
      append data(transcript) $cmd
to:
      append data(transcript) $cmd
Changed lines 218-219 from:
      fileevent $data(pipe) readable ::maxima::receive
to:
      fileevent $data(pipe) readable ::maxima::receive
Changed line 221 from:
      puts $data(pipe) $cmd
to:
      puts $data(pipe) $cmd
Changed lines 227-228 from:
      after cancel $timeout
      if { [string equal $data(res) "TIMEOUT"] } {
to:
      after cancel $timeout
      if { [string equal $data(res) "TIMEOUT"] } {
Changed line 232 from:
      return $data(res)
to:
      return $data(res)
Changed lines 240-243 from:
      set preCmd {DISPLAY2D:FALSE$ }
      set transcript [exec maxima --batch-string=${preCmd}${cmd}]
      if { [regexp -- {.*\n\(D\d+\) (.*)\nBye.$} $transcript "" res] } {
	  return $res
to:
      set preCmd {DISPLAY2D:FALSE$ }
      set transcript [exec maxima --batch-string=${preCmd}${cmd}]
      if { [regexp -- {.*\n\(D\d+\) (.*)\nBye.$} $transcript "" res] } {
	  return $res
Changed lines 245-246 from:
	  regexp -- {.*\n\(C\d+\)[^\n]*\n(.*)\nBye.$} $transcript "" err
	  error $err
to:
	  regexp -- {.*\n\(C\d+\)[^\n]*\n(.*)\nBye.$} $transcript "" err
	  error $err
Changed lines 253-255 from:
      set cmd [join $args " "]
      set cmd [string trim $cmd]
      if { ![string equal [string index $cmd end] {;}] } {
to:
      set cmd [join $args " "]
      set cmd [string trim $cmd]
      if { ![string equal [string index $cmd end] {;}] } {
Changed line 260 from:
	  return [maximaRunningBatch $cmd]
to:
	  return [maximaRunningBatch $cmd]
Changed line 262 from:
	  return [maximaBatch $cmd]
to:
	  return [maximaBatch $cmd]
Changed lines 277-280 from:
      set preCmd {DISPLAY2D:FALSE$ }
      set transcript [exec maxima --batch-string=${preCmd}${cmd}tex(%)\;]
      if { [regexp -- {.*\n\(D\d+\).*\$(\$.*\$)\$\n\(D\d+\).*\nBye.$} $transcript "" res] } {
	  return $res
to:
      set preCmd {DISPLAY2D:FALSE$ }
      set transcript [exec maxima --batch-string=${preCmd}${cmd}tex(%)\;]
      if { [regexp -- {.*\n\(D\d+\).*\$(\$.*\$)\$\n\(D\d+\).*\nBye.$} $transcript "" res] } {
	  return $res
Changed lines 282-283 from:
	  if { [regexp -- {.*DISPLAY2D : FALSE\n(.*)\n\(C\d+\)} $transcript "" err] } {
	      error $err
to:
	  if { [regexp -- {.*DISPLAY2D : FALSE\n(.*)\n\(C\d+\)} $transcript "" err] } {
	      error $err
Changed line 285 from:
	  error $transcript
to:
	  error $transcript
Changed line 292 from:
      if { [eof $data(pipe)] } {
to:
      if { [eof $data(pipe)] } {
Changed line 298 from:
      append data(transcript) [read $data(pipe)]
to:
      append data(transcript) [read $data(pipe)]
Changed line 300 from:
      if { [regexp -start $data(size) -- {\(C\d+\)\s*$} $data(transcript)] } {
to:
      if { [regexp -start $data(size) -- {\(C\d+\)\s*$} $data(transcript)] } {
Changed lines 302-303 from:
	  if { [regexp -start $data(size) -- {.*\$(\$.*\$)\$\n\(D\d+\) FALSE\n\(C\d+\)\s*$} $data(transcript) "" tmpRes] } {
	      set data(res) [string trim $tmpRes]
to:
	  if { [regexp -start $data(size) -- {.*\$(\$.*\$)\$\n\(D\d+\) FALSE\n\(C\d+\)\s*$} $data(transcript) "" tmpRes] } {
	      set data(res) [string trim $tmpRes]
Changed line 309 from:
	  set data(size) [string length $data(transcript)]
to:
	  set data(size) [string length $data(transcript)]
Changed line 319 from:
      maximaRunningBatch $cmd
to:
      maximaRunningBatch $cmd
Changed line 324 from:
      fileevent $data(pipe) readable ::maxima::receiveTex
to:
      fileevent $data(pipe) readable ::maxima::receiveTex
Changed lines 326-327 from:
      puts $data(pipe) tex(%)\;
to:
      puts $data(pipe) tex(%)\;
Changed lines 333-334 from:
      after cancel $timeout
      if { [string equal $data(res) "TIMEOUT"] } {
to:
      after cancel $timeout
      if { [string equal $data(res) "TIMEOUT"] } {
Changed line 338 from:
      return $data(res)
to:
      return $data(res)
Changed lines 344-346 from:
      set cmd [join $args " "]
      set cmd [string trim $cmd]
      if { ![string equal [string index $cmd end] {;}] } {
to:
      set cmd [join $args " "]
      set cmd [string trim $cmd]
      if { ![string equal [string index $cmd end] {;}] } {
Changed line 351 from:
	  return [maximaTexRunningBatch $cmd]
to:
	  return [maximaTexRunningBatch $cmd]
Changed line 353 from:
	  return [maximaTexBatch $cmd]
to:
	  return [maximaTexBatch $cmd]
Added lines 417-671:

.

January 23, 2006, at 01:11 PM by 212.180.15.164 -
Added lines 1-416:
Page last modified on April 19, 2006, at 11:51 PM
Hosted on SourceForge.net Logo