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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 break; | 306 break; |
307 } | 307 } |
308 flag = flag->next(); | 308 flag = flag->next(); |
309 } | 309 } |
310 if (!flagMatched) { | 310 if (!flagMatched) { |
311 #if SK_BUILD_FOR_MAC | 311 #if SK_BUILD_FOR_MAC |
312 if (SkStrStartsWith(argv[i], "NSDocumentRevisions")) { | 312 if (SkStrStartsWith(argv[i], "NSDocumentRevisions")) { |
313 i++; // skip YES | 313 i++; // skip YES |
314 } else | 314 } else |
315 #endif | 315 #endif |
316 if (!FLAGS_undefok) { | 316 if (FLAGS_undefok) { |
317 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); | 317 SkDebugf("FYI: ignoring unknown flag '%s'.\n", argv[i]); |
| 318 } else { |
| 319 SkDebugf("Got unknown flag '%s'. Exiting.\n", argv[i]); |
318 exit(-1); | 320 exit(-1); |
319 } | 321 } |
320 } | 322 } |
321 } | 323 } |
322 } | 324 } |
323 // Since all of the flags have been set, release the memory used by each | 325 // Since all of the flags have been set, release the memory used by each |
324 // flag. FLAGS_x can still be used after this. | 326 // flag. FLAGS_x can still be used after this. |
325 SkFlagInfo* flag = gHead; | 327 SkFlagInfo* flag = gHead; |
326 gHead = NULL; | 328 gHead = NULL; |
327 while (flag != NULL) { | 329 while (flag != NULL) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 371 } |
370 | 372 |
371 } // namespace | 373 } // namespace |
372 | 374 |
373 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { | 375 bool SkCommandLineFlags::ShouldSkip(const SkTDArray<const char*>& strings, const
char* name) { |
374 return ShouldSkipImpl(strings, name); | 376 return ShouldSkipImpl(strings, name); |
375 } | 377 } |
376 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { | 378 bool SkCommandLineFlags::ShouldSkip(const StringArray& strings, const char* name
) { |
377 return ShouldSkipImpl(strings, name); | 379 return ShouldSkipImpl(strings, name); |
378 } | 380 } |
OLD | NEW |