- if {![regexp {^train (\S+) step (\d+)=([0-9.]+)$} $l \
- dummy tr step velocity]} continue
- if {[string compare $tr $train] || $step<=0 || $step>126} {
- error "bad velocity line $l ?" {} {TRACTBRAKE SKIP}
+ if {[regexp {^train (\S+) step (\d+)=([0-9.]+)$} $l \
+ dummy tr step velocity]} {
+ if {[string compare $tr $train] || $step<=0 || $step>126} {
+ error "bad velocity line $train $l ?"
+ }
+ set sc [lreplace $sc $step $step $velocity]
+ } elseif {[regexp {^train (\S+) is (\d+) } $l \
+ dummy tr trainnum]} {
+ if {[string compare $tr $train]} {
+ error "bad train line $train $l ?"
+ }
+ set trainnum2train($trainnum) $tr
+ } else {
+ # fine, whatever