Changeset 313 in dev
- Timestamp:
- Sep 2, 2007, 11:11:40 PM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/BreakPoint.cpp
r280 r313 48 48 int FileNum; 49 49 const IncludedFilesRelation *pIncludedFilesRelation = NULL; 50 const BasicSource *pNowSource = NULL; 50 51 BOOST_FOREACH( const BasicSource &source, compiler.GetObjectModule().GetSources() ) 51 52 { … … 54 55 for(FileNum=0;FileNum<pIncludedFilesRelation->GetFileCounts();FileNum++) 55 56 { 56 if(lstrcmpi(pIncludedFilesRelation->GetFilePathFromFileNumber(FileNum).c_str(),lpszFileName)==0) break; 57 if(lstrcmpi(pIncludedFilesRelation->GetFilePathFromFileNumber(FileNum).c_str(),lpszFileName)==0) 58 { 59 pNowSource = &source; 60 break; 61 } 57 62 } 58 63 if( FileNum == pIncludedFilesRelation->GetFileCounts() ) … … 100 105 101 106 loop: 102 int tempCp; 103 tempCp=GetCpFromLine(FileBaseLine+i2); 107 int tempCp = GetSourceCodeIndexFromLine( pNowSource->GetBuffer(), FileBaseLine+i2 ); 104 108 105 109 int i3; -
trunk/abdev/BasicCompiler_Common/Debug.cpp
r288 r313 57 57 int FileNum; 58 58 const IncludedFilesRelation *pIncludedFilesRelation = NULL; 59 const BasicSource *pNowSource = NULL; 59 60 BOOST_FOREACH( const BasicSource &source, compiler.GetObjectModule().GetSources() ) 60 61 { … … 63 64 for(FileNum=0;FileNum<pIncludedFilesRelation->GetFileCounts();FileNum++) 64 65 { 65 if(lstrcmpi(pIncludedFilesRelation->GetFilePathFromFileNumber(FileNum).c_str(),szFilePath)==0) break; 66 if(lstrcmpi(pIncludedFilesRelation->GetFilePathFromFileNumber(FileNum).c_str(),szFilePath)==0) 67 { 68 pNowSource = &source; 69 break; 70 } 66 71 } 67 72 if( FileNum == pIncludedFilesRelation->GetFileCounts() ) … … 110 115 111 116 loop: 112 int tempCp; 113 tempCp=GetCpFromLine(FileBaseLine+i2); 117 int tempCp = GetSourceCodeIndexFromLine( pNowSource->GetBuffer(), FileBaseLine+i2 ); 114 118 115 119 int i3; -
trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r280 r313 246 246 247 247 SingleStepCodeBuffer=MakeSingleStepCode(); 248 249 //ソースコード 250 extern char *basbuf; 251 basbuf = const_cast<char *>(compiler.GetObjectModule().GetSource(0).GetBuffer()); 248 252 249 253 -
trunk/abdev/BasicCompiler_Common/StrOperation.cpp
r279 r313 174 174 } 175 175 176 int GetCpFromLine(int LineNum){ 177 extern char *basbuf; 178 176 int GetSourceCodeIndexFromLine( const char *source, int LineNum ){ 179 177 int i,nCount=0; 180 178 for(i=0;;i++){ 181 if( basbuf[i]=='\n'){179 if(source[i]=='\n'){ 182 180 nCount++; 183 181 if(LineNum==nCount){ 184 182 for(i++;;i++){ 185 if(IsCommandDelimitation( basbuf[i])) break;183 if(IsCommandDelimitation(source[i])) break; 186 184 } 187 185 return i; -
trunk/abdev/BasicCompiler_Common/common.h
r308 r313 319 319 void SlideString(char *str,int slide); 320 320 void SlideBuffer(char *buffer,int length,int slide); 321 int Get CpFromLine(int LineNum);321 int GetSourceCodeIndexFromLine( const char *source, int LineNum ); 322 322 char GetEndXXXCommand(char es); 323 323 void GetDefaultNameFromES(char es,char *name);
Note:
See TracChangeset
for help on using the changeset viewer.