~ubuntu-branches/ubuntu/trusty/unrar-nonfree/trusty-proposed

« back to all changes in this revision

Viewing changes to cmddata.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2006-01-05 20:51:54 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060105205154-hakkdnxhbrszo9he
Tags: 1:3.5.4-0.1
* Non-maintainer upload.
* New upstream release.
  + Builds fine on amd64 (Closes: #288751, #335824).
  + The last upload was pre-sarge and not yet rebuilt for the libstdc++
    transition (Closes: #341753).
* Bump Standards-Version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
890
890
}
891
891
 
892
892
 
893
 
bool CommandData::ExclCheckArgs(StringList *Args,char *CheckName,bool CheckFullPath)
 
893
bool CommandData::ExclCheckArgs(StringList *Args,char *CheckName,bool CheckFullPath,int MatchMode)
894
894
{
895
895
  char *Name=ConvertPath(CheckName,NULL);
896
896
  char FullName[NM],*CurName;
902
902
    {
903
903
      if (*FullName==0)
904
904
        ConvertNameToFull(CheckName,FullName);
905
 
      if (CmpName(CurName,FullName,MATCH_WILDSUBPATH))
 
905
      if (CmpName(CurName,FullName,MatchMode))
906
906
        return(true);
907
907
    }
908
908
    else
909
909
#endif
910
 
      if (CmpName(ConvertPath(CurName,NULL),Name,MATCH_WILDSUBPATH))
 
910
      if (CmpName(ConvertPath(CurName,NULL),Name,MatchMode))
911
911
        return(true);
912
912
  return(false);
913
913
}
915
915
 
916
916
bool CommandData::ExclCheck(char *CheckName,bool CheckFullPath)
917
917
{
918
 
  if (ExclCheckArgs(ExclArgs,CheckName,CheckFullPath))
 
918
  if (ExclCheckArgs(ExclArgs,CheckName,CheckFullPath,MATCH_WILDSUBPATH))
919
919
    return(true);
920
920
  if (InclArgs->ItemsCount()==0)
921
921
    return(false);
922
 
  if (ExclCheckArgs(InclArgs,CheckName,CheckFullPath))
 
922
  if (ExclCheckArgs(InclArgs,CheckName,CheckFullPath,MATCH_NAMES))
923
923
    return(false);
924
924
  return(true);
925
925
}
977
977
    if (Unicode)
978
978
    {
979
979
      wchar NameW[NM],ArgW[NM],*NamePtr=NewLhd.FileNameW;
 
980
      bool CorrectUnicode=true;
980
981
      if (ArgNameW==NULL)
981
982
      {
982
 
        CharToWide(ArgName,ArgW);
 
983
        if (!CharToWide(ArgName,ArgW) || *ArgW==0)
 
984
          CorrectUnicode=false;
983
985
        ArgNameW=ArgW;
984
986
      }
985
987
      if ((NewLhd.Flags & LHD_UNICODE)==0)
986
988
      {
987
 
        CharToWide(NewLhd.FileName,NameW);
 
989
        if (!CharToWide(NewLhd.FileName,NameW) || *NameW==0)
 
990
          CorrectUnicode=false;
988
991
        NamePtr=NameW;
989
992
      }
990
993
      if (CmpName(ArgNameW,NamePtr,MatchType))
993
996
          *ExactMatch=stricompcw(ArgNameW,NamePtr)==0;
994
997
        return(StringCount);
995
998
      }
996
 
      continue;
 
999
      if (CorrectUnicode)
 
1000
        continue;
997
1001
    }
998
1002
#endif
999
1003
    if (CmpName(ArgName,NewLhd.FileName,MatchType))