summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-04 03:47:03 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-04 03:47:03 (GMT)
commite4d255a59196735dcbb4bbf283315e3e2a39c404 (patch)
tree32d3f2531ee47a0eabcd602c3a9c9dd074884da7 /gfx
parentd3156984f74dd3d8f3a66f0dd03f015888922919 (diff)
downloadeeshow-e4d255a59196735dcbb4bbf283315e3e2a39c404.zip
eeshow-e4d255a59196735dcbb4bbf283315e3e2a39c404.tar.gz
eeshow-e4d255a59196735dcbb4bbf283315e3e2a39c404.tar.bz2
main/eediff.c: take over file name processing from diff_args; remove --
Diffstat (limited to 'gfx')
-rw-r--r--gfx/diff.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/gfx/diff.c b/gfx/diff.c
index b075e43..b23370d 100644
--- a/gfx/diff.c
+++ b/gfx/diff.c
@@ -147,6 +147,7 @@ static void *diff_init(void)
diff->extra = 0;
diff->frame_radius = DEFAULT_FRAME_RADIUS;
diff->gfx = NULL;
+ diff->new_gfx = NULL;
return diff;
}
@@ -201,6 +202,9 @@ void *diff_process_file(struct diff *diff, struct file_names *file_names,
sch_free(&sch);
lib_free(&lib);
+ if (!diff->new_gfx)
+ diff->new_gfx = diff->gfx;
+
return diff->gfx;
fail_parse:
@@ -217,7 +221,6 @@ static bool diff_args(void *ctx, int argc, char *const *argv, const char *opts)
struct diff *diff = ctx;
const char *colon;
char c;
- struct file_names file_names;
while ((c = getopt(argc, argv, opts)) != EOF)
switch (c) {
@@ -240,21 +243,9 @@ static bool diff_args(void *ctx, int argc, char *const *argv, const char *opts)
break;
}
- if (argc - optind < 1)
- usage(*argv);
-
suppress_page_layout = 1;
- classify_files(&file_names, argv + optind, argc - optind);
- if (!file_names.pro && !file_names.sch)
- fatal("project or top sheet name required");
-
- diff->new_gfx = diff_process_file(diff, &file_names, argc, argv, opts);
- free_file_names(&file_names);
- if (!diff->new_gfx)
- return 0;
-
- return gfx_args(diff->gfx, argc, argv, opts);
+ return 1;
}