From b460e66975f9686e58c676b450826ae4d5912e5b Mon Sep 17 00:00:00 2001 From: sauron Date: Thu, 4 Sep 2025 21:44:05 +0900 Subject: [PATCH] commit 2025-09-04 21:44 add ZTycInt, ZTycLong etc in ZCppMain/ZMainHead.H --- ZCppMain/ZMainHead.H | 57 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 2a65fa3..4cb5c9d 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -628,8 +628,11 @@ namespace ZNsMain typedef const int ZTycInt ; + typedef const int ZTycIntI ; typedef const long ZTycLong ; + typedef const long ZTycIntL ; typedef const short ZTycShort ; + typedef const short ZTycIntS ; typedef const char ZTycChar ; typedef const wchar_t ZTycCharW ; @@ -641,6 +644,12 @@ namespace ZNsMain typedef const ZTypIntPtr ZTycIntPtr ; typedef const ZTypIntUPtr ZTycIntUPtr; + + typedef const char ZTycChar ; + typedef const wchar_t ZTycWChar ; + + typedef const char* ZTycPChar ; + typedef const wchar_t* ZTycPWChar ; #ifdef _WIN32 @@ -2443,10 +2452,10 @@ namespace ZNsMain if(AI_Length<1) return 0; - const char* VPC_Char =ApcChar+AI_Length-1; - TypeInt VL_Temp; - TypeInt VL_Result =(*VPC_Char--)-'0'; - TypeInt VL_Multiple=1; + ZTycChar* VPC_Char = ApcChar+AI_Length-1; + TypeInt VL_Temp = 0 ; + TypeInt VL_Result = (*VPC_Char--)-'0' ; + TypeInt VL_Multiple= 1 ; while(--AI_Length>0) { @@ -2623,13 +2632,15 @@ namespace ZNsMain /* ApcSource must be null-terminated. AL_DestSize must be equal to or more than strlen(ApcSource)+1. - Null 문자를 포함하여 ApcDest 에 복사된 길이를 리턴한다. */ + Null 문자를 포함하여 ApcDest 에 복사된 길이를 리턴한다. + */ + typedef const TTypeCh TTypcCh; - if(ApcSource==0) return 0; + if(ApcSource==0) return 0 ; TTypeSize VL_SourceSize=0 ; TTypeCh* VPC_Dest =ApcDest ; - const TTypeCh* VPC_Source =ApcSource; + TTypcCh* VPC_Source =ApcSource; for(; VL_SourceSize=0; --i) { - VI_Result += (ZTypIntI)(ZTypUChar)(mp_TypeChar[i]) * VI_TempInt ; - VI_TempInt*= 256 ; + VI_Result += (ZTypIntI)(ZTypUChar)(mp_TypeChar[i]) * VI_TempInt ; + VI_TempInt *= 256 ; }/* for(ZTypIntI i=CI_SearchSize-1; i>=0; --i)*/ @@ -4433,12 +4444,12 @@ namespace ZNsMain ZTypIntL GetLong(bool AB_IsBigEndian=true) const { - const ZTypIntI CI_IntByte = sizeof(ZTypIntL); - const ZTypIntI CI_SearchSize = + ZTycIntI CI_IntByte = sizeof(ZTypIntL); + ZTycIntI CI_SearchSize = (ml_TypeLength