summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-03 18:11:50 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-03 22:52:24 (GMT)
commitcd197d8d8b34e3770ec49dfdc808427b2e1f0963 (patch)
tree6d113a0a97979d52309e463554c2209fc8151ae0 /main
parent487c2ed78ba10bdd089009fe88f21fbc276ee3b2 (diff)
downloadeeshow-cd197d8d8b34e3770ec49dfdc808427b2e1f0963.zip
eeshow-cd197d8d8b34e3770ec49dfdc808427b2e1f0963.tar.gz
eeshow-cd197d8d8b34e3770ec49dfdc808427b2e1f0963.tar.bz2
gfx/gfx.c: we now pass a combined option string to drivers
Further changes implied by this: - drivers can no longer receive arguments, only options - drivers have to ignore options they don't recognize
Diffstat (limited to 'main')
-rw-r--r--main/eediff.c7
-rw-r--r--main/eeplot.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/main/eediff.c b/main/eediff.c
index 3340d6b..16653f1 100644
--- a/main/eediff.c
+++ b/main/eediff.c
@@ -64,6 +64,9 @@ void usage(const char *name)
}
+#define OPTIONS "1evL:OPV"
+
+
int main(int argc, char **argv)
{
struct lib lib;
@@ -90,7 +93,7 @@ int main(int argc, char **argv)
if (dashdash == argc)
usage(*argv);
- while ((c = getopt(dashdash, argv, "1evL:OPV")) != EOF)
+ while ((c = getopt(dashdash, argv, OPTIONS)) != EOF)
switch (c) {
case '1':
one_sheet = 1;
@@ -145,7 +148,7 @@ int main(int argc, char **argv)
}
gfx = gfx_init(&diff_ops);
- if (!gfx_args(gfx, gfx_argc, gfx_argv))
+ if (!gfx_args(gfx, gfx_argc, gfx_argv, OPTIONS))
return 1;
if (!gfx_multi_sheet(gfx))
one_sheet = 1;
diff --git a/main/eeplot.c b/main/eeplot.c
index b0d78da..3a508b0 100644
--- a/main/eeplot.c
+++ b/main/eeplot.c
@@ -130,6 +130,9 @@ void usage(const char *name)
}
+#define OPTIONS "1evL:OPV"
+
+
int main(int argc, char **argv)
{
struct lib lib;
@@ -157,7 +160,7 @@ int main(int argc, char **argv)
if (dashdash == argc)
usage(*argv);
- while ((c = getopt(dashdash, argv, "1evL:OPV")) != EOF)
+ while ((c = getopt(dashdash, argv, OPTIONS)) != EOF)
switch (c) {
case '1':
one_sheet = 1;
@@ -214,7 +217,7 @@ int main(int argc, char **argv)
}
gfx = gfx_init(ops);
- if (!gfx_args(gfx, gfx_argc, gfx_argv))
+ if (!gfx_args(gfx, gfx_argc, gfx_argv, OPTIONS))
return 1;
if (!gfx_multi_sheet(gfx))
one_sheet = 1;