Remove superfluous trailing white space from TCL files

This commit is contained in:
Douglas Clowes
2014-05-16 12:30:51 +10:00
parent 89e4e37f9e
commit 92d3acb5d5
230 changed files with 1835 additions and 1835 deletions

View File

@@ -14,11 +14,11 @@ if { [info exists __tableheader] == 0 } {
}
#=====================================================================
# Csv tcl package version 2.0
# A tcl library to deal with CSV (comma separated value)
# A tcl library to deal with CSV (comma separated value)
# files, generated and readable by some DOS/Windows programs
# Contain two functions:
# csv2list string ?separator?
# and
# and
# list2csv list ?separator?
# which converts line from CSV file to list and vice versa.
#
@@ -52,9 +52,9 @@ proc csv2list {str {separator ","}} {
junk2 str]} {
if {[string length $quoted]||$unquoted=="\"\""} {
regsub -all {""} $quoted \" unquoted
}
}
lappend list $unquoted
}
}
if {[regexp $regexp2 $str junk unquoted quoted]} {
if {[string length $quoted]||$unquoted=="\"\""} {
regsub -all {""} $quoted \" unquoted
@@ -62,7 +62,7 @@ proc csv2list {str {separator ","}} {
lappend list $unquoted
if {[uplevel info exist csvtail]} {
uplevel set csvtail {""}
}
}
} else {
if {[uplevel info exist csvtail]} {
uplevel [list set csvtail $str]
@@ -72,18 +72,18 @@ proc csv2list {str {separator ","}} {
}
}
return $list
}
}
proc list2csv {list {separator ","}} {
set l {}
set l {}
foreach elem $list {
if {[string match {} $elem]||
[regexp {^[+-]?([0-9]+|([0-9]+\.?[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?)$}\
$elem]} {
lappend l $elem
lappend l $elem
} else {
regsub -all {"} $elem {""} selem
lappend l "\"$selem\""
lappend l "\"$selem\""
}
}
return [join $l $separator]
@@ -99,21 +99,21 @@ proc csvfile {f {separator ","}} {
} elseif {![string length $line]} {
lappend list {}
continue
}
}
set rec [csv2list $line $separator]
set buffer [concat $buffer $rec]
if {![ string length $csvtail]} {
lappend list $buffer
lappend list $buffer
set buffer {}
}
}
}
if {[string length $csvtail]} {
return -code error -errorcode {CSV 2 "Multiline parse error"}\
"CSV file parse error"
}
return $list
}
}
proc csvstring {str {separator ","}} {
set csvtail ""
set list {}
@@ -124,30 +124,30 @@ proc csvstring {str {separator ","}} {
} elseif {![string length $line]} {
lappend list {}
continue
}
}
set rec [csv2list $line $separator]
set buffer [concat $buffer $rec]
if {![ string length $csvtail]} {
lappend list $buffer
lappend list $buffer
set buffer {}
}
}
}
if {[string length $cvstail]} {
return -code error -errorcode {CSV 2 "Multiline parse error"}\
"CSV string parse error"
}
return $list
}
}
package provide Csv 2.1
#========================================================================
# The plan here is such: operations which happen fast or immediatly are
# done at once. Count commands or anything given as command is appended
# to a list for later execution. The idea is that this contains the
# The plan here is such: operations which happen fast or immediatly are
# done at once. Count commands or anything given as command is appended
# to a list for later execution. The idea is that this contains the
# actual measuring payload of the row.
# Drivables are immediatly started.
# After processing the rows, there is a success to wait for motors to arrive
# Then the commands for later execution are run. This frees the user of the
# Then the commands for later execution are run. This frees the user of the
# the necessity to have the count or whatever command as the last thing in the row
#--------------------------------------------------------------------------------
proc testinterrupt {} {
@@ -155,7 +155,7 @@ proc testinterrupt {} {
if {[string first continue $int] < 0} {
error "Interrupted"
}
}
}
#--------------------------------------------------------------------------------
proc processtablerow {line} {
global __tableheader
@@ -225,7 +225,7 @@ proc processtablerow {line} {
}
#------------------------------------------------------------------------
proc tableexe {tablefile} {
global __tableheader
global __tableheader
if {[string first NULL $__tableheader] < 0} {
error "Tableexe already running, terminated"
}
@@ -253,7 +253,7 @@ proc loop args {
clientput $args
if {[llength $args] < 2} {
error \
"Usage: loop <no> <sicscommand>\n\t<no> number of repetions\n\t<sicscommand> any SICS command"
"Usage: loop <no> <sicscommand>\n\t<no> number of repetions\n\t<sicscommand> any SICS command"
}
set len [lindex $args 0]
set command [lrange $args 1 end]