本文整理汇总了C++中Archive::IsArcLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ Archive::IsArcLabel方法的具体用法?C++ Archive::IsArcLabel怎么用?C++ Archive::IsArcLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Archive
的用法示例。
在下文中一共展示了Archive::IsArcLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExtractCurrentFile
//.........这里部分代码省略.........
}
#endif
if (ExactMatch && !EqualNames)
AllMatchesExact=false;
#ifdef UNICODE_SUPPORTED
bool WideName=(Arc.NewLhd.Flags & LHD_UNICODE) && UnicodeEnabled();
#else
bool WideName=false;
#endif
#ifdef _APPLE
if (WideName)
{
WideToUtf(Arc.NewLhd.FileNameW,ArcFileName,sizeof(ArcFileName));
WideName=false;
}
#endif
wchar *DestNameW=WideName ? DestFileNameW:NULL;
#ifdef UNICODE_SUPPORTED
if (WideName)
{
ConvertPath(Arc.NewLhd.FileNameW,ArcFileNameW);
char Name[NM];
if (WideToChar(ArcFileNameW,Name) && IsNameUsable(Name))
strcpy(ArcFileName,Name);
}
#endif
ConvertPath(ArcFileName,ArcFileName);
if (Arc.IsArcLabel())
return(true);
if (Arc.NewLhd.Flags & LHD_VERSION)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
ExactMatch=false;
int Version=ParseVersionFileName(ArcFileName,ArcFileNameW,false);
if (Cmd->VersionControl-1==Version)
ParseVersionFileName(ArcFileName,ArcFileNameW,true);
else
ExactMatch=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
ExactMatch=false;
Arc.ConvertAttributes();
#ifndef SFX_MODULE
if ((Arc.NewLhd.Flags & (LHD_SPLIT_BEFORE/*|LHD_SOLID*/)) && FirstFile)
{
char CurVolName[NM];
strcpy(CurVolName,ArcName);
VolNameToFirstName(ArcName,ArcName,(Arc.NewMhd.Flags & MHD_NEWNUMBERING)!=0);
if (stricomp(ArcName,CurVolName)!=0 && FileExist(ArcName))
{
*ArcNameW=0;
Repeat=true;
示例2: ExtractCurrentFile
//.........这里部分代码省略.........
bool WideName=(Arc.NewLhd.Flags & LHD_UNICODE) && UnicodeEnabled();
#else
bool WideName=false;
#endif
#ifdef _APPLE
if (WideName)
{
// Prepare UTF-8 name for OS X. Since we are sure that destination
// is UTF-8, we can avoid calling the less reliable WideToChar function.
WideToUtf(Arc.NewLhd.FileNameW,ArcFileName,ASIZE(ArcFileName));
WideName=false;
}
#endif
wchar *DestNameW=WideName ? DestFileNameW:NULL;
(void) DestNameW;
#ifdef UNICODE_SUPPORTED
if (WideName)
{
// Prepare the name in single byte native encoding (typically UTF-8
// for Unix-based systems). Windows does not really need it,
// but Unix system will use this name instead of Unicode.
ConvertPath(Arc.NewLhd.FileNameW,ArcFileNameW);
char Name[NM];
if (WideToChar(ArcFileNameW,Name) && IsNameUsable(Name))
strcpy(ArcFileName,Name);
}
#endif
ConvertPath(ArcFileName,ArcFileName);
if (Arc.IsArcLabel())
return(true);
if (Arc.NewLhd.Flags & LHD_VERSION)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
ExactMatch=false;
int Version=ParseVersionFileName(ArcFileName,ArcFileNameW,false);
if (Cmd->VersionControl-1==(unsigned) Version)
ParseVersionFileName(ArcFileName,ArcFileNameW,true);
else
ExactMatch=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
ExactMatch=false;
Arc.ConvertAttributes();
#ifndef SFX_MODULE
if ((Arc.NewLhd.Flags & LHD_SPLIT_BEFORE)!=0 && FirstFile)
{
char CurVolName[NM];
strcpy(CurVolName,ArcName);
bool NewNumbering=(Arc.NewMhd.Flags & MHD_NEWNUMBERING)!=0;
VolNameToFirstName(ArcName,ArcName,NewNumbering);
if (*ArcNameW!=0)
VolNameToFirstName(ArcNameW,ArcNameW,NewNumbering);