Changeset 5 in dev for BasicCompiler_Common/preprocessor.cpp
- Timestamp:
- Dec 5, 2006, 1:42:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/preprocessor.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 94 94 95 95 if(buffer[i-1]=='\n'){ 96 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){96 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 97 97 i=Search_endif(buffer,i+6); 98 98 if(buffer[i]=='\0') break; 99 99 continue; 100 100 } 101 else if( memicmp(buffer+i,"#endif",6)==0){101 else if(_memicmp(buffer+i,"#endif",6)==0){ 102 102 break; 103 103 } … … 145 145 146 146 if(i==0||buffer[i-1]=='\n'){ 147 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){147 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 148 148 i=Search_endif(buffer,i+6); 149 149 if(buffer[i]=='\0') break; 150 150 continue; 151 151 } 152 else if( memicmp(buffer+i,"#else",5)==0){152 else if(_memicmp(buffer+i,"#else",5)==0){ 153 153 i2=5; 154 154 bElse=1; 155 155 break; 156 156 } 157 else if( memicmp(buffer+i,"#endif",6)==0){157 else if(_memicmp(buffer+i,"#endif",6)==0){ 158 158 i2=6; 159 159 bElse=0; … … 175 175 176 176 if(i2==0||buffer[i2-1]=='\n'){ 177 if( memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){177 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 178 178 i2=Search_endif(buffer,i2+6); 179 179 if(buffer[i2]=='\0') break; 180 180 continue; 181 181 } 182 if( memicmp(buffer+i2,"#endif",6)==0){182 if(_memicmp(buffer+i2,"#endif",6)==0){ 183 183 i2+=6; 184 184 break; … … 202 202 203 203 if(i2==0||buffer[i2-1]=='\n'){ 204 if( memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){204 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 205 205 i2=Search_endif(buffer,i2+6); 206 206 if(buffer[i2]=='\0') break; 207 207 continue; 208 208 } 209 else if( memicmp(buffer+i2,"#else",5)==0){209 else if(_memicmp(buffer+i2,"#else",5)==0){ 210 210 i2+=5; 211 211 bElse=1; 212 212 break; 213 213 } 214 else if( memicmp(buffer+i2,"#endif",6)==0){214 else if(_memicmp(buffer+i2,"#endif",6)==0){ 215 215 i2+=6; 216 216 bElse=0; … … 230 230 231 231 if(i==0||buffer[i-1]=='\n'){ 232 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){232 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 233 233 i=Search_endif(buffer,i+6); 234 234 if(buffer[i]=='\0') break; 235 235 continue; 236 236 } 237 else if( memicmp(buffer+i,"#endif",6)==0){237 else if(_memicmp(buffer+i,"#endif",6)==0){ 238 238 i2=6; 239 239 bElse=0; … … 259 259 if(i==0||buffer[i-1]=='\n'){ 260 260 sw=0; 261 if( memicmp(buffer+i,"#define",7)==0){261 if(_memicmp(buffer+i,"#define",7)==0){ 262 262 i2=i+7; 263 263 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 278 278 SlideString(buffer+i+i2,-i2); 279 279 } 280 if( memicmp(buffer+i,"#undef",6)==0){280 if(_memicmp(buffer+i,"#undef",6)==0){ 281 281 i2=i+7; 282 282 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 297 297 SlideString(buffer+i+i2,-i2); 298 298 } 299 else if( memicmp(buffer+i,"#ifdef",6)==0){299 else if(_memicmp(buffer+i,"#ifdef",6)==0){ 300 300 preprocessor_ifdef(buffer+i,0); 301 301 continue; 302 302 } 303 else if( memicmp(buffer+i,"#ifndef",7)==0){303 else if(_memicmp(buffer+i,"#ifndef",7)==0){ 304 304 preprocessor_ifdef(buffer+i,1); 305 305 continue;
Note:
See TracChangeset
for help on using the changeset viewer.