Lines Matching full:argv
181 static bool parse_bool_arg(char * const* argv, char* const* stop, bool* var) {
182 if (argv < stop) {
183 *var = atoi(*argv) != 0;
342 int tool_main(int argc, char** argv);
343 int tool_main(int argc, char** argv) {
390 char* const* stop = argv + argc;
391 for (++argv; argv < stop; ++argv) {
392 if (strcmp(*argv, "-o") == 0) {
393 argv++;
394 if (argv < stop && **argv) {
395 outDir.set(*argv);
400 } else if (strcmp(*argv, "--repeat") == 0) {
401 argv++;
402 if (argv < stop) {
403 repeatDraw = atoi(*argv);
412 } else if (strcmp(*argv, "--logPerIter") == 0) {
414 } else if (strcmp(*argv, "--timers") == 0) {
415 argv++;
416 if (argv < stop) {
418 for (char* t = *argv; *t; ++t) {
432 } else if (!strcmp(*argv, "--rotate")) {
434 } else if (!strcmp(*argv, "--scale")) {
436 } else if (!strcmp(*argv, "--clip")) {
438 } else if (!strcmp(*argv, "--min")) {
440 } else if (strcmp(*argv, "--forceAA") == 0) {
441 if (!parse_bool_arg(++argv, stop, &forceAA)) {
446 } else if (strcmp(*argv, "--forceFilter") == 0) {
447 if (!parse_bool_arg(++argv, stop, &forceFilter)) {
452 } else if (strcmp(*argv, "--forceDither") == 0) {
454 if (!parse_bool_arg(++argv, stop, &tmp)) {
460 } else if (strcmp(*argv, "--forceBlend") == 0) {
462 if (!parse_bool_arg(++argv, stop, &wantAlpha)) {
469 } else if (strcmp(*argv
470 if (stop - argv > 2) {
471 gpuCacheSize.fBytes = atoi(*++argv);
472 gpuCacheSize.fCount = atoi(*++argv);
479 } else if (strcmp(*argv, "--mode") == 0) {
480 argv++;
481 if (argv < stop) {
482 if (strcmp(*argv, "normal") == 0) {
484 } else if (strcmp(*argv, "deferred") == 0) {
486 } else if (strcmp(*argv, "deferredSilent") == 0) {
488 } else if (strcmp(*argv, "record") == 0) {
490 } else if (strcmp(*argv, "picturerecord") == 0) {
502 } else if (strcmp(*argv, "--strokeWidth") == 0) {
503 argv++;
504 if (argv < stop) {
505 const char *strokeWidthStr = *argv;
517 } else if (strcmp(*argv, "--match") == 0) {
518 argv++;
519 while (argv < stop && (*argv)[0] != '-') {
520 *fMatches.append() = *argv++;
522 argv--;
528 } else if (strcmp(*argv, "--config") == 0) {
529 argv++;
530 if (argv < stop) {
531 int index = findConfig(*argv);
537 str.printf("unrecognized config %s\n", *argv);
547 } else if (strcmp(*argv, "--logFile") == 0) {
548 argv++;
549 if (argv < stop) {
550 if (!logger.SetLogFile(*argv)) {
552 str.printf("Could not open %s for writing.", *argv);
561 } else if (strlen(*argv) > 2 && strncmp(*argv, "-D", 2) == 0) {
562 argv++;
563 if (argv < stop) {
564 defineDict.set(argv[-1] + 2, *argv);
570 } else if (strcmp(*argv, "--help") == 0 || strcmp(*argv, "-h") == 0) {
575 str.printf("unrecognized arg %s\n", *argv);
972 int main(int argc, char * const argv[]) {
973 return tool_main(argc, (char**) argv);