Changeset 15 in dev for BasicCompiler_Common/MakeExe.cpp
- Timestamp:
- Dec 11, 2006, 3:07:59 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/MakeExe.cpp
r14 r15 34 34 } 35 35 36 void AddSourceCode(char *buffer){ 37 char *temp; 38 temp=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)+8192); 39 lstrcpy(temp,buffer); 40 41 //エスケープシーケンス設定 42 SetEscapeSequenceFormat(temp); 43 44 //コマンド対応 45 ChangeCommandToCode(temp); 46 47 //新しいソースコードバッファの容量 48 extern char *basbuf; 49 int NewSize; 50 NewSize=lstrlen(basbuf)+lstrlen(temp); 51 NewSize*=2; 52 NewSize+=255; 53 54 //最後尾に貼り付け 55 extern char *pBaseBuffer; 56 pBaseBuffer=(char *)HeapReAlloc(hHeap,0,pBaseBuffer,NewSize); 57 basbuf=pBaseBuffer+2; 58 lstrcat(basbuf,temp); 59 60 HeapDefaultFree(temp); 61 } 62 36 63 void OutputExe(void){ 37 64 extern HANDLE hHeap; 38 65 extern char *basbuf; 66 extern char *pBaseBuffer; 39 67 extern int ErrorNum; 40 68 extern BOOL bStopCompile; … … 59 87 //プログラムをファイルから読み込む 60 88 extern char SourceFileName[MAX_PATH]; 61 CSource::obj.OpenFile(SourceFileName); 62 63 //未完成 64 basbuf = CSource::obj.SourceCode; 89 pBaseBuffer=OpenBasicFile(SourceFileName); 90 if(!pBaseBuffer){ 91 SetError(201,SourceFileName,-1); 92 goto EndCompile; 93 } 94 basbuf=pBaseBuffer+2; 65 95 66 96 //イメージベースの設定 … … 142 172 143 173 StepCompileProgress(); 144 145 146 //字句解析147 CSource::obj.LexicalAnalysis(0);148 174 149 175 … … 265 291 HeapDefaultFree(IncludeFileInfo.ppFileNames[i2]); 266 292 HeapDefaultFree(IncludeFileInfo.ppFileNames); 293 294 if(pBaseBuffer) HeapDefaultFree(pBaseBuffer); 267 295 } 268 296 int MainThread(DWORD dummy){
Note:
See TracChangeset
for help on using the changeset viewer.