Revision: 50335 http://brlcad.svn.sourceforge.net/brlcad/?rev=50335&view=rev Author: n_reed Date: 2012-04-26 22:18:45 +0000 (Thu, 26 Apr 2012) Log Message: ----------- apply changes from SCL git f678f0b, but extract assignments used as truth values for benefit of windows
Modified Paths: -------------- brlcad/trunk/src/other/step/src/cleditor/STEPfile.cc brlcad/trunk/src/other/step/src/cleditor/instmgr.cc brlcad/trunk/src/other/step/src/clstepcore/ExpDict.cc brlcad/trunk/src/other/step/src/clstepcore/Registry.inline.cc brlcad/trunk/src/other/step/src/clstepcore/STEPaggregate.cc brlcad/trunk/src/other/step/src/clstepcore/sdaiApplication_instance.cc brlcad/trunk/src/other/step/src/express/expparse.y brlcad/trunk/src/other/step/src/fedex_plus/classes.c Modified: brlcad/trunk/src/other/step/src/cleditor/STEPfile.cc =================================================================== --- brlcad/trunk/src/other/step/src/cleditor/STEPfile.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/cleditor/STEPfile.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -365,7 +365,8 @@ //checking for _headerInstances::FILE_NAME idnum = HeaderId( "File_Name" ); - if( se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ) ) { + se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ); + if( se ) { from = im->GetApplication_instance( im->FindFileId( idnum ) ); // name: @@ -382,7 +383,8 @@ //checking for _headerInstances::FILE_DESCRIPTION idnum = HeaderId( "File_Description" ); - if( se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ) ) { + se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ); + if( se ) { from = im->GetApplication_instance( im->FindFileId( idnum ) ); //description @@ -394,7 +396,8 @@ //checking for _headerInstances::FILE_SCHEMA idnum = HeaderId( "File_Schema" ); - if( se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ) ) { + se = _headerInstances->GetApplication_instance( _headerInstances->FindFileId( idnum ) ); + if( se ) { from = im->GetApplication_instance( im->FindFileId( idnum ) ); //description Modified: brlcad/trunk/src/other/step/src/cleditor/instmgr.cc =================================================================== --- brlcad/trunk/src/other/step/src/cleditor/instmgr.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/cleditor/instmgr.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -10,8 +10,6 @@ * and is not subject to copyright. */ -/* $Id: instmgr.cc,v 3.0.1.5 1997/11/05 22:11:42 sauderd DP3.1 $ */ - ////////////////////////////////////////////////////////////////////////////// // // InstMgr member functions @@ -19,7 +17,6 @@ ////////////////////////////////////////////////////////////////////////////// #include <sdai.h> -//#include <STEPentity.h> #include <instmgr.h> /////////////////////////////////////////////////////////////////////////////// @@ -188,7 +185,7 @@ /////////////////////////////////////////////////////////////////////////////// -int InstMgr::GetIndex( SDAI_Application_instance *se ) { +int InstMgr::GetIndex( SDAI_Application_instance * se ) { int fileId = se->StepFileId(); return sortedMaster->MgrNodeIndex( fileId ); } @@ -212,7 +209,7 @@ // Append instance to the list of instances. Checks the file id and // sets it if 1) it is not set already or 2) it already exists in the list. -MgrNode * InstMgr::Append( SDAI_Application_instance *se, stateEnum listState ) { +MgrNode * InstMgr::Append( SDAI_Application_instance * se, stateEnum listState ) { if( debug_level > 3 ) { cout << "#" << se->StepFileId() << " append node to InstMgr" << endl; } @@ -223,14 +220,15 @@ se->StepFileId( NextFileId() ); // assign a file id } - if( mn = FindFileId( se->StepFileId() ) ) // if id already in list + mn = FindFileId( se->StepFileId() ); + if( mn ) { // if id already in list // and it's because instance is already in list if( GetApplication_instance( mn ) == se ) { return 0; // return 0 or mn? } else { se->StepFileId( NextFileId() ); // otherwise assign a new file id } - + } // update the maxFileId if needed if( se->StepFileId() > MaxFileId() ) { maxFileId = se->StepFileId(); @@ -272,7 +270,7 @@ /////////////////////////////////////////////////////////////////////////////// -void InstMgr::Delete( SDAI_Application_instance *se ) { +void InstMgr::Delete( SDAI_Application_instance * se ) { Delete( FindFileId( se->StepFileId() ) ); } @@ -339,7 +337,7 @@ /////////////////////////////////////////////////////////////////////////////// -SDAI_Application_instance * +SDAI_Application_instance * InstMgr::GetApplication_instance( int index ) { MgrNode * mn = ( MgrNode * )( *master )[index]; if( mn ) { @@ -349,7 +347,7 @@ } } -SDAI_Application_instance * +SDAI_Application_instance * InstMgr::GetSTEPentity( int index ) { MgrNode * mn = ( MgrNode * )( *master )[index]; if( mn ) { @@ -371,10 +369,10 @@ does not wrap around to search indices before the starting_index. **************************************************/ -SDAI_Application_instance * +SDAI_Application_instance * InstMgr::GetApplication_instance( const char * entityKeyword, int starting_index ) { MgrNode * node; - SDAI_Application_instance *se; + SDAI_Application_instance * se; int count = InstanceCount(); for( int j = starting_index; j < count; ++j ) { @@ -388,10 +386,10 @@ return ENTITY_NULL; } -SDAI_Application_instance * +SDAI_Application_instance * InstMgr::GetSTEPentity( const char * entityKeyword, int starting_index ) { MgrNode * node; - SDAI_Application_instance *se; + SDAI_Application_instance * se; int count = InstanceCount(); for( int j = starting_index; j < count; ++j ) { Modified: brlcad/trunk/src/other/step/src/clstepcore/ExpDict.cc =================================================================== --- brlcad/trunk/src/other/step/src/clstepcore/ExpDict.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/clstepcore/ExpDict.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -1083,13 +1083,14 @@ EntityDescItr edi( _supertypes ); int count = 1; - const EntityDescriptor * ed = 0; - while( ed = edi.NextEntityDesc() ) { + const EntityDescriptor * ed = edi.NextEntityDesc(); + while( ed ) { if( count > 1 ) { s.append( "&" ); } s.append( ed->Name() ); count++; + ed = edi.NextEntityDesc(); } if( count > 1 ) { s.append( "&" ); @@ -1853,16 +1854,17 @@ SelectTypeDescriptor::CanBe( const TypeDescriptor * other ) const { // const TypeDescriptor * found =0; TypeDescItr elements( GetElements() ) ; - const TypeDescriptor * td = 0; + const TypeDescriptor * td = elements.NextTypeDesc(); if( this == other ) { return other; } - while( td = elements.NextTypeDesc() ) { + while( td ) { // if (found = (td -> CanBe (other))) return found; if( td -> CanBe( other ) ) { return td; } + td = elements.NextTypeDesc(); } return 0; } @@ -1911,9 +1913,9 @@ const TypeDescriptor * SelectTypeDescriptor::CanBeSet( const char * other, const char * schNm ) const { TypeDescItr elements( GetElements() ) ; - const TypeDescriptor * td = 0; + const TypeDescriptor * td = elements.NextTypeDesc(); - while( td = elements.NextTypeDesc() ) { + while( td ) { if( td->Type() == REFERENCE_TYPE && td->NonRefType() == sdaiSELECT ) { // Just look at this level, don't look at my items (see intro). if( td->CurrName( other, schNm ) ) { @@ -1922,6 +1924,7 @@ } else if( td->CanBeSet( other, schNm ) ) { return td; } + td = elements.NextTypeDesc(); } return 0; } Modified: brlcad/trunk/src/other/step/src/clstepcore/Registry.inline.cc =================================================================== --- brlcad/trunk/src/other/step/src/clstepcore/Registry.inline.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/clstepcore/Registry.inline.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -9,8 +9,6 @@ * and is not subject to copyright. */ -/* $Id: Registry.inline.cc,v 3.0.1.9 1997/11/05 21:59:19 sauderd DP3.1 $ */ - #include <ExpDict.h> #include <Registry.h> @@ -71,7 +69,6 @@ HASHlistinit( active_schemas, &cur_schema ); } -/* inline */ Registry::~Registry() { HASHdestroy( primordialSwamp ); HASHdestroy( active_schemas ); @@ -79,8 +76,7 @@ delete col; } -void -Registry::DeleteContents() { +void Registry::DeleteContents() { // entities first HASHlistinit( primordialSwamp, &cur_entity ); while( HASHlist( &cur_entity ) ) { @@ -94,11 +90,9 @@ } // types - } -/* inline */ const EntityDescriptor * -Registry::FindEntity( const char * e, const char * schNm, int check_case ) const +const EntityDescriptor * Registry::FindEntity( const char * e, const char * schNm, int check_case ) const /* * schNm refers to the current schema. This will have a value if we are * reading from a Part 21 file (using a STEPfile object), and the file @@ -148,8 +142,7 @@ return entd; } -/* inline */ const Schema * -Registry::FindSchema( const char * n, int check_case ) const { +const Schema * Registry::FindSchema( const char * n, int check_case ) const { if( check_case ) { return ( const Schema * ) HASHfind( active_schemas, ( char * ) n ); } @@ -158,8 +151,7 @@ ( char * )PrettyTmpName( n ) ); } -/* inline */ const TypeDescriptor * -Registry::FindType( const char * n, int check_case ) const { +const TypeDescriptor * Registry::FindType( const char * n, int check_case ) const { if( check_case ) { return ( const TypeDescriptor * ) HASHfind( active_types, ( char * ) n ); } @@ -167,21 +159,18 @@ ( char * )PrettyTmpName( n ) ); } -/* inline */ void -Registry::ResetTypes() { +void Registry::ResetTypes() { HASHlistinit( active_types, &cur_type ); } -/* inline */ const TypeDescriptor * -Registry::NextType() { +const TypeDescriptor * Registry::NextType() { if( 0 == HASHlist( &cur_type ) ) { return 0; } return ( const TypeDescriptor * ) cur_type.e->data; } -/* inline */ void -Registry::AddEntity( const EntityDescriptor & e ) { +void Registry::AddEntity( const EntityDescriptor & e ) { HASHinsert( primordialSwamp, ( char * ) e.Name(), ( EntityDescriptor * ) &e ); ++entity_cnt; ++all_ents_cnt; @@ -189,18 +178,15 @@ } -/* inline */ void -Registry::AddSchema( const Schema & d ) { +void Registry::AddSchema( const Schema & d ) { HASHinsert( active_schemas, ( char * ) d.Name(), ( Schema * ) &d ); } -/* inline */ void -Registry::AddType( const TypeDescriptor & d ) { +void Registry::AddType( const TypeDescriptor & d ) { HASHinsert( active_types, ( char * ) d.Name(), ( TypeDescriptor * ) &d ); } -/* inline */ void -Registry::AddClones( const EntityDescriptor & e ) +void Registry::AddClones( const EntityDescriptor & e ) /* * Purpose is to insert e into the registry hashed according to all its * alternate names (the names it was renamed with when other schemas USEd @@ -232,8 +218,7 @@ const SchRename * alt = altlist; while( alt ) { - if( !( alt->next - && alt->next->choice( alt->objName() ) + if( !( ( alt->next && alt->next->choice( alt->objName() ) ) || !StrCmpIns( alt->objName(), entnm ) ) ) { // alt has a unique alternate name if it's not reused by a later // alt. alt->next->choice() returns 1 if one of the later alts @@ -250,8 +235,7 @@ return cnt; } -/* inline */ void -Registry::RemoveEntity( const char * n ) { +void Registry::RemoveEntity( const char * n ) { const EntityDescriptor * e = FindEntity( n ); struct Element tmp; @@ -263,22 +247,19 @@ } -/* inline */ void -Registry::RemoveSchema( const char * n ) { +void Registry::RemoveSchema( const char * n ) { struct Element tmp; tmp.key = ( char * ) n; HASHsearch( active_schemas, &tmp, HASH_DELETE ); } -/* inline */ void -Registry::RemoveType( const char * n ) { +void Registry::RemoveType( const char * n ) { struct Element tmp; tmp.key = ( char * ) n; HASHsearch( active_types, &tmp, HASH_DELETE ); } -/* inline */ void -Registry::RemoveClones( const EntityDescriptor & e ) +void Registry::RemoveClones( const EntityDescriptor & e ) /* * Remove all the "clones", or rename values of e. */ @@ -317,32 +298,27 @@ } -/* inline */ int -Registry::GetEntityCnt() { +int Registry::GetEntityCnt() { return entity_cnt; } -/* inline */ void -Registry::ResetEntities() { +void Registry::ResetEntities() { HASHlistinit( primordialSwamp, &cur_entity ); } -/* inline */ const EntityDescriptor * -Registry::NextEntity() { +const EntityDescriptor * Registry::NextEntity() { if( 0 == HASHlist( &cur_entity ) ) { return 0; } return ( const EntityDescriptor * ) cur_entity.e->data; } -/* inline */ void -Registry::ResetSchemas() { +void Registry::ResetSchemas() { HASHlistinit( active_schemas, &cur_schema ); } -/* inline */ const Schema * -Registry::NextSchema() { +const Schema * Registry::NextSchema() { if( 0 == HASHlist( &cur_schema ) ) { return 0; } Modified: brlcad/trunk/src/other/step/src/clstepcore/STEPaggregate.cc =================================================================== --- brlcad/trunk/src/other/step/src/clstepcore/STEPaggregate.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/clstepcore/STEPaggregate.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -218,7 +218,8 @@ std::string tmp; while( n ) { s.append( n->STEPwrite( tmp ) ); - if( n = ( STEPnode * ) n -> NextNode() ) { + n = ( STEPnode * ) n -> NextNode(); + if( n ) { s.append( "," ); } } @@ -234,7 +235,8 @@ std::string s; while( n ) { out << n->STEPwrite( s, currSch ); - if( n = ( STEPnode * )( n -> NextNode() ) ) { + n = ( STEPnode * ) n -> NextNode(); + if( n ) { out << ','; } } Modified: brlcad/trunk/src/other/step/src/clstepcore/sdaiApplication_instance.cc =================================================================== --- brlcad/trunk/src/other/step/src/clstepcore/sdaiApplication_instance.cc 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/clstepcore/sdaiApplication_instance.cc 2012-04-26 22:18:45 UTC (rev 50335) @@ -16,7 +16,7 @@ #include <STEPcomplex.h> #include <STEPattribute.h> -SDAI_Application_instance NilSTEPentity; +SDAI_Application_instance NilSTEPentity; /****************************************************************** ** Functions for manipulating entities @@ -29,21 +29,22 @@ ** -- error reporting does not include line number information **/ -SDAI_Application_instance ::SDAI_Application_instance () +SDAI_Application_instance::SDAI_Application_instance() : _cur( 0 ), STEPfile_id( 0 ), p21Comment( 0 ), headMiEntity( 0 ), nextMiEntity( 0 ), _complex( 0 ) { } -SDAI_Application_instance ::SDAI_Application_instance ( int fileid, int complex ) +SDAI_Application_instance::SDAI_Application_instance( int fileid, int complex ) : _cur( 0 ), STEPfile_id( fileid ), p21Comment( 0 ), headMiEntity( 0 ), nextMiEntity( 0 ), _complex( complex ) { } -SDAI_Application_instance ::~SDAI_Application_instance () { - STEPattribute * next = 0; +SDAI_Application_instance::~SDAI_Application_instance() { ResetAttributes(); - while( next = NextAttribute() ) { + STEPattribute * next = NextAttribute(); + while( next ) { delete next; + next = NextAttribute(); } if( MultipleInheritance() ) { @@ -67,14 +68,13 @@ */ } -SDAI_Application_instance * -SDAI_Application_instance ::Replicate() { +SDAI_Application_instance * SDAI_Application_instance::Replicate() { char errStr[BUFSIZ]; if( IsComplex() ) { cerr << "STEPcomplex::Replicate() should be called: " << __FILE__ << __LINE__ << "\n" << _POC_ "\n"; sprintf( errStr, - "SDAI_Application_instance)::Replicate(: %s - entity #%d.\n", + "SDAI_Application_instance::Replicate(): %s - entity #%d.\n", "Programming ERROR - STEPcomplex::Replicate() should be called", STEPfile_id ); _error.AppendToDetailMsg( errStr ); @@ -82,13 +82,13 @@ _error.GreaterSeverity( SEVERITY_BUG ); return S_ENTITY_NULL; } else { - SDAI_Application_instance *seNew = eDesc->NewSTEPentity(); + SDAI_Application_instance * seNew = eDesc->NewSTEPentity(); seNew -> CopyAs( this ); return seNew; } } -void SDAI_Application_instance ::AddP21Comment( const char * s, int replace ) { +void SDAI_Application_instance::AddP21Comment( const char * s, int replace ) { if( replace ) { delete p21Comment; p21Comment = 0; @@ -103,8 +103,7 @@ } } -void -SDAI_Application_instance ::AddP21Comment( std::string & s, int replace ) { +void SDAI_Application_instance::AddP21Comment( std::string & s, int replace ) { if( replace ) { delete p21Comment; p21Comment = 0; @@ -119,26 +118,23 @@ } } -void -SDAI_Application_instance ::STEPwrite_reference( ostream & out ) { +void SDAI_Application_instance::STEPwrite_reference( ostream & out ) { out << "#" << STEPfile_id; } -const char * -SDAI_Application_instance ::STEPwrite_reference( std::string & buf ) { +const char * SDAI_Application_instance::STEPwrite_reference( std::string & buf ) { char tmp[64]; sprintf( tmp, "#%d", STEPfile_id ); buf = tmp; return const_cast<char *>( buf.c_str() ); } -void -SDAI_Application_instance ::AppendMultInstance( SDAI_Application_instance *se ) { +void SDAI_Application_instance::AppendMultInstance( SDAI_Application_instance * se ) { if( nextMiEntity == 0 ) { nextMiEntity = se; } else { - SDAI_Application_instance *link = nextMiEntity; - SDAI_Application_instance *linkTrailing = 0; + SDAI_Application_instance * link = nextMiEntity; + SDAI_Application_instance * linkTrailing = 0; while( link ) { linkTrailing = link; link = link->nextMiEntity; @@ -149,8 +145,7 @@ // BUG implement this -SDAI_Application_instance * -SDAI_Application_instance ::GetMiEntity( char * EntityName ) { +SDAI_Application_instance * SDAI_Application_instance::GetMiEntity( char * EntityName ) { std::string s1, s2; const EntityDescLinkNode * edln = 0; @@ -177,8 +172,7 @@ -STEPattribute * -SDAI_Application_instance ::GetSTEPattribute( const char * nm ) { +STEPattribute * SDAI_Application_instance::GetSTEPattribute( const char * nm ) { if( !nm ) { return 0; } @@ -192,8 +186,7 @@ return a; } -STEPattribute * -SDAI_Application_instance ::MakeRedefined( STEPattribute * redefiningAttr, const char * nm ) { +STEPattribute * SDAI_Application_instance::MakeRedefined( STEPattribute * redefiningAttr, const char * nm ) { // find the attribute being redefined STEPattribute * a = GetSTEPattribute( nm ); @@ -204,8 +197,7 @@ return a; } -STEPattribute * -SDAI_Application_instance ::MakeDerived( const char * nm ) { +STEPattribute * SDAI_Application_instance::MakeDerived( const char * nm ) { STEPattribute * a = GetSTEPattribute( nm ); if( a ) { a ->Derive(); @@ -213,8 +205,7 @@ return a; } -void -SDAI_Application_instance ::CopyAs( SDAI_Application_instance * other ) { +void SDAI_Application_instance::CopyAs( SDAI_Application_instance * other ) { int numAttrs = AttributeCount(); ResetAttributes(); other -> ResetAttributes(); @@ -229,8 +220,7 @@ } -const char * -SDAI_Application_instance ::EntityName( const char * schnm ) const { +const char * SDAI_Application_instance::EntityName( const char * schnm ) const { return eDesc->Name( schnm ); } @@ -238,7 +228,7 @@ Checks if a given SDAI_Application_instance is the same type as this one ****************************************************************/ -const EntityDescriptor * SDAI_Application_instance ::IsA( const EntityDescriptor * ed ) const { +const EntityDescriptor * SDAI_Application_instance::IsA( const EntityDescriptor * ed ) const { return ( eDesc->IsA( ed ) ); } @@ -246,7 +236,7 @@ // Checks the validity of the current attribute values for the entity ******************************************************************/ -Severity SDAI_Application_instance ::ValidLevel( ErrorDescriptor * error, InstMgr * im, +Severity SDAI_Application_instance::ValidLevel( ErrorDescriptor * error, InstMgr * im, int clearError ) { ErrorDescriptor err; if( clearError ) { @@ -265,7 +255,7 @@ /****************************************************************** // clears all attr's errors ******************************************************************/ -void SDAI_Application_instance ::ClearAttrError() { +void SDAI_Application_instance::ClearAttrError() { int n = attributes.list_length(); for( int i = 0 ; i < n; i++ ) { attributes[i].Error().ClearErrorMsg(); @@ -276,7 +266,7 @@ // clears entity's error and optionally all attr's errors ******************************************************************/ -void SDAI_Application_instance ::ClearError( int clearAttrs ) { +void SDAI_Application_instance::ClearError( int clearAttrs ) { _error.ClearErrorMsg(); if( clearAttrs ) { ClearAttrError(); @@ -308,7 +298,7 @@ ** Status: stub ******************************************************************/ -void SDAI_Application_instance ::beginSTEPwrite( ostream & out ) { +void SDAI_Application_instance::beginSTEPwrite( ostream & out ) { out << "begin STEPwrite ... \n" ; out.flush(); @@ -331,8 +321,7 @@ ** ******************************************************************/ -void -SDAI_Application_instance ::STEPwrite( ostream & out, const char * currSch, +void SDAI_Application_instance::STEPwrite( ostream & out, const char * currSch, int writeComments ) { std::string tmp; if( writeComments && p21Comment && !p21Comment->empty() ) { @@ -353,13 +342,12 @@ out << ");\n"; } -void SDAI_Application_instance ::endSTEPwrite( ostream & out ) { +void SDAI_Application_instance::endSTEPwrite( ostream & out ) { out << "end STEPwrite ... \n" ; out.flush(); } -void -SDAI_Application_instance ::WriteValuePairs( ostream & out, +void SDAI_Application_instance::WriteValuePairs( ostream & out, const char * currSch, int writeComments, int mixedCase ) { /* @@ -442,8 +430,7 @@ ** ******************************************************************/ -const char * -SDAI_Application_instance ::STEPwrite( std::string & buf, const char * currSch ) { +const char * SDAI_Application_instance::STEPwrite( std::string & buf, const char * currSch ) { buf.clear(); char instanceInfo[BUFSIZ]; @@ -468,8 +455,7 @@ return const_cast<char *>( buf.c_str() ); } -void -SDAI_Application_instance ::PrependEntityErrMsg() { +void SDAI_Application_instance::PrependEntityErrMsg() { char errStr[BUFSIZ]; errStr[0] = '\0'; @@ -491,8 +477,7 @@ ** instance. i.e. a close quote followed by a semicolon optionally having ** whitespace between them. ******************************************************************/ -void -SDAI_Application_instance ::STEPread_error( char c, int i, istream & in ) { +void SDAI_Application_instance::STEPread_error( char c, int i, istream & in ) { char errStr[BUFSIZ]; errStr[0] = '\0'; @@ -554,8 +539,7 @@ ** Status: ******************************************************************/ -Severity -SDAI_Application_instance ::STEPread( int id, int idIncr, +Severity SDAI_Application_instance::STEPread( int id, int idIncr, InstMgr * instance_set, istream & in, const char * currSch, int useTechCor ) { STEPfile_id = id; @@ -744,8 +728,7 @@ // read an entity reference and return a pointer to the SDAI_Application_instance /////////////////////////////////////////////////////////////////////////////// -SDAI_Application_instance * -ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList, +SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList, InstMgr * instances, int addFileId ) { char c; char errStr[BUFSIZ]; @@ -833,8 +816,7 @@ // same as above but reads from a const char * /////////////////////////////////////////////////////////////////////////////// -SDAI_Application_instance * -ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList, +SDAI_Application_instance * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList, InstMgr * instances, int addFileId ) { istringstream in( ( char * )s ); return ReadEntityRef( in, err, tokenList, instances, addFileId ); @@ -844,8 +826,7 @@ // return SEVERITY_NULL if se's entity type matches the supplied entity type /////////////////////////////////////////////////////////////////////////////// -Severity -EntityValidLevel( SDAI_Application_instance *se, +Severity EntityValidLevel( SDAI_Application_instance * se, const TypeDescriptor * ed, // entity type that entity se needs // to match. (this must be an // EntityDescriptor) @@ -1003,7 +984,7 @@ } mn = im->FindFileId( fileId ); if( mn ) { - SDAI_Application_instance *se = mn->GetSTEPentity(); + SDAI_Application_instance * se = mn->GetSTEPentity(); return EntityValidLevel( se, ed, err ); } else { sprintf( messageBuf, @@ -1038,8 +1019,7 @@ ** Status: untested 7/31/90 ******************************************************************/ -STEPattribute * -SDAI_Application_instance ::NextAttribute() { +STEPattribute * SDAI_Application_instance::NextAttribute() { int i = AttributeCount(); ++_cur; if( i < _cur ) { @@ -1049,14 +1029,12 @@ } -int -SDAI_Application_instance ::AttributeCount() { +int SDAI_Application_instance::AttributeCount() { return attributes.list_length(); } #ifdef OBSOLETE -Severity -SDAI_Application_instance ::ReadAttrs( int id, int addFileId, +Severity SDAI_Application_instance::ReadAttrs( int id, int addFileId, class InstMgr * instance_set, istream & in ) { char c = '\0'; char errStr[BUFSIZ]; Modified: brlcad/trunk/src/other/step/src/express/expparse.y =================================================================== --- brlcad/trunk/src/other/step/src/express/expparse.y 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/express/expparse.y 2012-04-26 22:18:45 UTC (rev 50335) @@ -1315,7 +1315,8 @@ SCOPEadd_super(A); - if (g->tag = TYPEcreate_user_defined_tag(A, CURRENT_SCOPE, B.symbol)) { + g->tag = TYPEcreate_user_defined_tag(A, CURRENT_SCOPE, B.symbol); + if (g->tag) { SCOPEadd_super(g->tag); } } Modified: brlcad/trunk/src/other/step/src/fedex_plus/classes.c =================================================================== --- brlcad/trunk/src/other/step/src/fedex_plus/classes.c 2012-04-26 21:41:01 UTC (rev 50334) +++ brlcad/trunk/src/other/step/src/fedex_plus/classes.c 2012-04-26 22:18:45 UTC (rev 50335) @@ -505,7 +505,8 @@ /* case TYPE_ENTITY: */ /* case TYPE_SELECT: */ - if( n = TYPEget_name( t ) ) { + n = TYPEget_name( t ); + if( n ) { PrettyTmpName( n ); } @@ -1127,8 +1128,8 @@ } if( isAggregate( a ) ) { /* if it's a named type, comment the type */ - if( etype = TYPEget_name - ( TYPEget_nonaggregate_base_type( VARget_type( a ) ) ) ) { + etype = TYPEget_name ( TYPEget_nonaggregate_base_type( VARget_type( a ) ) ); + if( etype ) { fprintf( file, "\t // of %s\n", etype ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits