summaryrefslogtreecommitdiff
path: root/main/eeshow.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2017-05-07 00:12:57 (GMT)
committerWerner Almesberger <werner@almesberger.net>2017-05-07 00:12:57 (GMT)
commitf405999fbaf5615f55f68adc3396566a66b562d7 (patch)
tree29533c0eabd5ab6da83f6f2c193162ad123a1b07 /main/eeshow.c
parent076f5639036b136fe237856390c66b7fed18ebaf (diff)
downloadeeshow-f405999fbaf5615f55f68adc3396566a66b562d7.zip
eeshow-f405999fbaf5615f55f68adc3396566a66b562d7.tar.gz
eeshow-f405999fbaf5615f55f68adc3396566a66b562d7.tar.bz2
new undocumented option "-C width" to set component pop-up width (0: fit content)
Diffstat (limited to 'main/eeshow.c')
-rw-r--r--main/eeshow.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/main/eeshow.c b/main/eeshow.c
index ec072b6..8a4313e 100644
--- a/main/eeshow.c
+++ b/main/eeshow.c
@@ -1,8 +1,8 @@
/*
* main/eeshow.c - Visualize Eeschema schematics
*
- * Written 2016 by Werner Almesberger
- * Copyright 2016 by Werner Almesberger
+ * Written 2016-2017 by Werner Almesberger
+ * Copyright 2016-2017 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,6 +48,8 @@ void usage(const char *name)
" -d file.doc_db\n"
" load documentation database file (experimental)\n"
" -v increase verbosity of diagnostic output\n"
+" -C width\n"
+" set width of component pop-up (0: fit content; default is %u)\n"
" -E shell_command ...\n"
" execute the specified shell command when the GUI is ready.\n"
" Sets EESHOW_WINDOW_ID to the X11 window ID.\n"
@@ -55,7 +57,7 @@ void usage(const char *name)
" -P use Pango to render text (experimental, slow)\n"
" -V print revision (version) number and exit\n"
" gdb run eeshow under gdb\n"
- , name, name, name);
+ , name, name, name, comp_pop_width);
exit(1);
}
@@ -75,7 +77,7 @@ int main(int argc, char **argv)
gtk_init(&argc, &argv);
setlocale(LC_ALL, "C"); /* restore sanity */
- while ((c = getopt(argc, argv, "1d:hvE:LN:OPV")) != EOF)
+ while ((c = getopt(argc, argv, "1d:hvC:E:LN:OPV")) != EOF)
switch (c) {
case '1':
one_sheet = 1;
@@ -86,6 +88,9 @@ int main(int argc, char **argv)
case 'v':
verbose++;
break;
+ case 'C':
+ comp_pop_width = atoi(optarg);
+ break;
case 'E':
commands = realloc_type_n(commands, const char *,
n_commands + 1);