Changeset 59 for 1dwg


Ignore:
Timestamp:
Sep 2, 2008 11:09:17 AM (12 years ago)
Author:
prjemian
Message:

test for XMLutils XOP presence at outermost level and provide alternate CS_XmlReader() or code will not compile when XMLutils routines are identified in the code but not found at compile time (before run time)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 1dwg/trunk/IgorPro/cansasXML.ipf

    r58 r59  
    2626 
    2727 
     28        // BEFORE we do anything else, check that XMLutils XOP is available. 
     29        #if( Exists("XmlOpenFile") == 0 ) 
     30 
     31 
    2832FUNCTION CS_XmlReader(fileName) 
    2933        // 
     
    3539        //              -3: <SASroot> version  is not 1.0 
    3640        //              -4: no <SASentry> elements 
    37         //              -5: XOPutils needs upgrade 
     41        //              -5: XMLutils XOP needs upgrade 
     42        //              -6: XMLutils XOP not found 
    3843        // 
    3944        STRING fileName 
     
    4146        STRING workingFolder = "root:Packages:CS_XMLreader" 
    4247        VARIABLE returnCode 
    43  
    44         // BEFORE we do anything else, check that XMLutils XOP is available. 
    45         #if( Exists("XmlOpenFile") == 0 ) 
    46     Abort  "XML function provided by XMLutils XOP is not available, get the XOP from : http://www.igorexchange.com/project/XMLutils (see http://www.smallangles.net/wgwiki/index.php/cansas1d_binding_IgorPro for details)" 
    47         #endif 
    4848 
    4949 
     
    8080 
    8181        // 
    82         //      test to see if XOPutils has the needed upgrade 
     82        //      test to see if XMLutils has the needed upgrade 
    8383        // 
    8484        XMLlistXpath(fileID, "/*", "")   
    8585        IF ( EXISTS( "M_listXPath" ) == 0 ) 
    8686                XmlCloseFile(fileID,0) 
    87                 errorMsg = "XOPutils needs an upgrade:  http://www.igorexchange.com/project/XMLutils" 
     87                errorMsg = "XMLutils needs an upgrade:  http://www.igorexchange.com/project/XMLutils" 
    8888                PRINT errorMsg 
    8989                SetDataFolder $origFolder 
     
    808808        SetDataFolder root: 
    809809END 
     810 
     811        #else   // if( Exists("XmlOpenFile") == 0 ) 
     812        FUNCTION CS_XmlReader(fileName) 
     813            String fileName 
     814            Abort  "XML function provided by XMLutils XOP is not available, get the XOP from : http://www.igorexchange.com/project/XMLutils (see http://www.smallangles.net/wgwiki/index.php/cansas1d_binding_IgorPro for details)" 
     815            RETURN(-6) 
     816        END 
     817        #endif  // if( Exists("XmlOpenFile") == 0 ) 
Note: See TracChangeset for help on using the changeset viewer.