Lines Matching refs:parser

904     const CParser &parser,

926 if (parser[NKey::kUpdate].ThereIs)
927 ParseUpdateCommandString(options, parser[NKey::kUpdate].PostStrings,
929 if (parser[NKey::kWorkingDir].ThereIs)
931 const UString &postString = parser[NKey::kWorkingDir].PostStrings[0];
937 options.SfxMode = parser[NKey::kSfx].ThereIs;
939 options.SfxModule = us2fs(parser[NKey::kSfx].PostStrings[0]);
941 if (parser[NKey::kVolume].ThereIs)
943 const UStringVector &sv = parser[NKey::kVolume].PostStrings;
956 static void SetMethodOptions(const CParser &parser, CObjectVector<CProperty> &properties)
958 if (parser[NKey::kProperty].ThereIs)
960 FOR_VECTOR (i, parser[NKey::kProperty].PostStrings)
963 prop.Name = parser[NKey::kProperty].PostStrings[i];
997 if (!parser.ParseStrings(kSwitchForms, Z7_ARRAY_SIZE(kSwitchForms), commandStrings))
998 throw CArcCmdLineException(parser.ErrorMessage, parser.ErrorLine);
1004 options.HelpMode = parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs || parser[NKey::kHelp3].ThereIs;
1006 options.StdInMode = parser[NKey::kStdIn].ThereIs;
1007 options.StdOutMode = parser[NKey::kStdOut].ThereIs;
1008 options.EnableHeaders = !parser[NKey::kDisableHeaders].ThereIs;
1009 if (parser[NKey::kListFields].ThereIs)
1011 const UString &s = parser[NKey::kListFields].PostStrings[0];
1014 options.TechMode = parser[NKey::kTechMode].ThereIs;
1015 options.ShowTime = parser[NKey::kShowTime].ThereIs;
1017 if (parser[NKey::kDisablePercents].ThereIs
1025 SetStreamMode(parser[NKey::kOutStream], options.Number_for_Out);
1026 SetStreamMode(parser[NKey::kErrStream], options.Number_for_Errors);
1027 SetStreamMode(parser[NKey::kPercentStream], options.Number_for_Percents);
1029 if (parser[NKey::kLogLevel].ThereIs)
1031 const UString &s = parser[NKey::kLogLevel].PostStrings[0];
1043 if (parser[NKey::kCaseSensitive].ThereIs)
1046 g_CaseSensitive = !parser[NKey::kCaseSensitive].WithMinus;
1057 if (parser[NKey::kLargePages].ThereIs)
1060 const UString &s = parser[NKey::kLargePages].PostStrings[0];
1095 if (parser[NKey::kAffinity].ThereIs)
1097 const UString &s = parser[NKey::kAffinity].PostStrings[0];
1190 static Int32 FindCharset(const NCommandLineParser::CParser &parser, unsigned keyIndex,
1193 if (!parser[keyIndex].ThereIs)
1196 UString name (parser[keyIndex].PostStrings.Back());
1214 static void SetBoolPair(NCommandLineParser::CParser &parser, unsigned switchID, CBoolPair &bp)
1216 bp.Def = parser[switchID].ThereIs;
1218 bp.Val = !parser[switchID].WithMinus;
1223 const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
1231 if (parser[NKey::kHash].ThereIs)
1232 options.HashMethods = parser[NKey::kHash].PostStrings;
1235 if (parser[NKey::kHashGenFile].ThereIs)
1237 const UString &s = parser[NKey::kHashGenFile].PostStrings[0];
1252 if (parser[NKey::kHashDir].ThereIs)
1253 options.ExtractOptions.HashDir = parser[NKey::kHashDir].PostStrings[0];
1255 if (parser[NKey::kElimDup].ThereIs)
1258 options.ExtractOptions.ElimDup.Val = !parser[NKey::kElimDup].WithMinus;
1262 bool fullPathMode = parser[NKey::kFullPathMode].ThereIs;
1266 const UString &s = parser[NKey::kFullPathMode].PostStrings[0];
1276 if (parser[NKey::kNameTrailReplace].ThereIs)
1277 g_PathTrailReplaceMode = !parser[NKey::kNameTrailReplace].WithMinus;
1281 if (parser[NKey::kRecursed].ThereIs)
1282 nop.RecursedType = GetRecursedTypeFromIndex(parser[NKey::kRecursed].PostCharIndex);
1284 if (parser[NKey::kDisableWildcardParsing].ThereIs)
1287 if (parser[NKey::kUseSlashMark].ThereIs)
1289 const UString &s = parser[NKey::kUseSlashMark].PostStrings[0];
1301 options.ConsoleCodePage = FindCharset(parser, NKey::kConsoleCharSet, true, -1);
1303 UInt32 codePage = (UInt32)FindCharset(parser, NKey::kListfileCharSet, false, CP_UTF8);
1307 if (parser[NKey::kInclude].ThereIs)
1312 parser[NKey::kInclude].PostStrings, nop, codePage);
1315 if (parser[NKey::kExclude].ThereIs)
1319 parser[NKey::kExclude].PostStrings, nop, codePage);
1323 bool thereIsArchiveName = !parser[NKey::kNoArName].ThereIs &&
1335 if (parser[NKey::kArcNameMode].ThereIs)
1336 options.UpdateOptions.ArcNameMode = ParseArcNameMode(parser[NKey::kArcNameMode].PostCharIndex);
1353 nonSwitchStrings, parser.StopSwitchIndex,
1357 options.YesToAll = parser[NKey::kYes].ThereIs;
1361 options.PasswordEnabled = parser[NKey::kPassword].ThereIs;
1363 options.Password = parser[NKey::kPassword].PostStrings[0];
1366 options.ShowDialog = parser[NKey::kShowDialog].ThereIs;
1368 if (parser[NKey::kArchiveType].ThereIs)
1369 options.ArcType = parser[NKey::kArchiveType].PostStrings[0];
1371 options.ExcludedArcTypes = parser[NKey::kExcludedArcType].PostStrings;
1373 SetMethodOptions(parser, options.Properties);
1375 if (parser[NKey::kNtSecurity].ThereIs) options.NtSecurity.SetTrueTrue();
1377 SetBoolPair(parser, NKey::kAltStreams, options.AltStreams);
1378 SetBoolPair(parser, NKey::kHardLinks, options.HardLinks);
1379 SetBoolPair(parser, NKey::kSymLinks, options.SymLinks);
1381 SetBoolPair(parser, NKey::kStoreOwnerId, options.StoreOwnerId);
1382 SetBoolPair(parser, NKey::kStoreOwnerName, options.StoreOwnerName);
1385 SetBoolPair(parser, NKey::kSymLinks_AllowDangerous, symLinks_AllowDangerous);
1433 nt.ReplaceColonForAltStream = parser[NKey::kReplaceColonForAltStream].ThereIs;
1434 nt.WriteToAltStreamIfColon = parser[NKey::kWriteToAltStreamIfColon].ThereIs;
1438 if (parser[NKey::kPreserveATime].ThereIs)
1440 if (parser[NKey::kShareForWrite].ThereIs)
1444 if (parser[NKey::kZoneFile].ThereIs)
1447 const UString &s = parser[NKey::kZoneFile].PostStrings[0];
1473 if (parser[NKey::kArInclude].ThereIs)
1476 AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArInclude].PostStrings, nopArc, codePage);
1478 if (parser[NKey::kArExclude].ThereIs)
1481 AddSwitchWildcardsToCensor(arcCensor, parser[NKey::kArExclude].PostStrings, nopArc, codePage);
1499 options.ArcName_for_StdInMode = parser[NKey::kStdIn].PostStrings.Front();
1523 if (parser[NKey::kOutputDir].ThereIs)
1525 eo.OutputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
1533 if (parser[NKey::kOverwrite].ThereIs)
1535 eo.OverwriteMode = k_OverwriteModes[(unsigned)parser[NKey::kOverwrite].PostCharIndex];
1559 if (parser[NKey::kArInclude].ThereIs)
1564 SetAddCommandOptions(options.Command.CommandType, parser, updateOptions);
1568 if (parser[NKey::kPreserveATime].ThereIs)
1570 if (parser[NKey::kShareForWrite].ThereIs)
1572 if (parser[NKey::kStopAfterOpenError].ThereIs)
1585 updateOptions.EMailMode = parser[NKey::kEmail].ThereIs;
1588 updateOptions.EMailAddress = parser[NKey::kEmail].PostStrings.Front();
1600 updateOptions.DeleteAfterCompressing = parser[NKey::kDeleteAfterCompressing].ThereIs;
1601 updateOptions.SetArcMTime = parser[NKey::kSetArcMTime].ThereIs;
1618 updateOptions.StdInFileName = parser[NKey::kStdIn].PostStrings.Front();
1645 if (parser[NKey::kPreserveATime].ThereIs)
1647 if (parser[NKey::kShareForWrite].ThereIs)