commit 2025-10-10 08:22 edit a bit ZCppMain/ZMainHeadEx.H

This commit is contained in:
2025-10-10 08:22:25 +09:00
parent 561be0b68e
commit ca72233581

View File

@ -7348,7 +7348,7 @@ namespace ZNsMain
/*#####################################################################################################*/ /*#####################################################################################################*/
template<typename TStringData> bool ZftLoadFile /*############################*/ template<typename TStringData> bool ZftLoadFile /*////////////////////////////*/
( (
TStringData& ARR_SaveCStr , ZTypCPCChar APC_FileName , TStringData& ARR_SaveCStr , ZTypCPCChar APC_FileName ,
ZTypLength AL_LoadSize=0 , ZTypLength AL_Offset =0, ZTypLength AL_LoadSize=0 , ZTypLength AL_Offset =0,
@ -7373,10 +7373,8 @@ namespace ZNsMain
(AH_FileDesc, 0/*Offset*/, SEEK_END); // 실패시 -1 (AH_FileDesc, 0/*Offset*/, SEEK_END); // 실패시 -1
if(VL_LastPos == -1 || VL_LastPos<=AL_Offset) if(VL_LastPos == -1 || VL_LastPos<=AL_Offset)
{ { ::close(AH_FileDesc); return false; }
::close(AH_FileDesc); return false; /*******************************************/
}/*
if(VL_LastPos == -1 || VL_LastPos<=AL_Offset)*/
VL_LastPos -= AL_Offset; VL_LastPos -= AL_Offset;
@ -7401,11 +7399,11 @@ namespace ZNsMain
ZTypCPChar VP_CopyStart = ZTypCPChar VP_CopyStart =
const_cast<ZTypPChar>(ARR_SaveCStr.data())+VL_PrevSize ; const_cast<ZTypPChar>(ARR_SaveCStr.data())+VL_PrevSize ;
if((VL_ReadSize = read(AH_FileDesc, VP_CopyStart, VL_LastPos))<0) if((VL_ReadSize = ::read(AH_FileDesc, VP_CopyStart, VL_LastPos))<0)
{ {
ARR_SaveCStr.resize(VL_PrevSize, ' '); ::close(AH_FileDesc); return true; ARR_SaveCStr.resize(VL_PrevSize, ' '); ::close(AH_FileDesc); return true;
} }
/*/////////////////////////////////////////////////////////////*/ /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
ARR_SaveCStr.resize(VL_PrevSize+VL_ReadSize, ' '); ARR_SaveCStr.resize(VL_PrevSize+VL_ReadSize, ' ');
@ -7466,7 +7464,7 @@ namespace ZNsMain
#endif //defined(_WIN) #endif //defined(_WIN)
}/* }/*
template<typename TStringData> bool ZftLoadFile ################################ template<typename TStringData> bool ZftLoadFile ////////////////////////////////
( (
TStringData& ARR_SaveCStr , ZTypCPCChar APC_FileName , TStringData& ARR_SaveCStr , ZTypCPCChar APC_FileName ,
ZTypLength AL_LoadSize=0 , ZTypLength AL_Offset =0, ZTypLength AL_LoadSize=0 , ZTypLength AL_Offset =0,