diff options
author | Thomas White <taw@physics.org> | 2021-06-28 18:10:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-06-28 18:10:55 +0200 |
commit | 0ed5cee753d2644271e57e530d1bc2d9e065e00c (patch) | |
tree | 8bebdff8956ebbb8dca11365e1f0b98ba43a5128 /src/starlet-fixture-display.c | |
parent | 2e09f09966a15aa838af9ae96daef702cac09569 (diff) |
Fixture display: Add --verbose
Diffstat (limited to 'src/starlet-fixture-display.c')
-rw-r--r-- | src/starlet-fixture-display.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/starlet-fixture-display.c b/src/starlet-fixture-display.c index 8f1d34c..2914b23 100644 --- a/src/starlet-fixture-display.c +++ b/src/starlet-fixture-display.c @@ -287,8 +287,9 @@ static struct fixture *find_fixture(struct fixture_display *fixd, static void show_help(const char *s) { printf(_("Syntax: %s [options]\n\n"), s); - printf(_("Show fixtures in Starlet" + printf(_("Show fixtures in Starlet\n" " -s, --socket REPL socket for Starlet process (default guile.socket).\n" + " -v, --verbose Show all REPL communications.\n" " -h, --help Display this help message.\n")); } @@ -466,16 +467,18 @@ int main(int argc, char *argv[]) GtkWidget *mainwindow; GtkWidget *da; char *socket = NULL; + int verbose = 0; gtk_init(&argc, &argv); const struct option longopts[] = { {"help", 0, NULL, 'h'}, {"socket", 1, NULL, 's'}, + {"verbose", 0, NULL, 'v'}, {0, 0, NULL, 0} }; - while ((c = getopt_long(argc, argv, "h", longopts, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "hvs:", longopts, NULL)) != -1) { switch (c) { @@ -487,6 +490,10 @@ int main(int argc, char *argv[]) socket = strdup(optarg); break; + case 'v' : + verbose = 1; + break; + case 0 : break; @@ -535,7 +542,7 @@ int main(int argc, char *argv[]) g_timeout_add(50, redraw_cb, &fixd); - fixd.repl = repl_connection_new(socket, process_line, &fixd); + fixd.repl = repl_connection_new(socket, process_line, &fixd, verbose); repl_send(fixd.repl, "(list 'patched-fixtures (patched-fixture-names))"); gtk_main(); |