Changeset 64 in dev for BasicCompiler_Common/Intermediate_Step1.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Intermediate_Step1.cpp
r54 r64 2 2 3 3 void ChangeReturnCode(char *buffer){ 4 5 #ifdef _DEBUG 6 //改行コードの整合性チェック 7 for( int i=0; ; i++ ){ 8 if( buffer[i] == '\0' ){ 9 break; 10 } 11 if( buffer[i]!='\r' && buffer[i+1]=='\n' 12 || buffer[i]=='\r' && buffer[i+1]!='\n' ){ 13 char temporary[255]; 14 strncpy( temporary, buffer + i-100, 130 ); 15 temporary[130] = 0; 16 for(int i2=0; ;i2++){ 17 if(temporary[i2]=='\r') temporary[i2]='A'; 18 if(temporary[i2]=='\n') temporary[i2]='B'; 19 if(temporary[i2]=='\0') break; 20 } 21 MessageBox( hOwnerEditor, temporary, "改行コードの整合性チェック", MB_OK | MB_ICONEXCLAMATION ); 22 } 23 } 24 #endif 25 4 26 //改行コードのCRLFをLFに変換 5 int i,i2; 6 for(i=0,i2=0;;i++,i2++){ 27 for(int i=0,i2=0;;i++,i2++){ 7 28 if(buffer[i]=='\r'&&buffer[i+1]=='\n') i++; 8 29 buffer[i2]=buffer[i];
Note:
See TracChangeset
for help on using the changeset viewer.