Changeset 447 for trunk/addcmds.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:06:19 PM (14 years ago)
Author:
toby
Message:

# on 2001/09/25 23:25:21, toby did:
add comments
improve error message display & try to show all exptool errors
dummy histogram support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addcmds.tcl

    • Property rcs:date changed from 2001/09/04 22:01:55 to 2001/09/25 23:25:21
    • Property rcs:lines changed from +7 -3 to +350 -56
    • Property rcs:rev changed from 1.21 to 1.22
    r413 r447  
    11# $Id$
     2
     3#----------- Add Phase routines ----------------------------------------
    24
    35proc MakeAddPhaseBox {} {
     
    147149                 $np.error \
    148150                 "Error processing space group\nReview error message below" \
    149                  $b
     151                 $b OK "" 1
    150152        set expgui(oldphaselist) -1
    151153        return
     
    190192    } errmsg
    191193    # load the revised exp file
     194    set oldphaselist $expmap(phaselist)
    192195    loadexp $expgui(expfile)
    193196    set fp [open exptool.out r]
     
    195198    close $fp
    196199    destroy $np
     200    set err 0
     201    if {[llength $oldphaselist] == [llength $expmap(phaselist)]} {set err 1}
    197202    if {$errmsg != ""} {
     203        set err 1
    198204        append errmsg "\n" $out
    199205    } else {
    200206        set errmsg $out
    201207    }
    202     if {$expgui(showexptool)} {
    203         ShowBigMessage \
    204                 $np \
    205                 "Please review the result from adding the phase" \
    206                 $errmsg
     208    if {$expgui(showexptool) || $err} {
     209        set msg "Please review the result from adding the phase"
     210        if {$err} {append msg "\nIt appears an error occurred!"}
     211        ShowBigMessage $np $msg $errmsg OK "" $err
    207212    }
    208213    file delete exptool.in exptool.out
     
    211216}
    212217
     218#----------- Add Histogram routines --------------------------------------
    213219proc MakeAddHistBox {} {
    214220    global expmap newhist
     
    222228    bind $np <Key-F1> "MakeWWWHelp expgui3.html AddHist"
    223229
    224     grid [label $np.l0 -text "Adding new histogram"] \
     230    grid [label $np.l0 -text "Adding a new histogram"] \
    225231            -column 0 -row 0 -sticky ew -columnspan 7
    226     grid [label $np.l1 -text "Data file:"] -column 0 -row 1
     232    grid [checkbutton $np.d0 -text "Dummy Histogram" -variable newhist(dummy) \
     233            -command "PostDummyOpts $np" \
     234            ] -column 2 -row 0 -columnspan 99 -sticky e
     235    grid [label $np.l1 -text "Data file:"] -column 0 -row 2
    227236    grid [label $np.t1 -textvariable newhist(rawfile) -bd 2 -relief ridge] \
    228             -column 1 -row 1 -columnspan 3 -sticky ew
     237            -column 1 -row 2 -columnspan 3 -sticky ew
    229238    grid [button $np.b1 -text "Select File" \
    230239            -command "getrawfile $np" \
    231             ] -column 4 -row 1
    232 
    233     grid [label $np.lbank -text "Select bank" -anchor w] -column 1 -row 2 -sticky w
    234     grid [frame $np.bank]  -column 2 -row 2 -columnspan 7 -sticky ew
    235 
    236     grid [label $np.l2 -text "Instrument\nParameter file:"] -column 0 -row 3
     240            ] -column 4 -row 2
     241
     242    grid [label $np.lbank -text "Select bank" -anchor w] -column 1 -row 3 -sticky w
     243    grid [frame $np.bank]  -column 2 -row 3 -columnspan 7 -sticky ew
     244
     245    grid [label $np.l2 -text "Instrument\nParameter file:"] -column 0 -row 5
    237246    grid [label $np.t2 -textvariable newhist(instfile) -bd 2 -relief ridge] \
    238             -column 1 -row 3 -columnspan 3 -sticky ew
     247            -column 1 -row 5 -columnspan 3 -sticky ew
    239248    grid [button $np.b2 -text "Select File" \
    240249            -command "getinstfile $np" \
    241             ] -column 4 -row 3
    242 
    243     grid [label $np.lset -text "Select set" -anchor w] -column 1 -row 4 -sticky w
    244     grid [frame $np.set]  -column 2 -row 4 -columnspan 7 -sticky ew
    245 
    246     grid [label $np.l3 -text "Usable data limit:"] -column 0 -row 5 -rowspan 2
     250            ] -column 4 -row 5
     251
     252    grid [label $np.lset -text "Select set" -anchor w] -column 1 -row 6 -sticky w
     253    grid [frame $np.set]  -column 2 -row 6 -columnspan 7 -sticky ew
     254
     255    grid [button $np.f6a -text "Run\nRAWPLOT" -command RunRawplot] \
     256            -column 4 -row 8 -rowspan 2
     257    grid [label $np.l3 -text "Usable data limit:"] -column 0 -row 8 -rowspan 2
    247258    grid [entry $np.e3 -width 12 -textvariable newhist(2tLimit) \
    248             ] -column 1 -row 5 -rowspan 2
     259            ] -column 1 -row 8 -rowspan 2
    249260    grid [radiobutton $np.cb3 -text "D-min" -variable newhist(LimitMode) \
    250             -value 0] -column 2 -row 5 -sticky w
    251     grid [radiobutton $np.cb4 -text "TOF-min\n2-Theta Max" \
     261            -value 0] -column 2 -row 8 -sticky w
     262    grid [radiobutton $np.cb4 -textvariable newhist(limitLbl) \
    252263            -variable newhist(LimitMode) -anchor w -justify l \
    253             -value 1] -column 2 -row 6 -sticky w
    254    
    255     grid [frame $np.f6] -column 0 -row 7 -columnspan 5 -sticky ew
     264            -value 1] -column 2 -row 9 -sticky w
     265    set newhist(limitLbl) "TOF-min\n2-Theta Max"
     266    # spacers
     267    grid [frame $np.sp0 -bg white] \
     268            -columnspan 20 -column 0 -row 1 -sticky nsew -ipady 2
     269    grid [frame $np.sp1 -bg white] \
     270            -columnspan 20 -column 0 -row 4 -sticky nsew -ipady 2
     271    grid [frame $np.sp2 -bg white] \
     272            -columnspan 20 -column 0 -row 7 -sticky nsew -ipady 2
     273    grid [frame $np.sp3 -bg white] \
     274            -columnspan 20 -column 0 -row 98 -sticky nsew -ipady 2
     275    grid [frame $np.f6] -column 0 -row 99 -columnspan 5 -sticky ew
    256276    grid [button $np.f6.b6a -text Add \
    257277            -command "addhist $np"] -column 0 -row 0
     
    263283            -column 2 -row 0 -sticky e
    264284    grid columnconfigure $np.f6 2 -weight 1
    265 
    266     grid [button $np.f6a -text "Run\nRAWPLOT" -command RunRawplot] \
    267             -column 4 -row 5 -rowspan 2
    268    
    269285    grid columnconfigure $np 3 -weight 1
    270    
     286
     287    # dummy histogram stuff
     288    frame $np.d1
     289    grid [label $np.d1.l1 -text min] -col 1 -row 1
     290    grid [label $np.d1.l2 -text max] -col 2 -row 1
     291    grid [label $np.d1.l3 -text step] -col 3 -row 1
     292    grid [label $np.d1.lu -text ""] -col 4 -row 1 -rowspan 2
     293    grid [entry $np.d1.e1 -width 10 -textvariable newhist(tmin)] -col 1 -row 2
     294    grid [entry $np.d1.e2 -width 10 -textvariable newhist(tmax)] -col 2 -row 2
     295    grid [entry $np.d1.e3 -width 10 -textvariable newhist(tstep)] -col 3 -row 2
     296    grid [label $np.d1.m1 -anchor w] -col 1 -row 3 -sticky ew
     297    grid [label $np.d1.m2 -anchor w] -col 2 -row 3 -sticky ew
     298    label $np.dl1 -text "Data range:"
     299    label $np.dl2 -text "Allowed"
     300    label $np.dl3 -text "\n" -justify left -fg blue
    271301    wm title $np "add new histogram"
    272302
     303    set newhist(banknum) {}
     304    set newhist(setnum) {}
    273305    if {[string trim $newhist(rawfile)] != {}} {
    274306        validaterawfile $np $newhist(rawfile)
     
    277309        validateinstfile $np $newhist(instfile)
    278310    }
    279     set newhist(banknum) {}
    280     set newhist(setnum) {}
    281     #    for {set i 0} {$i<100} {incr i} {set newhist(bank$i) 0}
    282     #    for {set i 0} {$i<100} {incr i} {set newhist(set$i) 0}
    283 
     311
     312    PostDummyOpts $np
    284313    # set grab, etc.
    285314    putontop $np
     
    487516        ]
    488517    }
     518    set newhist(setnum) {}
    489519    validateinstfile $np $inp
    490520}
     
    534564            }
    535565        }
     566        # scan for the instrument constants
     567        if {[regexp {INS ([ 1-9][0-9]) ICONS(.*)} $line a b c]} {
     568            set b [string trim $b]
     569            set newhist(inst${b}ICONS) [string trim $c]
     570        }
     571        if {[regexp {INS ([ 1-9][0-9])I ITYP(.*)} $line a b c]} {
     572            set b [string trim $b]
     573            set newhist(inst${b}ITYP) [string trim $c]
     574        }
    536575    }
    537576    # were banks found?
     
    556595        }
    557596        grid [radiobutton $np.set.$i -text $i \
     597                -command "PostDummyOpts $np; ValidateDummyHist $np" \
    558598                -variable newhist(setnum) -value $i] \
    559599                -column [incr col] -row $row -sticky w
    560 
    561600        if {$newhist(instbanks) == 1} {set newhist(setnum) $i}
    562601    }
     602    if {$newhist(dummy)} {PostDummyOpts $np; ValidateDummyHist $np}
    563603}
    564604
    565605proc addhist {np} {
    566     global expgui newhist tcl_platform
     606    global expgui newhist tcl_platform expmap
     607    if {$newhist(dummy)} {
     608        AddDummyHist $np
     609        return
     610    }
    567611    # validate the input
    568612    set err {}
     
    638682    } errmsg
    639683    # load the revised exp file
     684    set oldpowderlist $expmap(powderlist)
    640685    loadexp $expgui(expfile)
    641686    set fp [open exptool.out r]
     
    643688    close $fp
    644689    destroy $np
     690    set err 0
     691    if {[llength $oldpowderlist] == [llength $expmap(powderlist)]} {set err 1}
    645692    if {$errmsg != ""} {
    646693        append errmsg "\n" $out
     694        set err 1
    647695    } else {
    648696        set errmsg $out
    649697    }
    650     if {$expgui(showexptool)} {
    651         ShowBigMessage \
    652                 $np \
    653                 "Please review the result from adding the phase" \
    654                 $errmsg
     698    if {$expgui(showexptool) || $err} {
     699        set msg "Please review the result from adding the histogram"
     700        if {$err} {append msg "\nIt appears an error occurred!"}
     701        ShowBigMessage $np $msg $errmsg OK "" $err
    655702    }
    656703    file delete exptool.in exptool.out
     
    677724    runGSASprog rawplot 1
    678725}
    679 
     726#--- Dummy histogram stuff
     727proc PostDummyOpts {np} {
     728    global newhist
     729    if {$newhist(dummy)} {
     730        trace variable newhist(tmin) w "ValidateDummyHist $np"
     731        trace variable newhist(tmax) w "ValidateDummyHist $np"
     732        trace variable newhist(tstep) w "ValidateDummyHist $np"
     733        foreach w {l1 t1 lbank} {
     734            $np.$w config -fg grey
     735        }
     736        $np.b1 config -state disabled
     737        grid forget $np.l3 $np.e3 $np.cb3 $np.cb4  $np.bank $np.f6a
     738        grid $np.dl1 -column 0 -row 8
     739        grid $np.d1 -column 1 -row 8 -rowspan 2 -columnspan 4 -sticky e
     740        grid $np.dl3 -column 0 -columnspan 99 -row 10 -sticky ew
     741        if {$newhist(insttype) == "TOF"} {
     742            $np.dl1 config -text "Data range:\n(TOF)"
     743            $np.d1.lu config -text millisec
     744            grid $np.dl2 -column 0 -row 9
     745            catch {
     746                foreach {x tmin tmax x} $newhist(inst${newhist(setnum)}ITYP) {}
     747                $np.d1.m1 config -text $tmin
     748                $np.d1.m2 config -text $tmax
     749            }
     750        } elseif {$newhist(insttype) == "CW"} {
     751            $np.dl1 config -text "Data range:\n(2Theta)"
     752            $np.d1.lu config -text degrees
     753            #grid forget $np.dl2
     754            $np.d1.m1 config -text >0.
     755            $np.d1.m2 config -text <180.
     756        } else {
     757            $np.dl1 config -text "Data range:\n(Energy)"
     758            $np.d1.lu config -text KeV
     759            $np.d1.m1 config -text 1.
     760            $np.d1.m2 config -text 200.
     761            grid $np.dl2 -column 0 -row 9
     762        }
     763    } else {
     764        foreach var {tmin tmax tstep} {
     765            foreach v [ trace vinfo newhist($var)] {
     766                eval trace vdelete newhist($var) $v
     767            }
     768        }
     769        grid forget $np.dl1 $np.d1 $np.dl2 $np.dl3
     770        foreach w {l1 t1 lbank} {
     771            $np.$w config -fg black
     772        }
     773        $np.b1 config -state normal
     774        grid $np.bank -column 2 -row 3 -columnspan 7 -sticky ew
     775        grid $np.f6a -column 4 -row 8 -rowspan 2
     776        grid $np.l3 -column 0 -row 8 -rowspan 2
     777        grid $np.e3 -column 1 -row 8 -rowspan 2
     778        grid $np.cb3 -column 2 -row 8 -sticky w
     779        grid $np.cb4 -column 2 -row 9 -sticky w
     780     }
     781}
     782
     783proc ValidateDummyHist {np args} {
     784    # validate input
     785    global newhist
     786    set msg {}
     787    $np.dl3 config -text "\n"
     788    foreach e {e1 e2 e3} v {tmin tmax tstep} {
     789        if [catch {expr $newhist($v)}] {
     790            $np.d1.$e config -fg red
     791            append msg "Value of $newhist($v) is invalid for $v\n"
     792        } else {
     793            $np.d1.$e config -fg black
     794        }
     795    }
     796    if {[catch {expr $newhist(setnum)}]} {
     797        append msg "An instrument file bank number must be selected\n"
     798    } elseif {$newhist(setnum) <= 0 || \
     799            $newhist(setnum) > $newhist(instbanks)} {
     800        append msg "An invalid instrument file bank has been selected\n"
     801    }
     802
     803    if {$msg != ""} {return $msg}
     804
     805    if {$newhist(tmax) <= $newhist(tmin)} {
     806        $np.d1.e1 config -fg red
     807        $np.d1.e2 config -fg red
     808        return "Tmax <= Tmin\n"
     809    }
     810
     811
     812    set dmin -1
     813    set dmax -1
     814    if {$newhist(insttype) == "TOF"} {
     815        catch {
     816            foreach {x tmin tmax x} $newhist(inst${newhist(setnum)}ITYP) {}
     817            if {$newhist(tmin) <$tmin } {
     818                $np.d1.e1 config -fg red
     819                append msg "Min value of $newhist(tmin) msec is invalid.\n"
     820            }
     821            if {$newhist(tmax) >$tmax } {
     822                $np.d1.e2 config -fg red
     823                append msg "Max value of $newhist(tmax) msec is invalid.\n"
     824            }
     825            set dmin [expr {1000. * $newhist(tmin) / \
     826                    [lindex $newhist(inst${newhist(setnum)}ICONS) 0]}]
     827            set dmax [expr {1000. * $newhist(tmax) / \
     828                    [lindex $newhist(inst${newhist(setnum)}ICONS) 0]}]
     829        }
     830    } elseif {$newhist(insttype) == "CW"} {
     831        if {$newhist(tmin) <= 0 } {
     832            $np.d1.e1 config -fg red
     833            append msg "Min value of $newhist(tmin) degrees is invalid.\n"
     834        }
     835        if {$newhist(tmax) >=180 } {
     836            $np.d1.e2 config -fg red
     837            append msg "Max value of $newhist(tmax) degrees is invalid.\n"
     838        }
     839        catch {
     840            set dmin [expr {[lindex $newhist(inst${newhist(setnum)}ICONS) 0]\
     841                    * 0.5 / sin(acos(0.)*$newhist(tmax)/180.)}]
     842            set dmax [expr {[lindex $newhist(inst${newhist(setnum)}ICONS) 0]\
     843                    * 0.5 / sin(acos(0.)*$newhist(tmin)/180.)}]
     844        }
     845    } else {
     846        if {$newhist(tmin) <1 } {
     847            $np.d1.e1 config -fg red
     848            append msg "Min value of $newhist(tmin) KeV is invalid.\n"
     849        }
     850        if {$newhist(tmax) >200 } {
     851            $np.d1.e2 config -fg red
     852            append msg "Max value of $newhist(tmax) KeV is invalid.\n"
     853        }
     854        catch {
     855            set ang [lindex $newhist(inst${newhist(setnum)}ICONS) 0]
     856            set dmin [expr {12.398/ (2.0*sin($ang*acos(0.)/180) * \
     857                    $newhist(tmax))}]
     858            set dmax [expr {12.398/ (2.0*sin($ang*acos(0.)/180) * \
     859                    $newhist(tmin))}]
     860        }
     861    }
     862    if {$msg != ""} {return $msg}
     863    set pnts -1
     864    catch {
     865        set pnts [expr {1+int(($newhist(tmax) - $newhist(tmin))/$newhist(tstep))}]
     866        set qmin [expr {4.*acos(0)/$dmax}]
     867        set qmax [expr {4.*acos(0)/$dmin}]
     868    }
     869    if {$pnts <= 0} {
     870        $np.d1.e3 config -fg red
     871        append msg "Step value of $newhist(tstep) is invalid.\n"
     872    }
     873    if {$pnts >20000} {
     874        $np.d1.e3 config -fg red
     875        append msg "Step value of $newhist(tstep) is too small (>20000 points).\n"
     876    }
     877    if {$msg != ""} {return $msg}
     878    if {$dmin > 0 && $dmax > 0} {
     879        catch {
     880            set msg [format \
     881                    {  %d points.%s  D-space range: %.2f-%.2f A,  Q: %.2f-%.2f/A} \
     882                    $pnts "\n" $dmin $dmax $qmin $qmax]
     883            $np.dl3 config -text $msg
     884        }
     885    }
     886    if {$msg != ""} {return ""}
     887    $np.dl3 config -text [format {  %d points.%s  Range: ?} $pnts "\n"]
     888    return "Invalid data range -- something is wrong!"
     889}
     890
     891proc AddDummyHist {np} {
     892    global newhist expgui expmap
     893    global tcl_platform
     894    set msg [ValidateDummyHist $np]
     895    if {$msg != ""} {
     896        MyMessageBox -parent $np -title  "Add Histogram Error" \
     897                -message "The following error(s) were found in your input:\n$msg" \
     898                -icon error -type ok -default ok \
     899                -helplink "expgui3.html AddHistErr"
     900        return
     901    }
     902    set fp [open exptool.in w]
     903    puts $fp "D"
     904    puts $fp $newhist(instfile)
     905    puts $fp $newhist(setnum)
     906    if {$newhist(insttype) == "TOF"} {
     907        puts $fp "C"
     908    }
     909    puts $fp $newhist(tmin)
     910    puts $fp $newhist(tmax)
     911    puts $fp $newhist(tstep)
     912    puts $fp "X"
     913    puts $fp "0"
     914    close $fp
     915    # Save the current exp file
     916    savearchiveexp
     917    # disable the file changed monitor
     918    set expgui(expModifiedLast) 0
     919    set expnam [file root [file tail $expgui(expfile)]]
     920    set err [catch {
     921        if {$tcl_platform(platform) == "windows"} {
     922            exec [file join $expgui(gsasexe) exptool.exe] $expnam \
     923                    < exptool.in >& exptool.out
     924        } else {
     925            exec [file join $expgui(gsasexe) exptool] $expnam \
     926                    < exptool.in >& exptool.out
     927        }
     928    } errmsg ]
     929    # load the revised exp file
     930    set oldpowderlist $expmap(powderlist)
     931    loadexp $expgui(expfile)
     932    set fp [open exptool.out r]
     933    set out [read $fp]
     934    close $fp
     935    if {[llength $oldpowderlist] == [llength $expmap(powderlist)]} {set err 1}
     936    if {$errmsg != ""} {
     937        append errmsg "\n" $out
     938    } else {
     939        set errmsg $out
     940    }
     941    if {[regexp {\(P,H,A\)} $out]} {
     942        set msg {You must upgrade the EXPTOOL program.}
     943        append msg { This version cannot add dummy histograms.}
     944        MyMessageBox -icon error -title "Old EXPTOOL program" \
     945                -message $msg -parent $np \
     946                -helplink "expguierr.html OldEXPTOOL"
     947        # update the documentation & link
     948        destroy $np
     949    } elseif {$expgui(showexptool) || $err} {
     950        set msg "Please review the result from adding the dummy histogram"
     951        if {$err} {append msg "\nIt appears an error occurred!"}
     952        ShowBigMessage $np $msg $errmsg OK "" $err
     953    } else {
     954        destroy $np
     955    }
     956    file delete exptool.in exptool.out
     957}
     958
     959
     960
     961#----------- Add Atoms routines ----------------------------------------
    680962proc MakeAddAtomsBox {phase "atomlist {}"} {
    681963    global expmap expgui
     
    8261108
    8271109proc addatom {phase top} {
    828     global expgui env
     1110    global expgui env expmap
    8291111    set np $top.canvas.fr
    8301112    set row 0
     
    9241206    } errmsg
    9251207    # load the revised exp file
     1208    set oldatomlist $expmap(atomlist_$phase)
    9261209    loadexp $expgui(expfile)
    9271210    set fp [open exptool.out r]
     
    9291212    close $fp
    9301213    destroy $top
     1214    set err 0
     1215    if {[llength $oldatomlist] == [llength $expmap(atomlist_$phase))]} {
     1216        set err 1
     1217    }
    9311218    if {$errmsg != ""} {
    9321219        append errmsg "\n" $out
     1220        set err 1
    9331221    } else {
    9341222        set errmsg $out
    9351223    }
    936     if {$expgui(showexptool)} {
    937         ShowBigMessage \
    938                 $top \
    939                 "Please review the result from adding the atom(s)" \
    940                 $errmsg
     1224    if {$expgui(showexptool) || $err} {
     1225        set msg "Please review the result from adding the atom(s)"
     1226        if {$err} {append msg "\nIt appears an error occurred!"}
     1227        ShowBigMessage $top $msg $errmsg OK "" $err
    9411228    }
    9421229    file delete exptool.in exptool.out
    9431230}
    9441231
    945 #----------------------------------------------
    946 # commands to modify a group of selected atoms |
    947 #----------------------------------------------
     1232#---------------------------------------------------------------------------
     1233# commands to modify a group of selected atoms
     1234#---------------------------------------------------------------------------
    9481235
    9491236# make the dialog to choose an action
     
    11621449}
    11631450
     1451#----------- more Add Phase routines (import) -------------------------------
    11641452proc ImportPhase {format np} {
    11651453    global expgui
     
    13981686                 $top.error \
    13991687                 "Error processing space group\nReview error message below" \
    1400                  $b
     1688                 $b OK "" 1
    14011689        return
    14021690    } else {
     
    16221910    } errmsg
    16231911    # load the revised exp file
     1912    set oldatomlist $expmap(atomlist_$phase)
    16241913    loadexp $expgui(expfile)
    16251914    set fp [open exptool.out r]
    16261915    set out [read $fp]
    16271916    close $fp
     1917    set err 0
     1918    if {[llength $oldatomlist] == [llength $expmap(atomlist_$phase))]} {
     1919        set err 1
     1920    }
    16281921    if {$errmsg != ""} {
    16291922        append errmsg "\n" $out
     1923        set err 1
    16301924    } else {
    16311925        set errmsg $out
    16321926    }
    16331927    donewait
    1634     if {$expgui(showexptool)} {
    1635         ShowBigMessage \
    1636                 $top \
    1637                 "Please review the result from adding the atom(s)" \
    1638                 $errmsg
     1928    if {$expgui(showexptool) || $err} {
     1929        set msg "Please review the result from adding the atom(s)"
     1930        if {$err} {append msg "\nIt appears an error occurred!"}
     1931        ShowBigMessage $top $msg $errmsg OK "" $err
    16391932    }
    16401933    file delete exptool.in exptool.out
     
    16921985# default
    16931986set newhist(insttype) CW
     1987set newhist(dummy) 0
Note: See TracChangeset for help on using the changeset viewer.