commit 2025-09-04 21:44 add ZTycInt, ZTycLong etc in ZCppMain/ZMainHead.H
This commit is contained in:
@ -628,8 +628,11 @@ namespace ZNsMain
|
|||||||
|
|
||||||
|
|
||||||
typedef const int ZTycInt ;
|
typedef const int ZTycInt ;
|
||||||
|
typedef const int ZTycIntI ;
|
||||||
typedef const long ZTycLong ;
|
typedef const long ZTycLong ;
|
||||||
|
typedef const long ZTycIntL ;
|
||||||
typedef const short ZTycShort ;
|
typedef const short ZTycShort ;
|
||||||
|
typedef const short ZTycIntS ;
|
||||||
typedef const char ZTycChar ;
|
typedef const char ZTycChar ;
|
||||||
typedef const wchar_t ZTycCharW ;
|
typedef const wchar_t ZTycCharW ;
|
||||||
|
|
||||||
@ -642,6 +645,12 @@ namespace ZNsMain
|
|||||||
typedef const ZTypIntPtr ZTycIntPtr ;
|
typedef const ZTypIntPtr ZTycIntPtr ;
|
||||||
typedef const ZTypIntUPtr ZTycIntUPtr;
|
typedef const ZTypIntUPtr ZTycIntUPtr;
|
||||||
|
|
||||||
|
typedef const char ZTycChar ;
|
||||||
|
typedef const wchar_t ZTycWChar ;
|
||||||
|
|
||||||
|
typedef const char* ZTycPChar ;
|
||||||
|
typedef const wchar_t* ZTycPWChar ;
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
typedef HANDLE ZTypeID;
|
typedef HANDLE ZTypeID;
|
||||||
@ -2443,8 +2452,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
if(AI_Length<1) return 0;
|
if(AI_Length<1) return 0;
|
||||||
|
|
||||||
const char* VPC_Char =ApcChar+AI_Length-1;
|
ZTycChar* VPC_Char = ApcChar+AI_Length-1;
|
||||||
TypeInt VL_Temp;
|
TypeInt VL_Temp = 0 ;
|
||||||
TypeInt VL_Result = (*VPC_Char--)-'0' ;
|
TypeInt VL_Result = (*VPC_Char--)-'0' ;
|
||||||
TypeInt VL_Multiple= 1 ;
|
TypeInt VL_Multiple= 1 ;
|
||||||
|
|
||||||
@ -2623,13 +2632,15 @@ namespace ZNsMain
|
|||||||
/* ApcSource must be null-terminated. AL_DestSize
|
/* ApcSource must be null-terminated. AL_DestSize
|
||||||
must be equal to or more than strlen(ApcSource)+1.
|
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 ;
|
TTypeSize VL_SourceSize=0 ;
|
||||||
TTypeCh* VPC_Dest =ApcDest ;
|
TTypeCh* VPC_Dest =ApcDest ;
|
||||||
const TTypeCh* VPC_Source =ApcSource;
|
TTypcCh* VPC_Source =ApcSource;
|
||||||
|
|
||||||
for(; VL_SourceSize<AL_DestSize; ++VL_SourceSize)
|
for(; VL_SourceSize<AL_DestSize; ++VL_SourceSize)
|
||||||
{
|
{
|
||||||
@ -3517,7 +3528,7 @@ namespace ZNsMain
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
|
||||||
static inline void WriteError(const char* ApcErrorStr)
|
static inline void ZfWriteError(const char* ApcErrorStr)
|
||||||
{
|
{
|
||||||
std::fstream fileout(
|
std::fstream fileout(
|
||||||
"DEBUG.txt", std::ios::out | std::ios::app);
|
"DEBUG.txt", std::ios::out | std::ios::app);
|
||||||
@ -3527,7 +3538,7 @@ namespace ZNsMain
|
|||||||
|
|
||||||
::exit(1);
|
::exit(1);
|
||||||
}/*
|
}/*
|
||||||
static inline void WriteError(const char* ApcErrorStr)*/
|
static inline void ZfWriteError(const char* ApcErrorStr)*/
|
||||||
|
|
||||||
|
|
||||||
/*///////////////////////////////////////////////////////////////////
|
/*///////////////////////////////////////////////////////////////////
|
||||||
@ -4399,8 +4410,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
ZTypIntI GetInt(bool AB_IsBigEndian=true) const
|
ZTypIntI GetInt(bool AB_IsBigEndian=true) const
|
||||||
{
|
{
|
||||||
const ZTypIntI CI_IntByte = sizeof(ZTypIntI);
|
ZTycIntI CI_IntByte = sizeof(ZTypIntI);
|
||||||
const ZTypIntI CI_SearchSize =
|
ZTycIntI CI_SearchSize =
|
||||||
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
||||||
|
|
||||||
ZTypIntI VI_Result = 0 ;
|
ZTypIntI VI_Result = 0 ;
|
||||||
@ -4433,8 +4444,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
ZTypIntL GetLong(bool AB_IsBigEndian=true) const
|
ZTypIntL GetLong(bool AB_IsBigEndian=true) const
|
||||||
{
|
{
|
||||||
const ZTypIntI CI_IntByte = sizeof(ZTypIntL);
|
ZTycIntI CI_IntByte = sizeof(ZTypIntL);
|
||||||
const ZTypIntI CI_SearchSize =
|
ZTycIntI CI_SearchSize =
|
||||||
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
||||||
|
|
||||||
ZTypIntL VI_Result = 0 ;
|
ZTypIntL VI_Result = 0 ;
|
||||||
@ -4467,8 +4478,8 @@ namespace ZNsMain
|
|||||||
|
|
||||||
ZTypIntLL GetLLong(bool AB_IsBigEndian=true) const
|
ZTypIntLL GetLLong(bool AB_IsBigEndian=true) const
|
||||||
{
|
{
|
||||||
const ZTypIntI CI_IntByte = sizeof(ZTypIntLL);
|
ZTycIntI CI_IntByte = sizeof(ZTypIntLL);
|
||||||
const ZTypIntI CI_SearchSize =
|
ZTycIntI CI_SearchSize =
|
||||||
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
(ml_TypeLength<CI_IntByte ? ml_TypeLength : CI_IntByte) ;
|
||||||
|
|
||||||
ZTypIntLL VI_Result = 0 ;
|
ZTypIntLL VI_Result = 0 ;
|
||||||
|
Reference in New Issue
Block a user