X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42389ac7c31d1bc536cc5e45cc587a4a9be7897f..aadb4d67c86fcb5af00804dc6dfb718d82078b2e:/utils/HelpGen/src/scriptbinder.cpp diff --git a/utils/HelpGen/src/scriptbinder.cpp b/utils/HelpGen/src/scriptbinder.cpp index 6a5ed52c57..6559328e8d 100644 --- a/utils/HelpGen/src/scriptbinder.cpp +++ b/utils/HelpGen/src/scriptbinder.cpp @@ -149,7 +149,7 @@ bool ScriptTemplate::HasVar( const char* name ) { for( size_t i = 0; i != mVars.size(); ++i ) - if ( strcmp( mVars[i]->mName, name ) == 0 ) + if ( strcmp( mVars[i]->m_Name, name ) == 0 ) return 1; @@ -192,12 +192,12 @@ inline void ScriptTemplate::PrintVar( TVarInfo* pInfo, { char buf[128]; - switch ( pInfo->mType ) + switch ( pInfo->m_Type ) { case TVAR_INTEGER : { sprintf(buf, "%d",*( (int*) ((char*)dataObj + pInfo->mOfs) ) ); - + stm.WriteBytes( buf, strlen(buf ) ); break; } @@ -213,8 +213,8 @@ inline void ScriptTemplate::PrintVar( TVarInfo* pInfo, cout << "DBG:: dataObj points to " << (int)dataObj << endl; cout << "DBG:: pInfo->mOfs value is " << (int)pInfo->mOfs << endl; cout << "DBG:: d+pInfo->mOfs is " << (int)((char*)dataObj + pInfo->mOfs) << endl; - cout << "DBG:: pInfo->mName is " << pInfo->mName << endl; - cout << "DBG:: pInfo->mType is " << pInfo->mType << endl; + cout << "DBG:: pInfo->m_Name is " << pInfo->m_Name << endl; + cout << "DBG:: pInfo->m_Type is " << pInfo->m_Type << endl; cout << "DBG:: end of dump. " << endl; cout << "DBG:: cs value is " << endl << cs << endl; @@ -246,7 +246,7 @@ inline void ScriptTemplate::PrintVar( TVarInfo* pInfo, } int* array = *((int**)( (char*)dataObj+info.mRefOfs )); - + ScriptTemplate* pRefTempl; for( int i = 0; i != sz; ++i ) @@ -297,7 +297,7 @@ void ScriptTemplate::PrintScript( void* dataObj, ScriptStream& stm ) for( size_t i = 0; i != sz; ++i ) { - if ( strcmp( mVars[i]->mName, start ) == 0 ) + if ( strcmp( mVars[i]->m_Name, start ) == 0 ) { PrintVar( mVars[i], dataObj, stm ); @@ -319,8 +319,8 @@ void ScriptTemplate::PrintScript( void* dataObj, ScriptStream& stm ) int ScriptSection::mIdCounter = 0; -ScriptSection::ScriptSection( const string& name, - const string& body, +ScriptSection::ScriptSection( const wxString& name, + const wxString& body, ScriptTemplate* pSectionTemplate, ScriptTemplate* pReferenceTemplate, bool autoHide, @@ -328,7 +328,7 @@ ScriptSection::ScriptSection( const string& name, ) : mpParent ( NULL ), - mName ( name ), + m_Name ( name ), mBody ( body ), mAutoHide( autoHide ), @@ -342,8 +342,8 @@ ScriptSection::ScriptSection( const string& name, { // generate GUID - char buf[32]; - sprintf( buf, "%d", ++mIdCounter ); + wxChar buf[32]; + wxSprintf( buf, _T("%d"), ++mIdCounter ); mId = buf; } @@ -411,7 +411,7 @@ ScriptSection* ScriptSection::GetSubsection( const char* name ) // DBG:: //ScriptSection& sect = *mSubsections[i]; - if ( mSubsections[i]->mName == buf ) + if ( mSubsections[i]->m_Name == buf ) { if ( name[cur] == '/' ) @@ -467,8 +467,8 @@ void ScriptSection::RegisterTemplate( ScriptTemplate& sectionTempalte ) arrRefOfs, arrSizeOfs, refTemplOfs; // obtaining offsets of member vars - - GET_VAR_OFS( ScriptSection, mName, &nameOfs ) + + GET_VAR_OFS( ScriptSection, m_Name, &nameOfs ) GET_VAR_OFS( ScriptSection, mBody, &bodyOfs ) GET_VAR_OFS( ScriptSection, mId, &idOfs ) GET_VAR_OFS( ScriptSection, mRefFirst, &arrRefOfs ) @@ -511,7 +511,7 @@ void ScriptSection::DoRemoveEmptySections(int& nRemoved, SectListT& removedLst) sect.DoRemoveEmptySections( nRemoved, removedLst ); if (sect.mAutoHide ) - + if ( sect.mReferences.size() == 0 ) { bool found = false; @@ -522,7 +522,7 @@ void ScriptSection::DoRemoveEmptySections(int& nRemoved, SectListT& removedLst) found = 1; break; } - + if ( !found ) { removedLst.push_back( § );