Changeset 279 in dev for trunk/abdev/BasicCompiler_Common/StrOperation.cpp
- Timestamp:
- Aug 14, 2007, 3:22:02 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/StrOperation.cpp
r266 r279 190 190 } 191 191 } 192 BOOL GetLineNum(int pos,int *pLine,char *FileName){193 extern INCLUDEFILEINFO IncludeFileInfo;194 extern char *basbuf;195 int i,i2,i3,i4,i5;196 197 i=pos;198 if(basbuf[i]=='\n') i--;199 for(i3=0,i2=0;i3<i;i3++){200 if(basbuf[i3]=='\n') i2++;201 if(basbuf[i3]=='\0') return 0;202 }203 i4=0;204 while(IncludeFileInfo.LineOfFile[i2]!=IncludeFileInfo.LineOfFile[i4]) i4++;205 for(i3=0,i5=0;i5<i4;i3++){206 if(basbuf[i3]=='\n') i5++;207 if(basbuf[i3]=='\0') return 0;208 }209 for(i5=0;i4<i2;i3++){210 if(basbuf[i3]=='\n'){211 i4++;212 i5++;213 if(IncludeFileInfo.LineOfFile[i2]<IncludeFileInfo.LineOfFile[i4]){214 for(;IncludeFileInfo.LineOfFile[i2]!=IncludeFileInfo.LineOfFile[i4];i3++){215 if(basbuf[i3]=='\n') i4++;216 }217 }218 }219 if(basbuf[i3]=='\0') return 0;220 }221 222 if(IncludeFileInfo.LineOfFile[i2]==-1){223 //ファイル・行番号を特定できなかった場合224 *pLine=-1;225 FileName[0]=0;226 }227 else{228 //行番号をセット229 *pLine=i5;230 231 //ファイル名をセット232 lstrcpy(FileName,IncludeFileInfo.ppFileNames[IncludeFileInfo.LineOfFile[i2]]);233 }234 235 return 1;236 }237 192 238 193 char GetEndXXXCommand(char es){ … … 449 404 } 450 405 451 BOOL IsFile(char *path){406 bool IsFileExist(const char *path){ 452 407 WIN32_FIND_DATA wfd; 453 408 HANDLE hFind; … … 455 410 hFind=FindFirstFile(path,&wfd); 456 411 if(hFind==INVALID_HANDLE_VALUE){ 457 return 0;412 return false; 458 413 } 459 414 FindClose(hFind); 460 415 461 return 1;416 return true; 462 417 } 463 418 BOOL GetFolder(HWND hWnd,char *folder,char *OpenFolderTitle){
Note:
See TracChangeset
for help on using the changeset viewer.