Changeset 54 in dev for BasicCompiler_Common/Intermediate_Step1.cpp
- Timestamp:
- Feb 12, 2007, 2:09:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Intermediate_Step1.cpp
r4 r54 414 414 char *temporary,temp2[VN_SIZE]; 415 415 416 temporary=(char *) GlobalAlloc(GMEM_FIXED,lstrlen(buffer)*2);416 temporary=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,lstrlen(buffer)*2); 417 417 for(i=0,i2=0,IsStr=0;;i++,i2++){ 418 418 if(buffer[i]=='\"') IsStr^=1; … … 594 594 if(lstrcmpi(temporary+i3,"Declare")==0){ 595 595 i2=i3; 596 int i9=i2; 596 597 temporary[i2]=1; 597 598 temporary[++i2]=ESC_DECLARE; 598 599 i++; 599 600 while(buffer[i]==' '||buffer[i]=='\t') i++; 601 602 // Sub/Function 600 603 for(i4=0;;i++,i4++){ 601 604 if(!IsVariableChar(buffer[i])){ … … 608 611 else if(lstrcmpi(temp2,"Function")==0) temporary[++i2]=ESC_FUNCTION; 609 612 while(buffer[i]==' '||buffer[i]=='\t') i++; 613 614 // 関数名 610 615 for(i2++;;i++,i2++){ 611 616 if(!IsVariableChar(buffer[i])){ … … 616 621 } 617 622 while(buffer[i]==' '||buffer[i]=='\t') i++; 623 618 624 for(i4=0;;i++,i4++){ 619 625 if(!IsVariableChar(buffer[i])){ … … 638 644 if(lstrcmpi(temp2,"Lib")==0) temporary[++i2]=','; 639 645 while(buffer[i]==' '||buffer[i]=='\t') i++; 646 640 647 if(buffer[i]=='\"'){ 641 648 temporary[++i2]=buffer[i]; … … 649 656 } 650 657 } 658 else{ 659 for(i2++;;i++,i2++){ 660 if(!IsVariableChar(buffer[i])){ 661 i2--; 662 break; 663 } 664 temporary[i2]=buffer[i]; 665 } 666 } 651 667 while(buffer[i]==' '||buffer[i]=='\t') i++; 652 for(i4=0;;i++,i4++){ 653 if(!IsVariableChar(buffer[i])){ 654 temp2[i4]=0; 655 break; 668 669 temporary[++i2]=','; 670 671 if( memicmp( buffer + i, "Alias", 5 ) ==0 ){ 672 i+=5; 673 for(i++,i2++;;i++,i2++){ 674 temporary[i2]=buffer[i]; 675 if(buffer[i]=='('){ 676 i2--; 677 break; 678 } 679 if(buffer[i]=='\0') break; 656 680 } 657 temp2[i4]=buffer[i];658 } 659 if(lstrcmpi(temp2,"Alias")==0)660 temporary[++i2]=','; 681 } 682 683 temporary[++i2]=','; 684 661 685 i--; 662 686 } … … 942 966 } 943 967 lstrcpy(buffer,temporary); 944 GlobalFree(temporary);968 HeapDefaultFree(temporary); 945 969 } 946 970 void DefCommandFormat(char *buffer){
Note:
See TracChangeset
for help on using the changeset viewer.