Lines Matching +full:linebreak +full:- +full:style
4 * Use of this source code is governed by a BSD-style license that can be
24 info->fDefaultString.set(defaultValue); in CreateStringFlag()
26 info->fStrings = pStrings; in CreateStringFlag()
33 pStrings->reset(); in SetDefaultStrings()
51 size_t length = end - begin; in SetDefaultStrings()
52 pStrings->append(begin, length); in SetDefaultStrings()
72 * @param string C style string to parse.
93 if (SkStrStartsWith(string, '-') && strlen(string) > 1) { in match()
96 if (SkStrStartsWith(string, '-') && strlen(string) > 1) { in match()
106 if (compareName->equals(string)) { in match()
133 return compareName->equals(string); in match()
156 int lineBreak = SkStrFind(currLine, "\n"); in print_indented() local
157 if (lineBreak < 0) { in print_indented()
158 lineBreak = static_cast<int>(strlen(currLine)); in print_indented()
160 if (lineBreak > LINE_LENGTH) { in print_indented()
163 int spaceIndex = LINE_LENGTH - 1; in print_indented()
165 spaceIndex--; in print_indented()
180 lineBreak++; in print_indented()
181 SkDebugf(" %.*s", lineBreak, currLine); in print_indented()
182 currLine += lineBreak; in print_indented()
188 SkDebugf(" --%s", flag->name().c_str()); in print_help_for_flag()
189 const SkString& shortName = flag->shortName(); in print_help_for_flag()
191 SkDebugf(" or -%s", shortName.c_str()); in print_help_for_flag()
193 SkDebugf(":\ttype: %s", flag->typeAsString().c_str()); in print_help_for_flag()
194 if (flag->defaultValue().size() > 0) { in print_help_for_flag()
195 SkDebugf("\tdefault: %s", flag->defaultValue().c_str()); in print_help_for_flag()
198 const SkString& help = flag->help(); in print_help_for_flag()
204 print_indented(flag->extendedHelp()); in print_extended_help_for_flag()
211 return strcmp(a->name().c_str(), b->name().c_str()) < 0; in operator ()()
230 if (0 == strcmp("-h", argv[i]) || 0 == strcmp("--help", argv[i])) { in Parse()
234 if (SkStrStartsWith(argv[j], '-')) { in Parse()
248 // If no flags followed --help, print them all in Parse()
250 for (SkFlagInfo* flag = CommandLineFlags::gHead; flag; flag = flag->next()) { in Parse()
256 if (flag->extendedHelp().size() > 0) { in Parse()
257 SkDebugf(" Use '--help %s' for more information.\n", in Parse()
258 flag->name().c_str()); in Parse()
262 for (SkFlagInfo* flag = CommandLineFlags::gHead; flag; flag = flag->next()) { in Parse()
264 if (flag->name().equals(helpFlags[k]) || in Parse()
265 flag->shortName().equals(helpFlags[k])) { in Parse()
276 SkDebugf(" --%s\n", helpFlags[k]); in Parse()
286 if (flag->match(argv[startI])) { in Parse()
290 SkASSERT(matchedFlag->getFlagType() == flag->getFlagType()); in Parse()
294 switch (flag->getFlagType()) { in Parse()
298 if (i + 1 < argc && !SkStrStartsWith(argv[i + 1], '-')) { in Parse()
302 flag->setBool(value); in Parse()
307 flag->resetStrings(); in Parse()
313 if (end == argv[i + 1] && SkStrStartsWith(argv[i + 1], '-')) { in Parse()
317 flag->append(argv[i]); in Parse()
322 flag->setInt(atoi(argv[i])); in Parse()
326 flag->setDouble(atof(argv[i])); in Parse()
331 flag = flag->next(); in Parse()
336 SkStrStartsWith(argv[i], "-NSDocumentRevisions")) { in Parse()
341 exit(-1); in Parse()
350 SkFlagInfo* next = flag->next(); in Parse()
372 matchLen--; in ShouldSkipImpl()
376 matchLen--; in ShouldSkipImpl()
378 if ((matchEnd = matchName[matchLen - 1] == '$')) { in ShouldSkipImpl()
379 matchLen--; in ShouldSkipImpl()
385 strncmp(name + testLen - matchLen, matchName, matchLen) == 0 in ShouldSkipImpl()