Changeset 14 in dev for BasicCompiler_Common/MakeExe.cpp
- Timestamp:
- Dec 10, 2006, 10:58:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/MakeExe.cpp
r4 r14 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 63 36 void OutputExe(void){ 64 37 extern HANDLE hHeap; 65 38 extern char *basbuf; 66 extern char *pBaseBuffer;67 39 extern int ErrorNum; 68 40 extern BOOL bStopCompile; … … 87 59 //プログラムをファイルから読み込む 88 60 extern char SourceFileName[MAX_PATH]; 89 pBaseBuffer=OpenBasicFile(SourceFileName); 90 if(!pBaseBuffer){ 91 SetError(201,SourceFileName,-1); 92 goto EndCompile; 93 } 94 basbuf=pBaseBuffer+2; 61 CSource::obj.OpenFile(SourceFileName); 62 63 //未完成 64 basbuf = CSource::obj.SourceCode; 95 65 96 66 //イメージベースの設定 … … 172 142 173 143 StepCompileProgress(); 144 145 146 //字句解析 147 CSource::obj.LexicalAnalysis(0); 174 148 175 149 … … 291 265 HeapDefaultFree(IncludeFileInfo.ppFileNames[i2]); 292 266 HeapDefaultFree(IncludeFileInfo.ppFileNames); 293 294 if(pBaseBuffer) HeapDefaultFree(pBaseBuffer);295 267 } 296 268 int MainThread(DWORD dummy){
Note:
See TracChangeset
for help on using the changeset viewer.