Changeset 561


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

# on 2002/02/11 17:33:41, toby did:
Change quote processing of CIF's -- strip quotes as items are read (keep semicolons)
fix bug in spacegroup validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/import_cif.tcl

    • Property rcs:date changed from 2002/01/22 22:28:53 to 2002/02/11 17:33:41
    • Property rcs:lines changed from +38 -10 to +4 -5
    • Property rcs:rev changed from 1.7 to 1.8
    r538 r561  
    7777    catch {
    7878        set spg [set block${i}(_symmetry_space_group_name_h-m)]
    79         regsub -all {'} $spg {} spg
    8079        set sgtmp [string toupper $spg]
    8180        # remove spaces from space group
     
    111110                }
    112111            }
    113             close $fp1
    114         }
     112        }
     113        close $fp1
    115114        if {$spg == ""} {
    116115            set msg "Warning: a Space Group must be specified"
     
    353352            set hidden [regsub -all {\\"} $trimline \201 trimline]
    354353            # parse out the quoted string, save the remainder
    355             if {![regexp {("[^"]*")(.*)} $trimline junk item line]} {
     354            if {![regexp {"([^"]*)"(.*)} $trimline junk item line]} {
    356355                # this is an error -- no end-quote was found
    357356                set item $line
     
    364363            set hidden [regsub -all {\\'} $trimline \200 trimline]
    365364            # parse out the quoted string, save the remainder
    366             if {![regexp {('[^']*')(.*)} $trimline junk item line]} {
     365            if {![regexp {'([^']*)'(.*)} $trimline junk item line]} {
    367366                # this is an error -- no end-quote was found
    368367                set item $line
Note: See TracChangeset for help on using the changeset viewer.