| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" |
| 9 #include "SkTDArray.h" | 9 #include "SkTDArray.h" |
| 10 #include "SkTSort.h" | 10 #include "SkTSort.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 break; | 305 break; |
| 306 default: | 306 default: |
| 307 SkDEBUGFAIL("Invalid flag type"); | 307 SkDEBUGFAIL("Invalid flag type"); |
| 308 } | 308 } |
| 309 break; | 309 break; |
| 310 } | 310 } |
| 311 flag = flag->next(); | 311 flag = flag->next(); |
| 312 } | 312 } |
| 313 if (!flagMatched) { | 313 if (!flagMatched) { |
| 314 #if SK_BUILD_FOR_MAC | 314 #if SK_BUILD_FOR_MAC |
| 315 if (SkStrStartsWith(argv[i], "NSDocumentRevisions")) { | 315 if (SkStrStartsWith(argv[i], "NSDocumentRevisions") |
| 316 i++; // skip YES | 316 || SkStrStartsWith(argv[i], "-NSDocumentRevisions")) { |
| 317 i++; // skip YES |
| 317 } else | 318 } else |
| 318 #endif | 319 #endif |
| 319 if (FLAGS_undefok) { | 320 if (FLAGS_undefok) { |
| 320 SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); | 321 SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); |
| 321 } else { | 322 } else { |
| 322 SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); | 323 SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); |
| 323 exit(-1); | 324 exit(-1); |
| 324 } | 325 } |
| 325 } | 326 } |
| 326 } | 327 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 375 } |
| 375 | 376 |
| 376 } // namespace | 377 } // namespace |
| 377 | 378 |
| 378 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { | 379 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { |
| 379 return ShouldSkipImpl(strings, name); | 380 return ShouldSkipImpl(strings, name); |
| 380 } | 381 } |
| 381 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { | 382 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { |
| 382 return ShouldSkipImpl(strings, name); | 383 return ShouldSkipImpl(strings, name); |
| 383 } | 384 } |
| OLD | NEW |