diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-02-27 22:52:27 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:16 +0100 |
commit | 0fec1e14ddf2af984a8b75b3caccb73e125127f9 (patch) | |
tree | f80ba776ba751b33949fdb30c32cb3f52c47c3eb /src/hdfsee.c | |
parent | 46397339dfbc924e7913d475f152df85400d2882 (diff) |
hdfsee: Tidy up lots of exit paths
Diffstat (limited to 'src/hdfsee.c')
-rw-r--r-- | src/hdfsee.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/hdfsee.c b/src/hdfsee.c index a7a3631f..282d0cc7 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -95,6 +95,7 @@ int main(int argc, char *argv[]) int colscale = SCALE_COLOUR; char *cscale = NULL; char *element = NULL; + char *geometry = NULL; /* Long options */ const struct option longopts[] = { @@ -106,6 +107,7 @@ int main(int argc, char *argv[]) {"filter-noise", 0, &config_noisefilter, 1}, {"colscale", 1, NULL, 'c'}, {"image", 1, NULL, 'e'}, + {"geometry", 1, NULL, 'g'}, {0, 0, NULL, 0} }; @@ -147,6 +149,10 @@ int main(int argc, char *argv[]) element = strdup(optarg); break; + case 'g' : + geometry = strdup(optarg); + break; + case 0 : break; @@ -183,13 +189,16 @@ int main(int argc, char *argv[]) boost, binning, config_cmfilter, config_noisefilter, - colscale, element); + colscale, element, + geometry); if ( main_window_list[i] == NULL ) { ERROR("Couldn't open display window\n"); } else { main_n_windows++; } } + + if ( main_n_windows == 0 ) return 0; gtk_main(); return 0; |