Changeset 820 in dev for branches/egtra/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Aug 7, 2011, 4:30:08 PM (13 years ago)
- Location:
- branches/egtra/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.cpp
r808 r820 325 325 //生成するファイルの相対パスを取得 326 326 char relationalPath[MAX_PATH]; 327 lstrcpy( relationalPath, program.GetOutputFilePath().c_str() );327 strcpy( relationalPath, program.GetOutputFilePath().c_str() ); 328 328 GetRelationalPath( relationalPath, BasicCurDir ); 329 329 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/Diagnose.cpp
r803 r820 78 78 // 静的メソッド 79 79 foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){ 80 80 codeSizeOfClass += pMethod->GetUserProc().GetCodeSize(); 81 81 } 82 82 … … 110 110 // 静的メソッド 111 111 foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){ 112 112 codeSizeOfClass += pMethod->GetUserProc().GetCodeSize(); 113 113 } 114 114 115 if( codeSizeOfClass ){ 116 temporary[0]=0; 117 lstrcat( temporary, "------------------------------------------------------------------\n" ); 118 sprintf( temporary + lstrlen(temporary), "【 %s クラスのコード情報】\n", objClass.GetName().c_str() ); 119 sprintf( temporary + lstrlen(temporary), "class code size: %d bytes\n", codeSizeOfClass ); 120 lstrcat( temporary, "------------------------------------------------------------------\n" ); 121 lstrcat( temporary, "\n" ); 115 if( codeSizeOfClass ) 116 { 117 sprintf(temporary, 118 "------------------------------------------------------------------\n" 119 "【 %s クラスのコード情報】\n" 120 "class code size: %d bytes\n" 121 "------------------------------------------------------------------\n" 122 "\n", 123 objClass.GetName().c_str(), codeSizeOfClass); 122 124 trace_for_size( temporary ); 123 125 } -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r750 r820 26 26 } 27 27 28 void AddSourceCode(const char *buffer){ 29 char *temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192); 30 lstrcpy(temp,buffer); 31 32 MakeMiddleCode( temp ); 28 void AddSourceCode(const char *buffer) 29 { 30 std::size_t size = std::strlen(buffer) + 8192; 31 std::unique_ptr<char[]> temp(new char[size]); 32 strcpy_s(temp.get(), size, buffer); 33 34 MakeMiddleCode(temp.get()); 33 35 34 36 //最後尾に貼り付け 35 compiler.GetObjectModule().GetSource().Addition( temp ); 36 37 HeapDefaultFree(temp); 37 compiler.GetObjectModule().GetSource().Addition(temp.get()); 38 38 } 39 39 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp
r736 r820 1 1 #include "stdafx.h" 2 2 3 void KillSpaces(char *str1,char *str2){3 void KillSpaces(char const *str1,char *str2){ 4 4 int i,i2,i3,IsStr; 5 5 for(i=0,i2=0,IsStr=0;;i++,i2++){ … … 30 30 } 31 31 } 32 void KillStringSpaces(char *str){ 33 char *s2; 34 35 extern HANDLE hHeap; 36 s2=(char *)HeapAlloc(hHeap,0,lstrlen(str)+1); 37 lstrcpy(s2,str); 38 KillSpaces(s2,str); 39 HeapDefaultFree(s2); 40 return; 32 void KillStringSpaces(char *str) 33 { 34 std::string s2(str); 35 KillSpaces(s2.c_str(), str); 41 36 } 42 37 BOOL RemoveStringQuotes(char *str){ … … 362 357 } 363 358 } 364 const std::string &FormatEscapeSequenceStringToDefaultString( const std::string &source )359 std::string FormatEscapeSequenceStringToDefaultString( const std::string &source ) 365 360 { 366 361 int maxLength = (int)source.size(); -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/common.h
r808 r820 35 35 #define MAX_PARMS 64 36 36 #define MAX_ARRAYDIM 16 37 #define MAX_HASH 3276138 37 39 38 … … 297 296 298 297 // StrOperation.cpp 299 void KillSpaces(c har *str1,char *str2);298 void KillSpaces(const char *str1,char *str2); 300 299 void KillStringSpaces(char *str); 301 300 BOOL RemoveStringQuotes(char *str); … … 310 309 char GetEndXXXCommand(char es); 311 310 void GetDefaultNameFromES(char es,char *name); 312 const std::string &FormatEscapeSequenceStringToDefaultString( const std::string &source );311 std::string FormatEscapeSequenceStringToDefaultString( const std::string &source ); 313 312 bool IsFileExist(const char *path); 314 313 BOOL ShortPathToLongPath(char ShortPath[MAX_PATH],char *LongPath); … … 364 363 void SplitGenericClassInstance( const char *fullName, char *className, Jenga::Common::Strings &typeParameters, bool isDefiningClass = false, Jenga::Common::Strings *pTypeParameterBaseClassNames = NULL ); 365 364 int JumpStatement(const char *source, int &pos); 365 366 //MakePeHdr.cpp 366 367 void MakeExe(); 367 368 -
branches/egtra/ab5.0/abdev/BasicCompiler_Common/stdafx.h
r809 r820 30 30 #include <boost/format.hpp> 31 31 #include <boost/optional.hpp> 32 #include <boost/numeric/conversion/cast.hpp> 33 #include <boost/range.hpp> 34 #include <boost/range/algorithm.hpp> 32 35 #include <boost/serialization/serialization.hpp> 33 36 #include <boost/serialization/nvp.hpp>
Note:
See TracChangeset
for help on using the changeset viewer.