diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2014-11-10 14:26:45 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-11-10 18:59:34 +0100 |
commit | e3135a2154b1aa1c137664030972a09e50b7f1d8 (patch) | |
tree | d29d9afc83084411065b0219c3b0c43af551d53d /src/hdfsee.c | |
parent | 44fa1b1c46f9cd52fb0f0842a09b1d499e3cf08c (diff) |
Copy and Replace when saving geometry
Diffstat (limited to 'src/hdfsee.c')
-rw-r--r-- | src/hdfsee.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/hdfsee.c b/src/hdfsee.c index cc35b6e0..cdf4ae92 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -117,6 +117,7 @@ int main(int argc, char *argv[]) size_t i; int nfiles; char *peaks = NULL; + char *geom_filename = NULL; double boost = 1.0; int binning = 2; int config_noisefilter = 0; @@ -213,7 +214,9 @@ int main(int argc, char *argv[]) break; case 'g' : - det_geom = get_detector_geometry(optarg, &cbeam); + geom_filename = strdup(optarg); + det_geom = get_detector_geometry(geom_filename, &cbeam); + if ( det_geom == NULL ) { ERROR("Failed to read detector geometry from '%s'\n", optarg); @@ -293,8 +296,8 @@ int main(int argc, char *argv[]) free(cscale); for ( i=0; i<nfiles; i++ ) { - main_window_list[i] = displaywindow_open(argv[optind+i], peaks, - boost, binning, + main_window_list[i] = displaywindow_open(argv[optind+i], geom_filename, + peaks, boost, binning, config_noisefilter, config_calibmode, colscale, element, |