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

@@ -203,7 +203,7 @@ proc ::nexus::link {args} {
##
# @brief Initialise state variables
# @brief Initialise state variables
proc ::nexus::init {} {
variable state
variable nexusdic
@@ -298,7 +298,7 @@ proc ::nexus::isValidFileType {type} {
# state(file,open) true
# /data/currentfiletype == UNKNOWN
proc ::nexus::newfile {type {namestyle data}} {
::nexus::newfile_collection -filetype $type -savetype $namestyle
::nexus::newfile_collection -filetype $type -savetype $namestyle
}
##
@@ -428,8 +428,8 @@ proc ::nexus::newfile_collection {args} {
##
# @brief Save data to the currently open file and then close it.
#
# @param point This is the array index for mutable data elements
#
# @param point This is the array index for mutable data elements
#
# This function provides the top level call to the recursive ::nexus::savetree
# function, it should only be called by the ::nexus::save command.
#
@@ -544,8 +544,8 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
} else {
::nexus::CallESProcs
# timestamp force [expr {[clock seconds] - $start_seconds_array($data_label)}]
timestamp force [expr {[clock seconds] - $start_seconds}]
# timestamp force [expr {[clock seconds] - $start_seconds_array($data_label)}]
timestamp force [expr {[clock seconds] - $start_seconds}]
dataFileName force $currFilename($data_label)
file_status force $file_states(O)
::nexus::nxreopenfile $currFilename($data_label)
@@ -558,7 +558,7 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
} message ] {
nxscript puttext data_save_error "([info level 0]) $message"
set caught_exception true
}
}
if {[info exists data_label] && [info exists currFilename($data_label)]} {
::nexus::nxclosefile $currFilename($data_label)
file_status force $file_states(C)
@@ -601,7 +601,7 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
}
} message ] {
return -code error "([info level 0]) $message"
}
}
}
##
@@ -631,21 +631,21 @@ proc ::nexus::save {{point 0} {callType "normalsave"}} {
}
} message ] {
return -code error "([info level 0]) $message"
}
}
}
##
# @brief Traverse the hdb subtree from the given path and save the data in the currently open file
#
# @param hpath path of subtree to save, must not be "/"
# @param pt Current array index for mutable data (optional default=0)
# @param pt Current array index for mutable data (optional default=0)
proc ::nexus::savetree {hpath pt filestatus} {
set caught_exception false
foreach child [hlist /$hpath] {
if [ catch {
array unset p_arr
array set p_arr [hlistprop /$hpath/$child tcllist]
array set p_arr [hlistprop /$hpath/$child tcllist]
if {([info exists p_arr(type)] == 0) || ($p_arr(type) != "nxvgroup")} {
set data_type [lindex [split [hinfo /$hpath/$child] , ] 0]
if {[info exists p_arr(data)] && ($p_arr(data) == true) && ($p_arr(nxsave) == true) } {
@@ -687,14 +687,14 @@ proc ::nexus::savetree {hpath pt filestatus} {
##
# @brief Recursive portion of gen_nxdict function
#
#
# @param hpath hdb subtree path to generate dictionary fragment from, must not be "/"
# @param dictPath parent path for nexus dictionary fragment.
# @param name name for child dictionary path
# @param nxc Nexus class name
#
#
# If the klass name doesn't begin with NX then construct the SDS name by replacing '/' with '_' in the
# hdb path
# hdb path
#
# @see gen_nxdict
proc ::nexus::_gen_nxdict {hpath dictPath name nxc} {
@@ -707,11 +707,11 @@ proc ::nexus::_gen_nxdict {hpath dictPath name nxc} {
if {$nxc == "NXentry"} {
::nexus::_gen_nxdict $hpath/$child $dictPath $child $nxclass
} else {
::nexus::_gen_nxdict $hpath/$child $dictPath/$name,$nxc $child $nxclass
::nexus::_gen_nxdict $hpath/$child $dictPath/$name,$nxc $child $nxclass
}
}
}
array set p_arr [hlistprop /$hpath tcllist]
array set p_arr [hlistprop /$hpath tcllist]
set data_type [lindex [split [hinfo /$hpath] , ] 0]
if {$data_type != "none" || $p_arr(type) == "nxvgroup"} {
#XXX Do we need to check data_type here. This would skip NXVGROUP nodes
@@ -769,9 +769,9 @@ proc ::nexus::gen_NXentry_name {baseName} {
##
# @brief Generate a nexus dictionary file from the hdb tree
#
# An entry in the nexus dictionary is generated for each node in the
# An entry in the nexus dictionary is generated for each node in the
# hdb tree which has the following properties and values, data=true and nxsave=true
#
#
# @param baseName The base name of the file without suffix
# @param nexusdic Name of the nexus dictionary that will be created.
# @return Full path to the nexus dictionary.
@@ -780,7 +780,7 @@ proc ::nexus::gen_nxdict {nexusdic} {
variable nxdictionary
set catch_status [catch {
set nxdict_path $cfPath(nexus)/$nexusdic
array unset nxdictionary
array unset nxdictionary
foreach hp [hlist /] {
if {[hpropexists /$hp data] } {
if {[hgetpropval /$hp data] == true} {
@@ -825,15 +825,15 @@ proc ::nexus::gen_nxdict {nexusdic} {
sicslist setatt $sobj savecmd ::nexus::motor::save
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
}
foreach sobj [sicslist type configurablevirtualmotor] {
foreach sobj [sicslist type configurablevirtualmotor] {
sicslist setatt $sobj savecmd ::nexus::motor::save
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
}
foreach sobj [sicslist type TasMot] {
foreach sobj [sicslist type TasMot] {
sicslist setatt $sobj savecmd ::nexus::motor::save
sicslist setatt $sobj sdsinfo ::nexus::motor::sdsinfo
}
foreach sobj [sicslist type histmem] {
foreach sobj [sicslist type histmem] {
sicslist setatt $sobj savecmd ::nexus::histmem::save
sicslist setatt $sobj sdsinfo ::nexus::histmem::sdsinfo
}
@@ -871,7 +871,7 @@ proc ::nexus::gen_nxdict {nexusdic} {
#
# @param dtype hdb data type
# @return Nexus data type
proc ::nexus::hdb2nx_type {dtype} {
proc ::nexus::hdb2nx_type {dtype} {
switch $dtype {
int {return NX_INT32}
intar {return NX_INT32}
@@ -889,7 +889,7 @@ proc ::nexus::hdb2nx_type {dtype} {
#
# The savecmd attribute of any histogram memory objects should be set to this function
#
# @see set_sobj_attributes
# @see set_sobj_attributes
proc ::nexus::histmem::save {hm nxalias hpath data_type filestatus args} {
variable HMOBJ
@@ -1313,7 +1313,7 @@ proc ::nexus::script::sdsinfo {sdsName data_type sobj args} {
if {$param(mutable) == true} {
set sdsStr "$sdsName -type $dtype $units_att -rank 2 -dim {-1,$size}"
} else {
set sdsStr "$sdsName -type $dtype $units_att -rank 1 -dim {$size}"
set sdsStr "$sdsName -type $dtype $units_att -rank 1 -dim {$size}"
}
}
} message ] {
@@ -1326,12 +1326,12 @@ namespace import ::nexus::*
foreach expt $::nexus::exports {
publish $expt user
sicslist setatt $expt privilege internal
}
}
# TODO Return filename from nxcreatefile and call nxreopen nxclose etc
# dictalias is a global hash which records the alias which the value of
# a sics object (eg motors) is written to. The has is indexed by the
# a sics object (eg motors) is written to. The has is indexed by the
# objects name. It is useful for making links to datasets.
# dim0 = vertical axis on detector
# dim1 = horizontal axis on detector