Changeset 675


Ignore:
Timestamp:
Dec 4, 2009 5:10:08 PM (11 years ago)
Author:
toby
Message:

# on 2003/04/10 22:19:24, toby did:
use filename rather than arg (why?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dumpexp.tcl

    • Property rcs:date changed from 2002/01/22 23:12:36 to 2003/04/10 22:19:24
    • Property rcs:lines changed from +31 -15 to +10 -7
    • Property rcs:rev changed from 1.2 to 1.3
    r545 r675  
    66    exit
    77}
     8
     9set filename [lindex $argv 0]
     10
    811set expgui(font) 14
    912set expgui(debug) 0
    1013
    11 pack [label .l -text "Reading $argv\nPlease wait"]
     14pack [label .l -text "Reading $filename\nPlease wait"]
    1215update
    1316wm protocol . WM_DELETE_WINDOW {puts ""; exit}
     
    4952SetTkDefaultOptions $expgui(font)
    5053
    51 if {![file exists $argv]} {
     54if {![file exists $filename]} {
    5255    # read error
    5356    wm withdraw .
    5457    tk_dialog .err {Bad file} \
    55             "$argv0: error\nfile $argv not found" \
     58            "$argv0: error\nfile $filename not found" \
    5659            error 0 Continue
    5760    exit
    5861}
    59 set fmt [expload $argv]
     62set fmt [expload $filename]
    6063if {$fmt < 0} {
    6164    # read error
    6265    wm withdraw .
    6366    tk_dialog .err {Bad file} \
    64             "$argv0: error reading $argv\nThis is not a valid GSAS .EXP file" \
     67            "$argv0: error reading $filename\nThis is not a valid GSAS .EXP file" \
    6568            error 0 Continue
    6669    exit
     
    7174    wm withdraw .
    7275    tk_dialog .err {Bad file} \
    73             "$argv0: error reading $argv\nNo phases found" \
     76            "$argv0: error reading $filename\nNo phases found" \
    7477            error 0 Continue
    7578    exit
     
    106109    if {$expmap(phasetype) == 4} {
    107110        tk_dialog .err {Only mm phase} \
    108                 "$argv0: unable to read from $argv\nOnly a macromolecular phase is present." \
     111                "$argv0: unable to read from $filename\nOnly a macromolecular phase is present." \
    109112                error 0 Continue
    110113        exit
Note: See TracChangeset for help on using the changeset viewer.