Changeset 751 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Sep 24, 2008, 2:36:26 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step1.cpp
r735 r751 55 55 void DeleteComment(char *buffer){ //注釈「'」の取り除き 56 56 int i,i2,i3,IsStr; 57 char *temporary=(char *) HeapAlloc(hHeap,HEAP_ZERO_MEMORY,lstrlen(buffer)+1);57 char *temporary=(char *)calloc(lstrlen(buffer)+1,sizeof (char)); 58 58 for(i=0,i2=0,i3=0,IsStr=0;;i++,i2++){ 59 59 if(buffer[i]=='\"') IsStr^=1; … … 99 99 } 100 100 lstrcpy(buffer,temporary); 101 HeapDefaultFree(temporary);101 free(temporary); 102 102 } 103 103 void CheckParenthesis(char *buffer){ … … 372 372 373 373 bool isBeforeCharDelimitation = true; 374 temporary=(char *) HeapAlloc(hHeap,HEAP_ZERO_MEMORY,(lstrlen(buffer)+255)*2);374 temporary=(char *)calloc((lstrlen(buffer)+255)*2,sizeof (char)); 375 375 for(i=0,i2=0,IsStr=0;;i++,i2++){ 376 376 if(buffer[i]=='\"') IsStr^=1; … … 990 990 } 991 991 lstrcpy(buffer,temporary); 992 HeapDefaultFree(temporary);992 free(temporary); 993 993 } 994 994 void DefCommandFormat(char *buffer){ … … 1182 1182 int i,i2; 1183 1183 1184 char *temporary; 1185 temporary=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)*2+1024); 1184 char *temporary = (char*)malloc(strlen(buffer)*2+1024); 1186 1185 1187 1186 //1行Ifをブロック形式にする … … 1213 1212 } 1214 1213 1215 HeapDefaultFree(temporary);1214 free(temporary); 1216 1215 } 1217 1216 void CheckPareCommand(void){ -
trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step2.cpp
r543 r751 395 395 char *temporary,*tempBase,temp2[VN_SIZE],*lpCommand; 396 396 397 tempBase=(char *) HeapAlloc(hHeap,0,(lstrlen(buffer)+1)*2+8192);397 tempBase=(char *)malloc((lstrlen(buffer)+1)*2+8192); 398 398 temporary=tempBase+1; 399 399 temporary[0]=0; … … 402 402 403 403 CommandBufferSize=512; 404 lpCommand=(char *)HeapAlloc(hHeap,0,CommandBufferSize); 404 405 lpCommand=(char *)malloc(CommandBufferSize); 405 406 406 407 while(1){ … … 417 418 if(i2>=CommandBufferSize){ //バッファ領域が足りなくなった場合はバッファを増量する 418 419 CommandBufferSize+=512; 419 lpCommand=(char *) HeapReAlloc(hHeap,0,lpCommand,CommandBufferSize);420 lpCommand=(char *)realloc(lpCommand,CommandBufferSize); 420 421 } 421 422 if(buffer[i]=='\"') IsStr^=1; … … 463 464 if(buffer[i]=='\0') break; 464 465 } 465 HeapDefaultFree(lpCommand);466 free(lpCommand); 466 467 lstrcpy(buffer,temporary); 467 468 468 HeapDefaultFree(tempBase);469 free(tempBase); 469 470 } -
trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp
r702 r751 232 232 //パラメータを整備 233 233 char *Parameter; 234 Parameter=(char *) HeapAlloc(hHeap,0,lstrlen(ArrayElements)+(rightSide ? lstrlen(rightSide) : 0)+32);234 Parameter=(char *)malloc(lstrlen(ArrayElements)+(rightSide ? lstrlen(rightSide) : 0)+32); 235 235 lstrcpy(Parameter,ArrayElements); 236 236 if(rightSide){ … … 255 255 } 256 256 257 HeapDefaultFree(Parameter);257 free(Parameter); 258 258 259 259 return true; -
trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
r636 r751 45 45 #include <jenga/include/jenga.h> 46 46 47 #include <abdev/ab_common/include/libs.h> 48 47 49 using namespace Jenga::Common; 48 50
Note:
See TracChangeset
for help on using the changeset viewer.