Changeset 55 in dev
- Timestamp:
- Feb 13, 2007, 3:14:57 AM (18 years ago)
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/CParameter.cpp
r51 r55 334 334 ParmSize+=sizeof(long); 335 335 } 336 else if(DummyTypeInfo.type==DEF_INTEGER||DummyTypeInfo.type==DEF_WORD ){336 else if(DummyTypeInfo.type==DEF_INTEGER||DummyTypeInfo.type==DEF_WORD || (isUnicode&&DummyTypeInfo.type==DEF_CHAR)){ 337 337 ChangeTypeToInteger(CalcType); 338 338 ParmSize+=sizeof(long); 339 339 } 340 else if(DummyTypeInfo.type==DEF_ CHAR||DummyTypeInfo.type==DEF_BYTE||DummyTypeInfo.type==DEF_BOOLEAN){340 else if(DummyTypeInfo.type==DEF_SBYTE||DummyTypeInfo.type==DEF_BYTE||DummyTypeInfo.type==DEF_BOOLEAN || (isUnicode==false&&DummyTypeInfo.type==DEF_CHAR)){ 341 341 ChangeTypeToByte(CalcType); 342 342 ParmSize+=sizeof(long); -
BasicCompiler32/Compile_Calc.cpp
r46 r55 78 78 //符号あり 79 79 80 if(OldType==DEF_INTEGER ){80 if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){ 81 81 //pop eax 82 82 op_pop(REG_EAX); … … 90 90 op_push(REG_EAX); 91 91 } 92 else if(OldType==DEF_ CHAR){92 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 93 93 //pop eax 94 94 op_pop(REG_EAX); … … 170 170 //符号あり 171 171 172 if(OldType==DEF_INTEGER ){172 if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){ 173 173 //pop eax 174 174 op_pop(REG_EAX); … … 182 182 op_push(REG_EAX); 183 183 } 184 else if(OldType==DEF_ CHAR){184 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 185 185 //pop eax 186 186 op_pop(REG_EAX); … … 320 320 if(OldType==DEF_BOOLEAN|| 321 321 OldType==DEF_BYTE|| 322 OldType==DEF_WORD||OldType==DEF_INTEGER ) return;323 else if(OldType==DEF_ CHAR){322 OldType==DEF_WORD||OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)) return; 323 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 324 324 //pop eax 325 325 op_pop(REG_EAX); … … 350 350 void ChangeTypeToByte(int OldType){ 351 351 //現在のスタックの内容をbyte型に変換する 352 if(OldType==DEF_BYTE||OldType==DEF_ CHAR) return;352 if(OldType==DEF_BYTE||OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)) return; 353 353 354 354 ChangeTypeToLong(OldType); … … 572 572 SetBooleanVariable(CalcType,&VarRelativeVar); 573 573 } 574 else if(VarType==DEF_ CHAR||VarType==DEF_BYTE){574 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 575 575 //8ビット整数型変数へスタックの内容を格納する 576 576 Set8Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); 577 577 } 578 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){578 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 579 579 //16ビット整数型変数へスタックの内容を格納する 580 580 Set16Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); … … 687 687 SetBooleanVariable(CalcType,&VarRelativeVar); 688 688 } 689 else if(VarType==DEF_ CHAR||VarType==DEF_BYTE){689 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 690 690 //8ビット整数型変数へスタックの内容を格納する 691 691 Set8Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); 692 692 } 693 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){693 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 694 694 //16ビット整数型変数へスタックの内容を格納する 695 695 Set16Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); -
BasicCompiler32/Compile_ProcOp.cpp
r51 r55 774 774 obp+=sizeof(long); 775 775 } 776 else if(i3==DEF_INTEGER||i3==DEF_WORD ){776 else if(i3==DEF_INTEGER||i3==DEF_WORD || (isUnicode&&i3==DEF_CHAR)){ 777 777 //xor eax,eax(eaxを0に初期化する) 778 778 op_zero_reg(REG_EAX); … … 786 786 obp+=sizeof(long); 787 787 } 788 else if(i3==DEF_ CHAR||i3==DEF_BYTE||i3==DEF_BOOLEAN){788 else if(i3==DEF_SBYTE||i3==DEF_BYTE||i3==DEF_BOOLEAN || (isUnicode==false&&i3==DEF_CHAR)){ 789 789 //xor eax,eax(eaxを0に初期化する) 790 790 op_zero_reg(REG_EAX); -
BasicCompiler32/Compile_Set_Var.cpp
r36 r55 804 804 } 805 805 void Set8Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset){ 806 ChangeTypeToWhole(type,DEF_ CHAR);806 ChangeTypeToWhole(type,DEF_SBYTE); 807 807 808 808 //pop eax -
BasicCompiler32/Compile_Statement.cpp
r51 r55 990 990 if(type1==DEF_INTEGER|| 991 991 type1==DEF_WORD|| 992 type1==DEF_ CHAR||992 type1==DEF_SBYTE|| 993 993 type1==DEF_BYTE|| 994 type1==DEF_BOOLEAN) CaseTypeSize=sizeof(long); 994 type1==DEF_BOOLEAN|| 995 type1==DEF_CHAR) CaseTypeSize=sizeof(long); 995 996 else{ 996 997 CaseTypeSize=GetTypeSize(type1,lpIndex); -
BasicCompiler32/Compile_Var.cpp
r50 r55 872 872 } 873 873 } 874 else if(type==DEF_INTEGER||type==DEF_WORD )874 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)) 875 875 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data; 876 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN)876 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)) 877 877 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data; 878 878 //String型が未完成 … … 1066 1066 obp+=sizeof(long); 1067 1067 } 1068 else if(type==DEF_INTEGER||type==DEF_WORD ){1068 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)){ 1069 1069 //mov ax,InitValue 1070 1070 OpBuffer[obp++]=(char)0x66; … … 1081 1081 obp+=sizeof(long); 1082 1082 } 1083 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN){1083 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)){ 1084 1084 //mov byte ptr[ebp+offset],InitValue 1085 1085 OpBuffer[obp++]=(char)0xC6; -
BasicCompiler32/NumOpe.cpp
r51 r55 39 39 op_push(REG_EAX); 40 40 } 41 else if(type==DEF_INTEGER ){41 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 42 42 //movsx ebx,ax 43 43 OpBuffer[obp++]=(char)0x0F; … … 48 48 op_push(REG_EBX); 49 49 } 50 else if(type==DEF_ CHAR){50 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 51 51 //movsx ebx,al 52 52 OpBuffer[obp++]=(char)0x0F; … … 418 418 PushLongVariable(&RelativeVar); 419 419 } 420 else if(i2==DEF_INTEGER ){420 else if(i2==DEF_INTEGER || (isUnicode&&i2==DEF_CHAR)){ 421 421 PushIntegerVariable(&RelativeVar); 422 422 } … … 424 424 PushWordVariable(&RelativeVar); 425 425 } 426 else if(i2==DEF_ CHAR){426 else if(i2==DEF_SBYTE || (isUnicode==false&&i2==DEF_CHAR)){ 427 427 PushCharVariable(&RelativeVar); 428 428 } … … 739 739 i3=(long)i64data; 740 740 741 if(i2==DEF_ CHAR||i2==DEF_BYTE||i2==DEF_BOOLEAN) i3=i3&0x000000FF;742 if(i2==DEF_INTEGER||i2==DEF_WORD ) i3=i3&0x0000FFFF;741 if(i2==DEF_SBYTE||i2==DEF_BYTE||i2==DEF_BOOLEAN || (isUnicode==false&&i2==DEF_CHAR)) i3=i3&0x000000FF; 742 if(i2==DEF_INTEGER||i2==DEF_WORD || (isUnicode&&i2==DEF_CHAR)) i3=i3&0x0000FFFF; 743 743 744 744 //push term -
BasicCompiler32/NumOpe_TypeOperation.cpp
r36 r55 51 51 op_push(REG_EAX); 52 52 } 53 else if(type==DEF_INTEGER ){53 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 54 54 //pop eax 55 55 op_pop(REG_EAX); … … 75 75 op_push(REG_EAX); 76 76 } 77 else if(type==DEF_ CHAR){77 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 78 78 //pop eax 79 79 op_pop(REG_EAX); … … 101 101 } 102 102 void ExtendStackTo16(int type){ 103 if(type==DEF_ CHAR){103 if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 104 104 //pop eax 105 105 op_pop(REG_EAX); -
BasicCompiler32/VarList.cpp
r36 r55 103 103 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 104 104 } 105 else if(type==DEF_INTEGER ){105 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 106 106 if(ReadProcessMemory(hDebugProcess,(void *)offset,&wData,sizeof(WORD),&dwAccessByte)){ 107 107 sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,(short)wData,(short)wData); … … 115 115 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 116 116 } 117 else if(type==DEF_ CHAR){117 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 118 118 if(ReadProcessMemory(hDebugProcess,(void *)offset,&byteData,sizeof(BYTE),&dwAccessByte)){ 119 119 temporary[0]=byteData; -
BasicCompiler32/increment.cpp
r36 r55 80 80 } 81 81 void ExtendTypeTo32(int type,int reg){ 82 if(type==DEF_INTEGER ){82 if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 83 83 //movsx reg32,reg16 84 84 op_movsx_R32R16(reg,reg); … … 88 88 op_and_RV(reg,(int)0x0000FFFF); 89 89 } 90 else if(type==DEF_ CHAR){90 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 91 91 //movsx reg32,reg8 92 92 op_movsx_R32R8(reg,reg); … … 98 98 } 99 99 void ExtendTypeTo16(int type,int reg){ 100 if(type==DEF_ CHAR){100 if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 101 101 //movsx reg16,reg8 102 102 op_movsx_R16R8(reg,reg); -
BasicCompiler64/Compile_Calc.cpp
r46 r55 11 11 SetBooleanVariable(CalcType,pRelativeVar); 12 12 } 13 if(VarType==DEF_CHAR||VarType==DEF_BYTE){13 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 14 14 //8ビット変数へalレジスタの内容を格納する 15 15 SetWholeVariable(sizeof(char),CalcType,pRelativeVar); 16 16 } 17 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){17 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 18 18 //16ビット変数へaxレジスタの内容を格納する 19 19 SetWholeVariable(sizeof(short),CalcType,pRelativeVar); … … 34 34 //Single型変数へスタックの内容を格納する 35 35 SetSingleVariable(CalcType,pRelativeVar); 36 } 37 else{ 38 SetError(300,NULL,cp); 36 39 } 37 40 } -
BasicCompiler64/Compile_Var.cpp
r50 r55 909 909 else if(type==DEF_LONG||type==DEF_DWORD) 910 910 *(DWORD *)(initGlobalBuf+offset)=(DWORD)i64data; 911 else if(type==DEF_INTEGER||type==DEF_WORD )911 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)) 912 912 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data; 913 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN)913 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)) 914 914 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data; 915 915 … … 1079 1079 obp+=sizeof(long)+sizeof(long); 1080 1080 } 1081 else if(type==DEF_INTEGER||type==DEF_WORD ){1081 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)){ 1082 1082 //mov word ptr[rsp+offset],value 1083 1083 op_mov_MV(sizeof(short),REG_RSP,offset,USE_OFFSET,(int)i64data); … … 1086 1086 obp+=sizeof(long)+sizeof(short); 1087 1087 } 1088 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN){1088 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)){ 1089 1089 //mov byte ptr[rsp+offset],value 1090 1090 op_mov_MV(sizeof(char),REG_RSP,offset,USE_OFFSET,(int)i64data); -
BasicCompiler64/NumOpe_TypeOperation.cpp
r36 r55 10 10 //and reg,00000000FFFFFFFFh 11 11 } 12 else if(type==DEF_INTEGER ){12 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 13 13 //movsx reg64,reg16 14 14 op_movsx64_FromReg16(reg,reg); … … 18 18 op_and64_value(reg,(int)0xFFFF); 19 19 } 20 else if(type==DEF_ CHAR){20 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 21 21 //movsx reg64,reg8 22 22 op_movsx64_FromReg8(reg,reg); … … 28 28 } 29 29 void ExtendTypeTo32(int type,int reg){ 30 if(type==DEF_INTEGER ){30 if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 31 31 //movsx reg32,reg16 32 32 op_movsx32_FromReg16(reg,reg); … … 36 36 op_and32_value(reg,(int)0xFFFF); 37 37 } 38 else if(type==DEF_ CHAR){38 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 39 39 //movsx reg32,reg8 40 40 op_movsx32_FromReg8(reg,reg); … … 46 46 } 47 47 void ExtendTypeTo16(int type,int reg){ 48 if(type==DEF_ CHAR){48 if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 49 49 //movsx reg16,reg8 50 50 op_movsx16_FromReg8(reg,reg); -
BasicCompiler64/varlist.cpp
r36 r55 104 104 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 105 105 } 106 else if(type==DEF_INTEGER ){106 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 107 107 if(ReadProcessMemory(hDebugProcess,(void *)offset,&wData,sizeof(WORD),&stAccBytes)){ 108 108 sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,(short)wData,(short)wData); … … 116 116 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 117 117 } 118 else if(type==DEF_ CHAR){118 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 119 119 if(ReadProcessMemory(hDebugProcess,(void *)offset,&byteData,sizeof(BYTE),&stAccBytes)){ 120 120 temporary[0]=byteData; -
BasicCompiler_Common/BasicCompiler.cpp
r15 r55 691 691 else if(lstrcmp(temp2,"dll")==0) bDll=1; 692 692 693 //Unicode 694 else if( lstrcmp( temp2, "unicode" ) ==0 ) isUnicode = true; 695 693 696 //埋め込み型コンパイラビュー 694 697 else if(lstrcmp(temp2,"clip_compile_view")==0) bClipCompileView=1; -
BasicCompiler_Common/BasicCompiler.h
r15 r55 82 82 83 83 BOOL bDll; 84 bool isUnicode = false; 84 85 85 86 char *basbuf; -
BasicCompiler_Common/BasicFixed.h
r46 r55 19 19 20 20 //整数型 21 #define DEF_ CHAR0x0000000121 #define DEF_SBYTE 0x00000001 22 22 #define DEF_BYTE 0x00000002 23 23 #define DEF_INTEGER 0x00000003 … … 32 32 #define DEF_DOUBLE 0x0000000A 33 33 34 //文字型 35 #define DEF_CHAR 0x0000000B 36 34 37 //bool型 35 #define DEF_BOOLEAN 0x0000000 B38 #define DEF_BOOLEAN 0x0000000C 36 39 37 40 //文字列型 38 #define DEF_STRING 0x0000000 C41 #define DEF_STRING 0x0000000D 39 42 40 43 //ポインタ型 41 #define DEF_PTR_VOID 0x0000000 D42 #define DEF_PTR_PROC 0x0000000 E44 #define DEF_PTR_VOID 0x0000000E 45 #define DEF_PTR_PROC 0x0000000F 43 46 44 47 //特殊型 -
BasicCompiler_Common/NumOpe_GetType.cpp
r50 r55 5 5 switch(size){ 6 6 case 1: 7 if(bSigned) return DEF_ CHAR;7 if(bSigned) return DEF_SBYTE; 8 8 else return DEF_BYTE; 9 9 break; -
BasicCompiler_Common/Variable.cpp
r51 r55 27 27 BOOL IsSignedType(int type){ 28 28 switch(type){ 29 case DEF_ CHAR:29 case DEF_SBYTE: 30 30 case DEF_INTEGER: 31 31 case DEF_LONG: … … 33 33 case DEF_SINGLE: 34 34 case DEF_DOUBLE: 35 case DEF_CHAR: 35 36 return 1; 36 37 default: … … 41 42 BOOL IsNaturalWholeNumberType(int type){ 42 43 switch(type){ 43 case DEF_ CHAR:44 case DEF_SBYTE: 44 45 case DEF_BYTE: 45 46 case DEF_INTEGER: … … 49 50 case DEF_INT64: 50 51 case DEF_QWORD: 52 case DEF_CHAR: 51 53 return 1; 52 54 default: … … 89 91 switch(type){ 90 92 case DEF_BYTE: 91 return DEF_ CHAR;93 return DEF_SBYTE; 92 94 case DEF_WORD: 93 95 return DEF_INTEGER; … … 108 110 int GetUnsignedType(int type){ 109 111 switch(type){ 110 case DEF_ CHAR:112 case DEF_SBYTE: 111 113 return DEF_BYTE; 112 114 case DEF_INTEGER: … … 116 118 case DEF_INT64: 117 119 return DEF_QWORD; 120 case DEF_CHAR: 121 if( isUnicode ) return DEF_WORD; 122 return DEF_BYTE; 118 123 } 119 124 return type; … … 136 141 else if(type==DEF_INTEGER||type==DEF_WORD) 137 142 return sizeof(WORD); 138 else if(type==DEF_ CHAR||type==DEF_BYTE || type == DEF_BOOLEAN)143 else if(type==DEF_SBYTE||type==DEF_BYTE || type == DEF_BOOLEAN) 139 144 return sizeof(BYTE); 140 145 … … 142 147 else if(type==DEF_DOUBLE) return sizeof(double); 143 148 else if(type==DEF_SINGLE) return sizeof(float); 149 150 //文字型 151 else if( type == DEF_CHAR ){ 152 if( isUnicode ) return sizeof( WORD ); 153 return sizeof( BYTE ); 154 } 144 155 145 156 //ポインタ型 … … 178 189 179 190 //整数型 180 if(lstrcmpi(TypeName," Char")==0) return DEF_CHAR;191 if(lstrcmpi(TypeName,"SByte")==0) return DEF_SBYTE; 181 192 else if(lstrcmpi(TypeName,"Byte")==0) return DEF_BYTE; 182 193 else if(lstrcmpi(TypeName,"Integer")==0) return DEF_INTEGER; … … 191 202 else if(lstrcmpi(TypeName,"Double")==0) return DEF_DOUBLE; 192 203 204 //文字型 205 else if( lstrcmpi( TypeName, "Char" ) == 0 ) return DEF_CHAR; 206 193 207 //bool型 194 208 else if( lstrcmpi( TypeName, "Boolean" ) == 0 ) return DEF_BOOLEAN; … … 248 262 249 263 //整数型 250 if(type==DEF_ CHAR) lstrcpy(name,"Char");264 if(type==DEF_SBYTE) lstrcpy(name,"SByte"); 251 265 else if(type==DEF_BYTE) lstrcpy(name,"Byte"); 252 266 else if(type==DEF_INTEGER) lstrcpy(name,"Integer"); … … 260 274 else if(type==DEF_SINGLE) lstrcpy(name,"Single"); 261 275 else if(type==DEF_DOUBLE) lstrcpy(name,"Double"); 276 277 //文字型 278 else if(type==DEF_CHAR) lstrcpy(name,"Char"); 262 279 263 280 //bool型 -
BasicCompiler_Common/calculation.cpp
r50 r55 162 162 if(IsSignedType(type1)||IsSignedType(type2)){ 163 163 //符号あり 164 if(size1==sizeof(char)) return DEF_ CHAR;164 if(size1==sizeof(char)) return DEF_SBYTE; 165 165 if(size1==sizeof(short)) return DEF_INTEGER; 166 166 if(size1==sizeof(long)) return DEF_LONG; … … 362 362 363 363 if(IsSignedType(AnswerType)){ 364 if(AnswerType==DEF_ CHAR&&(i64stack[sp-2]<CHAR_MIN||CHAR_MAX<i64stack[sp-2])){364 if(AnswerType==DEF_SBYTE&&(i64stack[sp-2]<CHAR_MIN||CHAR_MAX<i64stack[sp-2])){ 365 365 //符号有り8ビット値をはみ出したとき 366 366 AnswerType=DEF_INTEGER; … … 604 604 } 605 605 } 606 else if(i2==DEF_INTEGER ){606 else if(i2==DEF_INTEGER || (isUnicode&&i2==DEF_CHAR)){ 607 607 short shortData; 608 608 if(i3=ReadProcessMemory(hDebugProcess,offset,&shortData,sizeof(short),&stAccBytes)){ … … 616 616 } 617 617 } 618 else if(i2==DEF_ CHAR){618 else if(i2==DEF_SBYTE || (isUnicode==false&&i2==DEF_CHAR)){ 619 619 char charData; 620 620 if(i3=ReadProcessMemory(hDebugProcess,offset,&charData,sizeof(char),&stAccBytes)){ -
BasicCompiler_Common/common.h
r50 r55 88 88 extern char BasicSystemDir[MAX_PATH]; 89 89 extern int cp; 90 extern bool isUnicode; 90 91 91 92 -
BasicCompiler_Common/preprocessor.cpp
r43 r55 79 79 } 80 80 81 extern bool isUnicode; 82 if( isUnicode ){ 83 add( "UNICODE" ); 84 } 85 81 86 char temporary[255]; 82 87 sprintf(temporary,"_AB_VER%d",MAJOR_VER); -
ProjectEditor/Common.h
r43 r55 603 603 #define PJ_OP_STRICT 0x00010000 604 604 #define PJ_OP_RC_MANIFEST 0x00020000 605 #define PJ_OP_UNICODE 0x00040000 605 606 struct PROJECTINFO{ 606 607 DWORD dwModuleType; -
ProjectEditor/DialogBoxes.cpp
r22 r55 328 328 if(SendDlgItemMessage(hwnd,IDC_STRICT,BM_GETCHECK,0,0)) 329 329 NewProjectInfo.dwOption|=PJ_OP_STRICT; 330 if(SendDlgItemMessage(hwnd,IDC_UNICODE,BM_GETCHECK,0,0)) 331 NewProjectInfo.dwOption|=PJ_OP_UNICODE; 330 332 if(SendDlgItemMessage(hwnd,IDC_API_COMMCTRL,BM_GETCHECK,0,0)) 331 333 NewProjectInfo.dwOption|=PJ_OP_COMMCTRL; … … 797 799 SendDlgItemMessage(hwnd,IDC_STRICT,BM_SETCHECK,BST_CHECKED,0); 798 800 801 //Unicode 802 if(temp_dwPjOption&PJ_OP_UNICODE) 803 SendDlgItemMessage(hwnd,IDC_UNICODE,BM_SETCHECK,BST_CHECKED,0); 804 799 805 break; 800 806 case WM_NOTIFY: … … 808 814 temp_dwPjOption|=PJ_OP_STRICT; 809 815 else temp_dwPjOption&=~PJ_OP_STRICT; 816 817 //Unicode 818 if(SendDlgItemMessage(hwnd,IDC_UNICODE,BM_GETCHECK,0,0)) 819 temp_dwPjOption|=PJ_OP_UNICODE; 820 else temp_dwPjOption&=~PJ_OP_UNICODE; 810 821 811 822 if(nmhdr->code==PSN_APPLY) SaveSetting_DlgPjOption(); -
ProjectEditor/ProjectEditor.cpp
r37 r55 1995 1995 if(ProjectInfo.dwModuleType==MT_DLL) lstrcat(temporary," /dll"); 1996 1996 1997 //Unicodeオプション 1998 if(ProjectInfo.dwOption==PJ_OP_UNICODE) lstrcat(temporary," /unicode"); 1999 1997 2000 //ブレークポイントをセーブ 1998 2001 ProjectInfo.pobj_DBBreakPoint->SaveToTempFile(); … … 2046 2049 //DLLオプション 2047 2050 if(ProjectInfo.dwModuleType==MT_DLL) lstrcat(temporary," /dll"); 2051 2052 //Unicodeオプション 2053 if(ProjectInfo.dwOption==PJ_OP_UNICODE) lstrcat(temporary," /unicode"); 2048 2054 } 2049 2055 else{ … … 2129 2135 //DLLオプション 2130 2136 if(ProjectInfo.dwModuleType==MT_DLL) lstrcat(temporary," /dll"); 2137 2138 //Unicodeオプション 2139 if(ProjectInfo.dwOption==PJ_OP_UNICODE) lstrcat(temporary," /unicode"); 2131 2140 } 2132 2141 else{
Note:
See TracChangeset
for help on using the changeset viewer.