From c6c879dc4532efdc8f281259ad8ec8032b5272ed Mon Sep 17 00:00:00 2001 From: sauron Date: Thu, 4 Sep 2025 19:51:40 +0900 Subject: [PATCH] commit 2025-09-04 19:51 add type ZTycInt, ZTycLong etc in ZCppMain/ZMainHead.H --- ZCppMain/ZMainHead.H | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 33e2707..2a65fa3 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -627,6 +627,22 @@ namespace ZNsMain #endif + typedef const int ZTycInt ; + typedef const long ZTycLong ; + typedef const short ZTycShort ; + typedef const char ZTycChar ; + typedef const wchar_t ZTycCharW ; + + typedef const ZTypLLong ZTycLLong ; + typedef const ZTypULLong ZTycULLong ; + + typedef const ZTypIntLL ZTycIntLL ; + typedef const ZTypIntULL ZTycIntULL ; + + typedef const ZTypIntPtr ZTycIntPtr ; + typedef const ZTypIntUPtr ZTycIntUPtr; + + #ifdef _WIN32 typedef HANDLE ZTypeID; #else @@ -3690,10 +3706,10 @@ namespace ZNsMain template<> string& ZftMakeStr(string& ARR_SaveCStr, long AL_Long) { - const int CI_BuffSize = 31 ; - char VCA_BuffParam[CI_BuffSize] ; + ZTycInt CI_BuffSize = 31 ; + ZTypChar VCA_BuffParam[CI_BuffSize] ; - int VI_ResultSize = + ZTypInt VI_ResultSize = ::sprintf(VCA_BuffParam, "%ld", AL_Long); ARR_SaveCStr.append @@ -3705,10 +3721,10 @@ namespace ZNsMain template<> string& ZftMakeStr(string& ARR_SaveCStr, double AD_Double) { - const int CI_BuffSize=51 ; - char VCA_BuffParam[CI_BuffSize]; + ZTycInt CI_BuffSize=51 ; + ZTypChar VCA_BuffParam[CI_BuffSize]; - int VI_ResultSize = ::sprintf + ZTypInt VI_ResultSize = ::sprintf ( VCA_BuffParam, "%f", AD_Double );