set arr [$w.l subwidget arrow] ; tixBalloon $arr.bal ; $arr.bal bind $arr -msg "Last spots"
- button $w.mdtv -image [image create photo -file $env(WOK_LIBRARY)/opencascade.gif] -command wokSeeLayout
- tixBalloon $w.mdtv.bal
- $w.mdtv.bal bind $w.mdtv -msg "See Layout"
+ button $w.mdtv -image [image create photo -file $env(WOK_LIBRARY)/opencascade.gif] ;#command wokSeeLayout
+ ;#tixBalloon $w.mdtv.bal
+ ;#$w.mdtv.bal bind $w.mdtv -msg "See Layout"
tixForm $dis -left $lastbut -bottom $top -top $w.mnu
}
wokCWD disable
+ wokSeeLayout
$IWOK_GLOBALS(canvas) bind current <Button-1> {
wokNAV:Tree:Focus [winfo toplevel %W] [lindex [%W gettags current] 0]
switch -glob -- $option {
initialize {
- keylset IWOK_GLOBALS(blist) prepare [list z wokPrepare {wprepare}]
- keylset IWOK_GLOBALS(blist) wbuild [list w winbuild {umake}]
- keylset IWOK_GLOBALS(blist) browser [list b wokbrowser {CDL Browser}]
- keylset IWOK_GLOBALS(blist) params [list p wokPRMAff {Parameters}]
+ wokUtils:key:lset IWOK_GLOBALS(blist) prepare [list z wokPrepare {wprepare}]
+ wokUtils:key:lset IWOK_GLOBALS(blist) wbuild [list w winbuild {umake}]
+ wokUtils:key:lset IWOK_GLOBALS(blist) browser [list b wokbrowser {CDL Browser}]
+ wokUtils:key:lset IWOK_GLOBALS(blist) params [list p wokPRMAff {Parameters}]
}
create {
set blist $IWOK_GLOBALS(blist)
- foreach i [keylkeys blist] {
- set v [keylget blist $i]
+
+ foreach i [wokUtils:key:lkeys blist] {
+ set v [wokUtils:key:lget blist $i]
set m [lindex $v 0]
set f [lindex $v 1]
lappend v [button $w.$m -height 32 -width 32 -image [tix getimage $i] -command $f]
- keylset blist $i $v
+ wokUtils:key:lset blist $i $v
set IWOK_GLOBALS(buttons,state,$i) {}
}
set prev {}
set curr {}
-
- foreach i [keylkeys blist] {
- set v [keylget blist $i]
+ foreach i [wokUtils:key:lkeys blist] {
+ set v [wokUtils:key:lget blist $i]
set curr [lindex $v 0]
if { $prev == {} } {
tixForm $w.$curr -top $w.mnu
disable {
foreach bt $w {
- [lindex [keylget IWOK_GLOBALS(buttons) $bt] end] configure -state disabled
+ [lindex [wokUtils:key:lget IWOK_GLOBALS(buttons) $bt] end] configure -state disabled
}
}
activate {
foreach bt $w {
- [lindex [keylget IWOK_GLOBALS(buttons) $bt] end] configure -state normal
+ [lindex [wokUtils:key:lget IWOK_GLOBALS(buttons) $bt] end] configure -state normal
}
}
set IWOK_GLOBALS(font) [tix option get fixed_font]
set IWOK_GLOBALS(boldfont) [tix option get bold_font]
- ;#tix addbitmapdir /adv_23/WOK/k3dev/ref/src/WOKTclLib ;# THUY EM
- ;#tix addbitmapdir /adv_23/WOK/k3dev/iwok/src/WOKTclLib ;# THUY EM
-
;# ucreate -P dans factory/workshop/ => erreur ?!!!
set IWOK_GLOBALS(ucreate-P) [list {j jini} {p package} {s schema} {i interface} {C client} {e engine} {x executable} {n nocdlpack} {t toolkit} {r resource} {O documentation} {c ccl} {f frontal} {d delivery} {I idl} {S server} {m module}]
wm withdraw .
toplevel $IWOK_GLOBALS(toplevel)
wm title $IWOK_GLOBALS(toplevel) "WOK ( [id user] ) on host [id host]"
- wm geometry $IWOK_GLOBALS(toplevel) $IWOK_GLOBALS(toplevel,geometry)
-
+ ;#wm geometry $IWOK_GLOBALS(toplevel) $IWOK_GLOBALS(toplevel,geometry)
+ wm geometry $IWOK_GLOBALS(toplevel) 1200x80+10+30
;#wokInitPalette black white orange blue
wokInitPalette
set image $IWOK_GLOBALS(factory,image)
foreach name [lsort [Sinfo -F]] {
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}$name \
- -itemtype imagetext -text $name \
- -image $image \
- -data [list $name factory $name $image $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}$name] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}$name \
+ -itemtype imagetext -text $name \
+ -image $image \
+ -data [list $name factory $name $image $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}$name open
}
wokNAV:tlist:Set $w $loc $dir
set image $IWOK_GLOBALS(workshop,image)
set name [finfo -W $loc]
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^$name \
- -itemtype imagetext -text $name \
- -image [tix getimage warehouse] \
- -data [list ${loc}:${name} warehouse $name [tix getimage warehouse] $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^$name] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^$name \
+ -itemtype imagetext -text $name \
+ -image [tix getimage warehouse] \
+ -data [list ${loc}:${name} warehouse $name [tix getimage warehouse] $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^$name open
foreach name [lsort [finfo -s $loc]] {
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} \
- -itemtype imagetext -text $name \
- -image $image \
- -data [list ${loc}:${name} workshop $name $image $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^$name] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} \
+ -itemtype imagetext -text $name \
+ -image $image \
+ -data [list ${loc}:${name} workshop $name $image $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
}
wokNAV:tlist:Set $w $loc $dir
} else {
set image $IWOK_GLOBALS(workbench,image)
}
-
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -text $name -itemtype imagetext \
- -image $image \
- -data [list ${loc}:${name} workbench $name $image $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -text $name -itemtype imagetext \
+ -image $image \
+ -data [list ${loc}:${name} workbench $name $image $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
}
wokNAV:tlist:Set $w $loc $dir
set disp $IWOK_GLOBALS($type,disp)
set fdate $IWOK_GLOBALS($type,fdate)
set image $IWOK_GLOBALS($type,image)
-
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
- -text $name -image $image \
- -data [list ${loc}:${name} devunit_$type $name $image $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
+ -text $name -image $image \
+ -data [list ${loc}:${name} devunit_$type $name $image $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
}
wokNAV:tlist:Set $w $loc $dir
if [info exists TLOC(source)] {
set name source
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
- -text $name -image $IWOK_GLOBALS(devunitstuff,source) \
- -data [list ${loc}:${name} stuff_$name $name $IWOK_GLOBALS(devunitstuff,source) $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
+ -text $name -image $IWOK_GLOBALS(devunitstuff,source) \
+ -data [list ${loc}:${name} stuff_$name $name $IWOK_GLOBALS(devunitstuff,source) $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
set IWOK_WINDOWS($w,NAV,tree,uinfo,${loc}:${name},$name) $TLOC($name)
}
foreach name [array names TLOC] {
if { "$name" != "source" } {
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
- -text $name -image $IWOK_GLOBALS(devunitstuff,cell) \
- -data [list ${loc}:${name} stuff_$name $name $IWOK_GLOBALS(devunitstuff,cell) $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
+ -text $name -image $IWOK_GLOBALS(devunitstuff,cell) \
+ -data [list ${loc}:${name} stuff_$name $name $IWOK_GLOBALS(devunitstuff,cell) $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
set IWOK_WINDOWS($w,NAV,tree,uinfo,${loc}:${name},$name) $TLOC($name)
}
foreach name [lsort -command wokSortPath $IWOK_WINDOWS($w,NAV,tree,uinfo,$loc,$type)] {
set text [file tail $name]
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${text} -itemtype imagetext -text $text \
- -image $image \
- -data [list $loc trig_terminal $text $image $name]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${text}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${text} -itemtype imagetext -text $text \
+ -image $image -data [list $loc trig_terminal $text $image $name]
+ }
}
wokNAV:tlist:Set $w ${loc} $dir
return
foreach unit [pinfo -a ${loc}] {
set type [lindex $unit 0]
set name [lindex $unit 1]
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
- -text $name -image [tix getimage $type] \
- -data [list ${loc}:${name} parcel_$type ${name} [tix getimage $type] $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
+ -text $name -image [tix getimage $type] \
+ -data [list ${loc}:${name} parcel_$type ${name} [tix getimage $type] $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
}
wokNAV:tlist:Set $w $loc $dir
foreach name [array names TLOC] {
set image $icell
if { "$name" == "source" } { set image $isource }
- $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
- -text $name -image $image \
- -data [list ${loc}:${name} parcelstuff_$name $name $image $fdate $disp]
+ if ![$IWOK_WINDOWS($w,NAV,hlist) info exists ${dir}^${name}] {
+ $IWOK_WINDOWS($w,NAV,hlist) add ${dir}^${name} -itemtype imagetext \
+ -text $name -image $image \
+ -data [list ${loc}:${name} parcelstuff_$name $name $image $fdate $disp]
+ }
$IWOK_WINDOWS($w,NAV,tree) setmode ${dir}^${name} open
set IWOK_WINDOWS($w,NAV,tree,uinfo,${loc}:${name},$name) $TLOC($name)
}
# Usage
#
proc wokStoreUsage { } {
+ global env
puts stderr \
{
Usage : wstore is used to enqueue a report file, to get
(To update a workbench directly from a report see a the end of this help)
>wstore file : without option adds a report in the report's queue
- from <file> (created by wprepare).
+ from <file>.
Queue name is deduced from the name of the father
- workbench found in <file>.
+ workbench written in <file>. (created by wprepare).
To list all pending reports name and ID in a queue use the following command:
> wstore -wb name -ls
In the following syntaxes the option -wb is used to specify a workbench name.
(Use a full workbench path for the workbench name. <Factory:workshop:workbench>
Default is the current wb. <ID> is a report ID (see above)
- option -ls
>wstore [-rm|-cat] [-wb name] [ID]
(Default behavior: Creates a a subdirectory adm in directory created using -base option)
-welcome: If a report list new development units, by default store will refuse.
If you want wstore be quiet create the queue with -welcome option.
+ -trigger to specify the full path of a tcl file defining a tcl proc triggered after a
+ report has been enqueued. An example for such a file can be found in
+ $env(WOK_LIBRARY)/wstore_trigger.example.
To list all queues and their associated parameters:
set tblreq(-wb) value_required:string
set tblreq(-create) {}
- set tblreq(-queue) value_required:string
+
+ set tblreq(-queue) value_required:string
+ set tblreq(-trigger) value_required:string
+
set tblreq(-base) value_required:string
set tblreq(-type) value_required:string
set tblreq(-journal) value_required:string
if [info exists tabarg(-queue)] {
set queue $tabarg(-queue)
}
+ set trig {}
+ if [info exists tabarg(-trigger)] {
+ set trig $tabarg(-trigger)
+ }
set type SCCS
if [info exists tabarg(-type)] {
set type $tabarg(-type)
set journal [file join $commonbase adm wintegre.jnl]
}
wokStore:Report:Configure set \
- [wokStore:Report:FileAdm $curwb] $curwb $queue $base $type $counter $journal $welcome
+ [wokStore:Report:FileAdm $curwb] $curwb $queue $trig $base $type $counter $journal $welcome
if { $verbose } {
msgprint -c WOKVC -i "Reports queue created under $queue "
msgprint -c WOKVC -i "Repository ($type) created under $base "
msgprint -c WOKVC -i "Repository ([wokIntegre:BASE:GetType]) under [wokIntegre:BASE:GetRootName]"
msgprint -c WOKVC -i "Integration counter in : [wokIntegre:Number:GetName]"
msgprint -c WOKVC -i "Integration journal in : [wokIntegre:Journal:GetName]"
+ msgprint -c WOKVC -i "Trigger : [wokStore:Trigger:GetName]"
return
}
msgprint -c WOKVC -i "Storing report in queue of workbench ${shop}:$wbpere"
set frigo [file join [wokStore:Report:GetRootName] ${entry}]
wokStore:Report:Add $ID table $banner $notes $frigo
+ if { [set trig [wokStore:Trigger:Exists]] != {} } {
+ wokStore:Trigger:Invoke $trig $frigo
+ }
return
} else {
msgprint -c WOKVC -e "Report name $TID should not contains a comma."
if { $alert == 1 } {
msgprint -c WOKVC -e "File VCDEF.tcl not found in [file dirname $vc] of workbench $wb."
}
- wokStore:Report:Configure unset {} {} {} {} {} {} {} {}
+ wokStore:Report:Configure unset {} {} {} {} {} {} {} {} {}
return {}
}
} else {
msgprint -c WOKVC -e "Entity $wb is not a workbench."
- wokStore:Report:Configure unset {} {} {} {} {} {} {} {}
+ wokStore:Report:Configure unset {} {} {} {} {} {} {} {} {}
return {}
}
} else {
msgprint -c WOKVC -e "Entity $wb does not exists."
- wokStore:Report:Configure unset {} {} {} {} {} {} {} {}
+ wokStore:Report:Configure unset {} {} {} {} {} {} {} {} {}
return {}
}
}
;#
;# Ecrit dans diradm le fichier VCDEF.tcl contenant les definitions de la queue.
;#
-proc wokStore:Report:Configure { option fileadm wb queue base type counter journal welcome } {
+proc wokStore:Report:Configure { option fileadm wb queue trignam base type counter journal welcome } {
set proc_defined_in_VC [list \
wokStore:Report:GetRootName \
+ wokStore:Trigger:GetName \
wokIntegre:BASE:GetRootName \
wokIntegre:BASE:GetType \
wokIntegre:RefCopy:GetWB \
switch -- $option {
set {
- wokStore:mkdir $queue ;# the hook for the queue
+ wokUtils:FILES:mkdir $queue ;# the hook for the queue
eval "proc wokStore:Report:GetRootName { } { return $queue }"
- wokStore:mkdir $base ;# the hook for the base
+ eval "proc wokStore:Trigger:GetName { } { return $trignam }"
+ wokUtils:FILES:mkdir $base ;# the hook for the base
eval "proc wokIntegre:BASE:GetRootName { } { return $base }"
;# the type of the base
eval "proc wokIntegre:BASE:GetType { } { return $type }"
;# create integration counter ONLY if it does not exists.
if { ![file exists [wokIntegre:Number:GetName]] } {
msgprint -c WOKVC -i "Creating file [wokIntegre:Number:GetName]"
- wokStore:mkdir [file dirname [wokIntegre:Number:GetName]]
+ wokUtils:FILES:mkdir [file dirname [wokIntegre:Number:GetName]]
wokUtils:FILES:touch [wokIntegre:Number:GetName] 1
}
;# create journal file ONLY if it does not exists.
if { ![file exists [wokIntegre:Journal:GetName]] } {
msgprint -c WOKVC -i "Creating file [wokIntegre:Journal:GetName]"
- wokStore:mkdir [file dirname [wokIntegre:Journal:GetName]]
+ wokUtils:FILES:mkdir [file dirname [wokIntegre:Journal:GetName]]
}
;#
eval "proc wokIntegre:Version:Get { } { return 1 }"
upvar $intable table
set writact $banner
- wokStore:mkdir $frigo
- chmod 0777 $frigo
+ wokUtils:FILES:mkdir $frigo
+ wokUtils:FILES:chmod 0777 $frigo
set LST [lsort [array names table]]
foreach e $LST {
;#msgprint -c WOKVC -i [format "Processing unit : %s" $e]
- wokStore:mkdir $frigo/$e
- chmod 0777 $frigo/$e
+ wokUtils:FILES:mkdir $frigo/$e
+ wokUtils:FILES:chmod 0777 $frigo/$e
lappend writact "* $e"
foreach l $table($e) {
set str [wokUtils:LIST:Trim $l]
}
+ {
if { [wokUtils:FILES:copy $orig/$file $frigo/$e/$file] != -1 } {
- chmod 0777 $frigo/$e/$file
+ wokUtils:FILES:chmod 0777 $frigo/$e/$file
lappend writact "+ $frigo/$e/$file"
} else {
return -1
}
# {
if { [wokUtils:FILES:copy $orig/$file $frigo/$e/$file] != -1 } {
- chmod 0777 $frigo/$e/$file
+ wokUtils:FILES:chmod 0777 $frigo/$e/$file
lappend writact "# $frigo/$e/$file"
} else {
return -1
wokUtils:FILES:copy $ID $frigo/report-orig
wokUtils:FILES:ListToFile $writact $frigo/report-work
wokUtils:FILES:ListToFile $notes $frigo/report-notes
- chmod 0777 [list $frigo/report-orig $frigo/report-work $frigo/report-notes]
+ wokUtils:FILES:chmod 0777 [list $frigo/report-orig $frigo/report-work $frigo/report-notes]
return 1
}
#;>
proc wokStore:Report:RmEntry { fullentry } {
foreach itm [glob -nocomplain $fullentry/*] {
if [file isdirectory $itm] {
- wokUtils:FILES:removedir $itm
+ wokUtils:FILES:rmdir $itm
}
}
- wokUtils:FILES:removedir $fullentry
+ wokUtils:FILES:rmdir $fullentry
return
}
#;<
proc wokStore:Report:GetPrettyName { Uniquename } {
set l [split $Uniquename ,]
- return [list [lindex $l 1] [clock format [lindex $l 0]] ]
+ return [list [lindex $l 1] [fmtclock [lindex $l 0]] ]
}
#;>
return $l
}
;#
-;#
-proc wokStore:mkdir { d } {
- global tcl_version
- if ![file exists $d] {
- if { "$tcl_version" == "7.5" } {
- mkdir -path $d
- } else {
- file mkdir $d
- }
- if [file exists $d] {
- return $d
- } else {
- return {}
- }
- } else {
- return $d
- }
-}
-;#
-;#
proc wokPrepare:Report:Copy { intable wbpere wbfils {verbose 0} } {
upvar $intable table
# {
if { [lsearch $localfiles $path] != -1 } {
msgprint -c WOKVC -i " Updating $file in unit ${wbpere}:${udname}"
- lappend writact "chmod 0644 $frigo/$file"
+ lappend writact "wokUtils:FILES:chmod 0644 $frigo/$file"
lappend writact "wokUtils:FILES:copy $path $frigo/$file"
}
}
msgprint -c WOKVC -i "Repository ([wokIntegre:BASE:GetType]) under [wokIntegre:BASE:GetRootName]"
msgprint -c WOKVC -i "Integration counter in : [wokIntegre:Number:GetName]"
msgprint -c WOKVC -i "Integration journal in : [wokIntegre:Journal:GetName]"
+ msgprint -c WOKVC -i "Trigger : [wokStore:Trigger:GetName]"
puts ""
}
}
;#
;# Workbench KAS:C40:ros
;#wstore -create -wb :KAS:TEST:ros -base /adv_20/KAS/C40/SCCS/BASES -type SCCS -queue /adv_20/KAS/C40/SCCS/adm/C40/FRIGO -counter /adv_20/KAS/C40/SCCS/adm/C40/report.num -journal /adv_20/KAS/C40/SCCS/adm/C40/wintegre.jnl
+#;>
+# Check if file trigger exists
+#
+#;<
+proc wokStore:Trigger:Exists { } {
+ set trignam [wokStore:Trigger:GetName]
+ if { $trignam != {} } {
+ if { [file exists $trignam] } {
+ return $trignam
+ } else {
+ return {}
+ }
+ } else {
+ return {}
+ }
+}
+#;>
+# Invoke a trigger
+#;<
+proc wokStore:Trigger:Invoke { trignam report_path } {
+ uplevel #0 source $trignam
+ ;#msgprint -c WOKVC -i "Invoking file $trignam."
+ if { [catch { wstore_trigger $report_path } trigval ] == 0 } {
+ ;#msgprint -c WOKVC -i "Trigger $trignam successfully completed"
+ return $trigval
+ } else {
+ msgprint -c WOKVC -e "Error in trigger: $trigval"
+ return {}
+ }
+ return
+}
}
return $str
}
+;#
+;# keys.. provided by Tclx
+;#
+proc wokUtils:key:lset { listvar key value } {
+ upvar $listvar VLOC
+ set lret {}
+ if [info exists VLOC] {
+ set l2 {}
+ foreach x $VLOC {
+ lappend l2 [lindex $x 0]
+ lappend l2 [lindex $x 1]
+ }
+ array set MM $l2
+ set MM($key) $value
+ foreach f [array names MM] {
+ lappend lret [list $f $MM($f)]
+ }
+ } else {
+ lappend lret [list $key $value]
+ }
+ set VLOC $lret
+ return
+}
+proc wokUtils:key:lkeys { listvar } {
+ upvar $listvar VLOC
+ set lret {}
+ foreach x $VLOC {
+ lappend lret [lindex $x 0]
+ }
+ return $lret
+}
+proc wokUtils:key:lget { listvar indx } {
+ upvar $listvar VLOC
+ foreach x $VLOC {
+ if { [string compare [lindex $x 0] $indx] == 0 } {
+ return [lindex $x 1]
+ }
+ }
+ return {}
+}
+proc wokUtils:key:ldel { listvar indx } {
+ upvar $listvar VLOC
+ set lret {}
+ foreach x $VLOC {
+ if { [string compare [lindex $x 0] $indx] != 0 } {
+ lappend lret $x
+ }
+ }
+ set VLOC $lret
+ return
+}