commit 2025-08-28 23:17 edit a bit ZCppMain/ZtCMainChars.H

This commit is contained in:
2025-08-28 23:17:24 +09:00
parent ef089d6982
commit ca28ee71a4

View File

@ -426,8 +426,8 @@ namespace ZNsMain
{
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)*/
@ -437,8 +437,8 @@ namespace ZNsMain
for(ZTypIntI i=0; i<CI_SearchSize; ++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=0; i<CI_SearchSize; ++i)*/
@ -453,15 +453,15 @@ namespace ZNsMain
const ZTypIntI 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)
{
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)*/
@ -471,8 +471,8 @@ namespace ZNsMain
for(ZTypIntI i=0; i<CI_SearchSize; ++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=0; i<CI_SearchSize; ++i)*/
@ -494,8 +494,8 @@ namespace ZNsMain
{
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)*/
@ -505,8 +505,8 @@ namespace ZNsMain
for(ZTypIntI i=0; i<CI_SearchSize; ++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=0; i<CI_SearchSize; ++i)*/
@ -833,13 +833,16 @@ namespace ZNsMain
static bool DoClose(
TypeCharC* APC_Origin, TypeCharC* APC_Search, TypeLength AL_OriginLength, TypeLength AL_SearchLength)
{
const bool CB_IsBad = (
AL_OriginLength<1 || AL_SearchLength<1 || AL_OriginLength<AL_OriginLength);
const bool CB_IsBad = /*:::::::::::::::*/
(
AL_OriginLength < 1 ||
AL_SearchLength < 1 ||
AL_OriginLength < AL_OriginLength
);
if(CB_IsBad) return false; /*:::::::::*/
if(CB_IsBad) return false;
const TypeChar* VP_Char1=APC_Origin+(AL_OriginLength-AL_SearchLength);
const TypeChar* VP_Char2=APC_Search ;
const TypeChar* VP_Char1 = APC_Origin+(AL_OriginLength-AL_SearchLength);
const TypeChar* VP_Char2 = APC_Search ;
for(TypeLength i=0; i<AL_SearchLength; ++i)
{
@ -868,12 +871,14 @@ namespace ZNsMain
TypeLength AL_OriginLength1, TypeLength AL_OriginLength2, TypeLength AL_SearchLength )
{
/* APC_Origin1 와 APC_Origin2 을 연속된 문자열로 보았을때,
전체 문자열이 APC_Search 로 끝나면 true 를 반환한다. */
const bool CB_IsBad = (
AL_SearchLength<1 || AL_OriginLength1+AL_OriginLength2<AL_SearchLength );
if(CB_IsBad) return false; //////////////////////////////////////////////////
전체 문자열이 APC_Search 로 끝나면 true 를 반환한다.
*/
const bool CB_IsBad = /*:::::::::::::::::::::::::::::::::::::*/
(
AL_SearchLength<1 ||
AL_OriginLength1 + AL_OriginLength2 < AL_SearchLength
);
if(CB_IsBad) return false; /*::::::::::::::::::::::::::::::::*/
/*/////////////////////////////////////////////////////