- Timestamp:
- Feb 13, 2011, 4:10:19 PM (14 years ago)
- Location:
- branches/egtra/ab5.0/abdev
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/error.cpp
r562 r809 4 4 5 5 #define STRING_SYSTEM_DECLAREHANDLE "*_System_DeclareHandle_" 6 void DifferentTypeError( const Type &varType, const Type &calcFormalType, const int iWarning,const char *pszFuncName,const int ParmNum){ 6 void DifferentTypeError(const Type &varType, const Type &calcFormalType, const int iWarning, const char *pszFuncName, const int ParmNum) 7 { 7 8 ////////////////////////// 8 9 // キャストに関する警告 9 10 ////////////////////////// 10 char temporary[255];11 Type calcType( calcFormalType);12 13 if (IS_LITERAL(calcType.GetIndex()))11 std::ostringstream s; 12 Type calcType(calcFormalType); 13 14 if (IS_LITERAL(calcType.GetIndex())) 14 15 { 15 16 calcType.SetIndex( -1 ); 16 17 } 17 18 18 if(pszFuncName) 19 sprintf(temporary,"\"%s\"の第%dパラメータが、",pszFuncName,ParmNum+1); 20 else temporary[0]=0; 21 22 std::string varTypeName = compiler.TypeToString( varType ); 23 if(memcmp( varTypeName.c_str(),STRING_SYSTEM_DECLAREHANDLE,lstrlen(STRING_SYSTEM_DECLAREHANDLE))==0) 24 { 25 varTypeName = varTypeName.substr( lstrlen(STRING_SYSTEM_DECLAREHANDLE) ); 26 } 27 28 std::string calcTypeName = compiler.TypeToString( calcType ); 29 if(memcmp( calcTypeName.c_str(),STRING_SYSTEM_DECLAREHANDLE,lstrlen(STRING_SYSTEM_DECLAREHANDLE))==0) 30 { 31 calcTypeName = calcTypeName.substr( lstrlen(STRING_SYSTEM_DECLAREHANDLE) ); 32 } 33 sprintf(temporary+lstrlen(temporary),"%sから%s",calcTypeName.c_str(),varTypeName.c_str()); 19 if (pszFuncName) 20 { 21 s << boost::format("\"%s\"の第%dパラメータが、") % pszFuncName % (ParmNum + 1); 22 } 23 24 std::string varTypeName = compiler.TypeToString(varType); 25 if (memcmp(varTypeName.c_str(), STRING_SYSTEM_DECLAREHANDLE, lstrlen(STRING_SYSTEM_DECLAREHANDLE)) == 0) 26 { 27 varTypeName = varTypeName.substr(strlen(STRING_SYSTEM_DECLAREHANDLE)); 28 } 29 30 std::string calcTypeName = compiler.TypeToString(calcType); 31 if (memcmp(calcTypeName.c_str(), STRING_SYSTEM_DECLAREHANDLE, strlen(STRING_SYSTEM_DECLAREHANDLE)) == 0) 32 { 33 calcTypeName = calcTypeName.substr(strlen(STRING_SYSTEM_DECLAREHANDLE)); 34 } 35 s << boost::format("%sから%s") % calcTypeName % varTypeName; 34 36 35 37 extern int cp; 36 if(iWarning==1) compiler.errorMessenger.Output(-101,temporary,cp); 37 else if(iWarning==2) compiler.errorMessenger.Output(-102,temporary,cp); 38 else if(iWarning==3) compiler.errorMessenger.Output(50,temporary,cp); 38 int errorCode; 39 switch (iWarning) 40 { 41 case 1: errorCode = -101; break; 42 case 2: errorCode = -102; break; 43 case 3: errorCode = 50; break; 44 } 45 compiler.errorMessenger.Output(errorCode, s.str().c_str(), cp); 39 46 } 40 47 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r750 r809 353 353 const std::string Compiler::TypeToString( const Type &type ) 354 354 { 355 if( PTR_LEVEL( type.GetBasicType() ) ){355 if(type.GetBasicType() != DEF_NON && PTR_LEVEL( type.GetBasicType() ) ){ 356 356 //ポインタレベルが1以上の場合 357 357 Type tempType( type ); -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/stdafx.h
r806 r809 28 28 //boost libraries 29 29 #include <boost/foreach.hpp> 30 #include <boost/format.hpp> 31 #include <boost/optional.hpp> 30 32 #include <boost/serialization/serialization.hpp> 31 33 #include <boost/serialization/nvp.hpp> -
branches/egtra/ab5.0/abdev/ab_common/src/ResourceManager/ResourceManager.cpp
r769 r809 39 39 40 40 std::string baseDir = Jenga::Common::Path::ExtractDirPath( resourceFilePath ); 41 42 if (buffer.empty()) 43 { 44 return false; 45 } 41 46 42 47 i2=0;
Note:
See TracChangeset
for help on using the changeset viewer.