Home | History | Annotate | Download | only in Common

Lines Matching refs:parser

749     const CParser &parser,

771 if (parser[NKey::kUpdate].ThereIs)
772 ParseUpdateCommandString(options, parser[NKey::kUpdate].PostStrings,
774 if (parser[NKey::kWorkingDir].ThereIs)
776 const UString &postString = parser[NKey::kWorkingDir].PostStrings[0];
782 options.SfxMode = parser[NKey::kSfx].ThereIs;
784 options.SfxModule = us2fs(parser[NKey::kSfx].PostStrings[0]);
786 if (parser[NKey::kVolume].ThereIs)
788 const UStringVector &sv = parser[NKey::kVolume].PostStrings;
799 static void SetMethodOptions(const CParser &parser, CObjectVector<CProperty> &properties)
801 if (parser[NKey::kProperty].ThereIs)
803 FOR_VECTOR (i, parser[NKey::kProperty].PostStrings)
806 prop.Name = parser[NKey::kProperty].PostStrings[i];
818 CArcCmdLineParser::CArcCmdLineParser(): parser(ARRAY_SIZE(kSwitchForms)) {}
823 if (!parser.ParseStrings(kSwitchForms, commandStrings))
824 throw CArcCmdLineException(parser.ErrorMessage, parser.ErrorLine);
829 options.StdInMode = parser[NKey::kStdIn].ThereIs;
830 options.StdOutMode = parser[NKey::kStdOut].ThereIs;
831 options.EnableHeaders = !parser[NKey::kDisableHeaders].ThereIs;
832 options.HelpMode = parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs || parser[NKey::kHelp3].ThereIs;
834 if (parser[NKey::kCaseSensitive].ThereIs)
836 g_CaseSensitive = !parser[NKey::kCaseSensitive].WithMinus;
843 if (parser[NKey::kLargePages].ThereIs)
845 options.LargePages = !parser[NKey::kLargePages].WithMinus;
867 static Int32 FindCharset(const NCommandLineParser::CParser &parser, int keyIndex,
870 if (!parser[keyIndex].ThereIs)
873 UString name = parser[keyIndex].PostStrings.Back();
947 static void SetBoolPair(NCommandLineParser::CParser &parser, unsigned switchID, CBoolPair &bp)
949 bp.Def = parser[switchID].ThereIs;
951 bp.Val = !parser[switchID].WithMinus;
956 const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
964 options.TechMode = parser[NKey::kTechMode].ThereIs;
965 if (parser[NKey::kHash].ThereIs)
966 options.HashMethods = parser[NKey::kHash].PostStrings;
968 if (parser[NKey::kElimDup].ThereIs)
971 options.ExtractOptions.ElimDup.Val = !parser[NKey::kElimDup].WithMinus;
975 bool fullPathMode = parser[NKey::kFullPathMode].ThereIs;
979 const UString &s = parser[NKey::kFullPathMode].PostStrings[0];
990 if (parser[NKey::kRecursed].ThereIs)
991 recursedType = GetRecursedTypeFromIndex(parser[NKey::kRecursed].PostCharIndex);
996 if (parser[NKey::kDisableWildcardParsing].ThereIs)
999 g_CodePage = FindCharset(parser, NKey::kConsoleCharSet, true, -1);
1000 Int32 codePage = FindCharset(parser, NKey::kListfileCharSet, false, CP_UTF8);
1004 if (parser[NKey::kInclude].ThereIs)
1008 parser[NKey::kInclude].PostStrings, true, recursedType, wildcardMatching, codePage);
1011 if (parser[NKey::kExclude].ThereIs)
1013 parser[NKey::kExclude].PostStrings, false, recursedType, wildcardMatching, codePage);
1016 bool thereIsArchiveName = !parser[NKey::kNoArName].ThereIs &&
1028 if (parser[NKey::kArcNameMode].ThereIs)
1029 options.UpdateOptions.ArcNameMode = ParseArcNameMode(parser[NKey::kArcNameMode].PostCharIndex);
1045 options.YesToAll = parser[NKey::kYes].ThereIs;
1049 options.PasswordEnabled = parser[NKey::kPassword].ThereIs;
1051 options.Password = parser[NKey::kPassword].PostStrings[0];
1054 options.ShowDialog = parser[NKey::kShowDialog].ThereIs;
1056 if (parser[NKey::kArchiveType].ThereIs)
1057 options.ArcType = parser[NKey::kArchiveType].PostStrings[0];
1059 options.ExcludedArcTypes = parser[NKey::kExcludedArcType].PostStrings;
1061 SetMethodOptions(parser, options.Properties);
1063 options.EnablePercents = !parser[NKey::kDisablePercents].ThereIs;
1072 if (parser[NKey::kNtSecurity].ThereIs) options.NtSecurity.SetTrueTrue();
1074 SetBoolPair(parser, NKey::kAltStreams, options.AltStreams);
1075 SetBoolPair(parser, NKey::kHardLinks, options.HardLinks);
1076 SetBoolPair(parser, NKey::kSymLinks, options.SymLinks);
1098 nt.ReplaceColonForAltStream = parser[NKey::kReplaceColonForAltStream].ThereIs;
1099 nt.WriteToAltStreamIfColon = parser[NKey::kWriteToAltStreamIfColon].ThereIs;
1111 if (parser[NKey::kArInclude].ThereIs)
1112 AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArInclude].PostStrings, true, NRecursedType::kNonRecursed, wildcardMatching, codePage);
1113 if (parser[NKey::kArExclude].ThereIs)
1114 AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArExclude].PostStrings, false, NRecursedType::kNonRecursed, wildcardMatching, codePage);
1129 UString arcName = parser[NKey::kStdIn].PostStrings.Front();
1148 if (parser[NKey::kOutputDir].ThereIs)
1150 eo.OutputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
1155 if (parser[NKey::kOverwrite].ThereIs)
1157 eo.OverwriteMode = k_OverwriteModes[parser[NKey::kOverwrite].PostCharIndex];
1181 if (parser[NKey::kArInclude].ThereIs)
1186 SetAddCommandOptions(options.Command.CommandType, parser, updateOptions);
1190 if (parser[NKey::kShareForWrite].ThereIs)
1200 updateOptions.EMailMode = parser[NKey::kEmail].ThereIs;
1203 updateOptions.EMailAddress = parser[NKey::kEmail].PostStrings.Front();
1215 updateOptions.DeleteAfterCompressing = parser[NKey::kDeleteAfterCompressing].ThereIs;
1216 updateOptions.SetArcMTime = parser[NKey::kSetArcMTime].ThereIs;
1223 updateOptions.StdInFileName = parser[NKey::kStdIn].PostStrings.Front();
1247 if (parser[NKey::kShareForWrite].ThereIs)