Changeset 286 for trunk/import_cif.tcl
- Timestamp:
- Dec 4, 2009 5:03:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import_cif.tcl
- Property rcs:date changed from 2000/09/26 14:51:04 to 2000/09/26 17:57:10
- Property rcs:lines changed from +155 -48 to +27 -4
- Property rcs:rev changed from 1.2 to 1.3
r285 r286 120 120 lbl $lbllist uiso $uisolist occ $occlist type $typelist { 121 121 # should not be any quotes, but remove them, if there are 122 regsub -all {'} $lbl {} lbl 123 regsub -all {'} $type {} type 122 foreach var {lbl type} { 123 foreach char {' \"} { 124 set q {\\} 125 append q $char 126 set hidden [regsub -all $q [set $var] \200 $var] 127 if {[string index [set $var] 0] == $char} { 128 regsub -all $char [set $var] {} $var 129 } 130 if {$hidden} {regsub -all \200 [set $var] $char $var} 131 } 132 } 124 133 # CIF specifies types as Cu2+; GSAS uses Cu+2 125 134 if {[regexp {([A-Za-z]+)([1-9])([+-])} $type junk elem sign val]} { … … 256 265 # -- should not be needed for a valid CIF but if a name is used 257 266 # -- twice in the same block, want to wipe out the 1st data 258 set block${blocks}($dataname) {} 267 catch { 268 if {[set block${blocks}($dataname)] != ""} { 269 # this is an error -- repeated data name 270 append block${blocks}(errors) \ 271 "Data item $dataname is repeated near line $linenum\n" 272 } 273 set block${blocks}($dataname) {} 274 } 259 275 set dataname {} 260 276 } elseif {$loopflag > 0} { … … 349 365 append block${blocks}(errors) "The string \"$item\" on line $linenum was unexpected\n" 350 366 } else { 367 catch { 368 if {[set block${blocks}($dataname)] != ""} { 369 # this is an error -- repeated data name 370 append block${blocks}(errors) \ 371 "Data item $dataname is repeated near line $linenum\n" 372 } 373 } 351 374 set block${blocks}($dataname) $item 352 375 set dataname ""
Note: See TracChangeset
for help on using the changeset viewer.