commit 2025-09-04 21:44 add ZTycInt, ZTycLong etc in ZCppMain/ZMainHead.H

This commit is contained in:
2025-09-04 21:44:05 +09:00
parent cc25902d85
commit b460e66975

View File

@ -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<AL_DestSize; ++VL_SourceSize)
{
@ -3517,7 +3528,7 @@ namespace ZNsMain
#ifdef _DEBUG
static inline void WriteError(const char* ApcErrorStr)
static inline void ZfWriteError(const char* ApcErrorStr)
{
std::fstream fileout(
"DEBUG.txt", std::ios::out | std::ios::app);
@ -3527,7 +3538,7 @@ namespace ZNsMain
::exit(1);
}/*
static inline void WriteError(const char* ApcErrorStr)*/
static inline void ZfWriteError(const char* ApcErrorStr)*/
/*///////////////////////////////////////////////////////////////////
@ -4399,19 +4410,19 @@ namespace ZNsMain
ZTypIntI GetInt(bool AB_IsBigEndian=true) const
{
const ZTypIntI CI_IntByte = sizeof(ZTypIntI);
const ZTypIntI CI_SearchSize =
ZTycIntI CI_IntByte = sizeof(ZTypIntI);
ZTycIntI CI_SearchSize =
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
ZTypIntI VI_Result =0;
ZTypIntI VI_TempInt=1;
ZTypIntI VI_Result = 0 ;
ZTypIntI VI_TempInt = 1 ;
if(AB_IsBigEndian)
{
for(ZTypIntI i=CI_SearchSize-1; i>=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<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
ZTypIntL VI_Result =0;
ZTypIntL VI_TempInt=1;
ZTypIntL VI_Result = 0 ;
ZTypIntL VI_TempInt = 1 ;
if(AB_IsBigEndian)
{
@ -4467,12 +4478,12 @@ namespace ZNsMain
ZTypIntLL GetLLong(bool AB_IsBigEndian=true) const
{
const ZTypIntI CI_IntByte = sizeof(ZTypIntLL);
const ZTypIntI CI_SearchSize =
ZTycIntI CI_IntByte = sizeof(ZTypIntLL);
ZTycIntI CI_SearchSize =
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
ZTypIntLL VI_Result =0 ;
ZTypIntLL VI_TempInt =1 ;
ZTypIntLL VI_Result = 0 ;
ZTypIntLL VI_TempInt = 1 ;
if(AB_IsBigEndian)
{