1 #include "NyLPC_mimicvm_utils_protected.h"
\r
5 * テキスト形式の16進数。[a-f0-9]+であること
\r
7 * i_txtの長さ。2,4,8のいずれかであること。
\r
10 * i_numにより、必要なサイズが変化する。
\r
13 NyLPC_TBool NyLPC_mimicvm_txt2UInt(const NyLPC_TChar* i_txt,NyLPC_TUInt8 i_num,void* out)
\r
15 NyLPC_TUInt32 ret=0;
\r
19 for(i=0;i<i_num;i++){
\r
21 if('f'>=c && c>='a'){
\r
22 c=c-(NyLPC_TUInt8)'a'+10;
\r
23 }else if('9'>=c && c>='0'){
\r
24 c-=(NyLPC_TUInt8)'0';
\r
26 return NyLPC_TBool_FALSE;
\r
33 *((NyLPC_TUInt8*)out)=(NyLPC_TUInt8)ret;
\r
36 *((NyLPC_TUInt16*)out)=(NyLPC_TUInt16)ret;
\r
39 *((NyLPC_TUInt32*)out)=(NyLPC_TUInt32)ret;
\r
42 return NyLPC_TBool_FALSE;
\r
44 return NyLPC_TBool_TRUE;
\r