summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-04-19 10:02:22 -0700
committerCarl Worth <cworth@cworth.org>2007-04-25 11:27:32 -0700
commita8d4fed67a32c6040c27615e063466d654b55a3a (patch)
treeb8d04ff67bf41f63b365c0098aa4fd90dfe12717
parentfe9dd719561048af1f2c3c8c43e46f7d97575053 (diff)
cairo-perf-diff-files: Remove some overzealous option parsing.
The code was complicated and confusing, and only existed to implement undocumented and unneeded command-line options.
-rw-r--r--perf/cairo-perf-diff-files.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index e5383793b..b07b792cd 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -639,18 +639,17 @@ parse_args(int argc,
char const **argv,
cairo_perf_diff_files_args_t *args)
{
-#define is_yesno_opt(opt) !(strcmp ("--no-" opt, argv[i]) && strcmp ("--" opt, argv[i]))
int i;
int have_minchange = 0;
- for (i=1; i<argc; i++) {
- if (is_yesno_opt("utf")) {
- args->use_utf = 0 != strncmp ("--no-", argv[i], 4);
+ for (i = 1; i < argc; i++) {
+ if (strcmp (argv[i], "--no-utf") == 0) {
+ args->use_utf = 0;
}
- else if (is_yesno_opt("bars")) {
- args->print_change_bars = 0 != strncmp ("--no-", argv[i], 4);
+ else if (strcmp (argv[i], "--no-bars") == 0) {
+ args->print_change_bars = 0;
}
- else if (strcmp(argv[i], "--use-ms") == 0) {
+ else if (strcmp (argv[i], "--use-ms") == 0) {
args->use_ms = 1;
}
else if (!args->old_filename) {