Lines Matching refs:flag
106 static string PrintStringFlagsWithQuotes(const CommandLineFlagInfo& flag, in PrintStringFlagsWithQuotes() argument
108 const char* c_string = (current ? flag.current_value.c_str() : in PrintStringFlagsWithQuotes()
109 flag.default_value.c_str()); in PrintStringFlagsWithQuotes()
110 if (strcmp(flag.type.c_str(), "string") == 0) { // add quotes for strings in PrintStringFlagsWithQuotes()
119 string DescribeOneFlag(const CommandLineFlagInfo& flag) { in DescribeOneFlag() argument
122 flag.name.c_str(), in DescribeOneFlag()
123 flag.description.c_str()); in DescribeOneFlag()
169 AddString(string("type: ") + flag.type, &final_string, &chars_in_line); in DescribeOneFlag()
174 AddString(PrintStringFlagsWithQuotes(flag, "default", false), &final_string, in DescribeOneFlag()
176 if (!flag.is_default) { in DescribeOneFlag()
177 AddString(PrintStringFlagsWithQuotes(flag, "currently", true), in DescribeOneFlag()
200 static string DescribeOneFlagInXML(const CommandLineFlagInfo& flag) { in DescribeOneFlagInXML() argument
205 AddXMLTag(&r, "file", flag.filename); in DescribeOneFlagInXML()
206 AddXMLTag(&r, "name", flag.name); in DescribeOneFlagInXML()
207 AddXMLTag(&r, "meaning", flag.description); in DescribeOneFlagInXML()
208 AddXMLTag(&r, "default", flag.default_value); in DescribeOneFlagInXML()
209 AddXMLTag(&r, "current", flag.current_value); in DescribeOneFlagInXML()
210 AddXMLTag(&r, "type", flag.type); in DescribeOneFlagInXML()
273 for (vector<CommandLineFlagInfo>::const_iterator flag = flags.begin(); in ShowUsageWithFlagsMatching() local
274 flag != flags.end(); in ShowUsageWithFlagsMatching()
275 ++flag) { in ShowUsageWithFlagsMatching()
277 FileMatchesSubstring(flag->filename, substrings)) { in ShowUsageWithFlagsMatching()
279 if (flag->description == kStrippedFlagHelp) continue; in ShowUsageWithFlagsMatching()
281 if (flag->filename != last_filename) { // new file in ShowUsageWithFlagsMatching()
282 if (Dirname(flag->filename) != Dirname(last_filename)) { // new dir! in ShowUsageWithFlagsMatching()
287 fprintf(stdout, "\n Flags from %s:\n", flag->filename.c_str()); in ShowUsageWithFlagsMatching()
288 last_filename = flag->filename; in ShowUsageWithFlagsMatching()
291 fprintf(stdout, "%s", DescribeOneFlag(*flag).c_str()); in ShowUsageWithFlagsMatching()
326 for (vector<CommandLineFlagInfo>::const_iterator flag = flags.begin(); in ShowXMLOfFlags() local
327 flag != flags.end(); in ShowXMLOfFlags()
328 ++flag) { in ShowXMLOfFlags()
329 if (flag->description != kStrippedFlagHelp) in ShowXMLOfFlags()
330 fprintf(stdout, "%s\n", DescribeOneFlagInXML(*flag).c_str()); in ShowXMLOfFlags()
409 for (vector<CommandLineFlagInfo>::const_iterator flag = flags.begin(); in HandleCommandLineHelpFlags() local
410 flag != flags.end(); in HandleCommandLineHelpFlags()
411 ++flag) { in HandleCommandLineHelpFlags()
412 if (!FileMatchesSubstring(flag->filename, substrings)) in HandleCommandLineHelpFlags()
414 const string package = Dirname(flag->filename) + PATH_SEPARATOR; in HandleCommandLineHelpFlags()