ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/getfile3.6.tcl
(Generate patch)

Comparing ray/src/util/getfile3.6.tcl (file contents):
Revision 2.7 by greg, Wed Nov 30 16:47:00 1994 UTC vs.
Revision 2.8 by greg, Thu Dec 1 10:14:56 1994 UTC

# Line 23 | Line 23 | proc getfile args {            # get filename interactively
23          set dograb 0
24          set curdir .
25          set curpat *
26 +        set curfile {}
27          set transient 1
28          # Get options
29          while {[llength $args]} {
# Line 160 | Line 161 | proc getfile args {            # get filename interactively
161  
162   proc update_dir w {                     # Update working directory
163          global curdir curpat
164 <        if {"$curpat" == ""} {
164 >        if {"$curpat" == {}} {
165                  set curpat *
166          }
167          if {"$curdir" == {}} {set curdir {~}}
# Line 194 | Line 195 | proc update_dir w {                    # Update working directory
195   }
196  
197  
198 < proc set_curfile {w {sp ""}} {          # change current file selection
198 > proc set_curfile {w {sp {}}} {          # change current file selection
199          global curdir curfile
200          set f [$w.fm.fl get [$w.fm.fl curselection]]
201          if [string match */ $f] {
# Line 202 | Line 203 | proc set_curfile {w {sp ""}} {         # change current file
203                  update_dir $w
204          } else {
205                  set curfile $f
206 <                if {"$sp" > ""} {
206 >                if {"$sp" != {}} {
207                          $sp $curdir/$curfile
208                  }
209          }
# Line 211 | Line 212 | proc set_curfile {w {sp ""}} {         # change current file
212  
213   proc chk_select w {                     # check if current selection is file
214          set s [$w.fm.fl curselection]
215 <        if {"$s" > "" && [file isfile [$w.fm.fl get $s]]} {
215 >        if {"$s" != {} && [file isfile [$w.fm.fl get $s]]} {
216                  $w.vi configure -state normal
217          } else {
218                  $w.vi configure -state disabled

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines