[Plib-cvs] plib/src/ssg ssgLoadX.cxx,1.22,1.23
Brought to you by:
sjbaker
From: Wolfram K. <wol...@us...> - 2004-12-02 21:26:49
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7265/ssg Modified Files: ssgLoadX.cxx Log Message: Implementing global materiallist. Making tokens case-insensitive. Index: ssgLoadX.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadX.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ssgLoadX.cxx 4 Oct 2004 08:10:00 -0000 1.22 +++ ssgLoadX.cxx 2 Dec 2004 21:26:39 -0000 1.23 @@ -139,9 +139,9 @@ } assert(token!=NULL); - if ( strcmp(token,"{") == 0 ) + if ( ulStrEqual (token,"{") ) Level++; - else if ( strcmp(token,"}") == 0 ) + else if ( ulStrEqual (token,"}") ) { assert(Level>0); // Fixme, NIV14: Handle this gracefully. if (Level==1) return; // found THE closing brace of entitiy [...111 lines suppressed...] - if (strcmp(token,"0032") && strcmp(token,"0064")) + if (!ulStrEqual(token,"0032") && !ulStrEqual (token,"0064")) { parser.error("not X format, invalid Header"); return FALSE ; @@ -692,6 +723,7 @@ current_options = ssgGetCurrentOptions () ; currentState = NULL; + globalMaterialList = NULL; top_branch = new ssgBranch ; curr_branch_ = top_branch; if ( !parser.openFile( fname, &parser_spec )) @@ -707,5 +739,6 @@ // parse_free(); parser.closeFile(); + delete globalMaterialList; return top_branch ; } |