Chromium Code Reviews| Index: third_party/fuzzymatch/fuzzymatch.c |
| diff --git a/third_party/fuzzymatch/fuzzymatch.c b/third_party/fuzzymatch/fuzzymatch.c |
| index 889fc870b4f5f9db39d1587ed397c2a876f4f86f..572940fcefd6ff15939361473b5481aa433e4608 100644 |
| --- a/third_party/fuzzymatch/fuzzymatch.c |
| +++ b/third_party/fuzzymatch/fuzzymatch.c |
| @@ -53,6 +53,7 @@ |
| static int |
| usage(const char *argv0) { |
| fprintf(stderr, "Usage: %s [--highlight] [--no-ignore-scrollbars] " |
| + "[--output filename] " |
| "<input a> <input b>\n", argv0); |
| return 1; |
| } |
| @@ -64,6 +65,7 @@ main(int argc, char **argv) { |
| char highlight = 0; |
| char ignore_scrollbars = 1; |
| + char *output_filename = "highlight.png"; /* Default output filename. */ |
|
agl
2008/12/17 03:18:58
const
|
| int argi = 1; |
| @@ -72,6 +74,8 @@ main(int argc, char **argv) { |
| highlight = 1; |
| } else if (strcmp("--no-ignore-scrollbars", argv[argi]) == 0) { |
| ignore_scrollbars = 0; |
| + } else if (strcmp("--output", argv[argi]) == 0) { |
| + output_filename = argv[++argi]; |
|
agl
2008/12/17 03:18:58
if (argi + 1 >= argc) {
fprintf(stderr, "--outpu
|
| } else { |
| break; |
| } |
| @@ -142,7 +146,7 @@ main(int argc, char **argv) { |
| pixInvert(d2, d2); |
| pixAnd(d1, d1, d2); |
| pixPaintThroughMask(a, d1, 0, 0, 0xff << 24); |
| - pixWrite("highlight.png", a, IFF_PNG); |
| + pixWrite(output_filename, a, IFF_PNG); |
| } |
| return count > 0; |