Changeset 76 in dev for BasicCompiler_Common/preprocessor.cpp
- Timestamp:
- Mar 21, 2007, 9:26:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/preprocessor.cpp
r69 r76 171 171 172 172 if(buffer[i-1]=='\n'){ 173 if( _memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){173 if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){ 174 174 i=Search_endif(buffer,i+6, pLine); 175 175 if(buffer[i]=='\0') break; 176 176 continue; 177 177 } 178 else if( _memicmp(buffer+i,"#endif",6)==0){178 else if(memicmp(buffer+i,"#endif",6)==0){ 179 179 break; 180 180 } … … 222 222 223 223 if(i==0||buffer[i-1]=='\n'){ 224 if( _memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){224 if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){ 225 225 i=Search_endif(buffer,i+6); 226 226 if(buffer[i]=='\0') break; 227 227 continue; 228 228 } 229 else if( _memicmp(buffer+i,"#else",5)==0){229 else if(memicmp(buffer+i,"#else",5)==0){ 230 230 i2=5; 231 231 bElse=1; 232 232 break; 233 233 } 234 else if( _memicmp(buffer+i,"#endif",6)==0){234 else if(memicmp(buffer+i,"#endif",6)==0){ 235 235 i2=6; 236 236 bElse=0; … … 252 252 253 253 if(i2==0||buffer[i2-1]=='\n'){ 254 if( _memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){254 if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){ 255 255 i2=Search_endif(buffer,i2+6, &i3 ); 256 256 if(buffer[i2]=='\0') break; 257 257 continue; 258 258 } 259 if( _memicmp(buffer+i2,"#endif",6)==0){259 if(memicmp(buffer+i2,"#endif",6)==0){ 260 260 i2+=6; 261 261 break; … … 279 279 280 280 if(i2==0||buffer[i2-1]=='\n'){ 281 if( _memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){281 if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){ 282 282 i2=Search_endif(buffer,i2+6, &i3 ); 283 283 if(buffer[i2]=='\0') break; 284 284 continue; 285 285 } 286 else if( _memicmp(buffer+i2,"#else",5)==0){286 else if(memicmp(buffer+i2,"#else",5)==0){ 287 287 i2+=5; 288 288 bElse=1; 289 289 break; 290 290 } 291 else if( _memicmp(buffer+i2,"#endif",6)==0){291 else if(memicmp(buffer+i2,"#endif",6)==0){ 292 292 i2+=6; 293 293 bElse=0; … … 307 307 308 308 if(i==0||buffer[i-1]=='\n'){ 309 if( _memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){309 if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){ 310 310 i=Search_endif(buffer,i+6); 311 311 if(buffer[i]=='\0') break; 312 312 continue; 313 313 } 314 else if( _memicmp(buffer+i,"#endif",6)==0){314 else if(memicmp(buffer+i,"#endif",6)==0){ 315 315 i2=6; 316 316 bElse=0; … … 336 336 if(i==0||buffer[i-1]=='\n'){ 337 337 sw=0; 338 if( _memicmp(buffer+i,"#define",7)==0){338 if(memicmp(buffer+i,"#define",7)==0){ 339 339 i2=i+7; 340 340 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 355 355 SlideString(buffer+i+i2,-i2); 356 356 } 357 if( _memicmp(buffer+i,"#undef",6)==0){357 if(memicmp(buffer+i,"#undef",6)==0){ 358 358 i2=i+7; 359 359 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 374 374 SlideString(buffer+i+i2,-i2); 375 375 } 376 else if( _memicmp(buffer+i,"#ifdef",6)==0){376 else if(memicmp(buffer+i,"#ifdef",6)==0){ 377 377 preprocessor_ifdef(buffer+i,false); 378 378 continue; 379 379 } 380 else if( _memicmp(buffer+i,"#ifndef",7)==0){380 else if(memicmp(buffer+i,"#ifndef",7)==0){ 381 381 preprocessor_ifdef(buffer+i,true); 382 382 continue;
Note:
See TracChangeset
for help on using the changeset viewer.