diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-07-30 20:42:56 -0700 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-07-30 20:42:56 -0700 |
commit | 80d7f1b7c216e9e2c9460525420267bb33e364ec (patch) | |
tree | 1e077e8905a53267fea4a9e5dd1c478daa342e5c /src | |
parent | 0b262aa61f587b69fd46c95841342886580f4946 (diff) |
get_hkl: Trap a few edge cases
Diffstat (limited to 'src')
-rw-r--r-- | src/get_hkl.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/get_hkl.c b/src/get_hkl.c index de5d74de..e298680d 100644 --- a/src/get_hkl.c +++ b/src/get_hkl.c @@ -357,9 +357,9 @@ int main(int argc, char *argv[]) char *holo_str = NULL; char *mero_str = NULL; char *expand_str = NULL; - SymOpList *holo; - SymOpList *mero; - SymOpList *expand; + SymOpList *holo = NULL; + SymOpList *mero = NULL; + SymOpList *expand = NULL; char *input_file = NULL; char *template = NULL; char *output = NULL; @@ -469,6 +469,13 @@ int main(int argc, char *argv[]) expand = NULL; } + if ( (expand != NULL) || (holo != NULL) || config_trimc + || config_multi ) { + if ( mero == NULL ) { + ERROR("You must specify the point group with -y.\n"); + } + } + input = read_reflections(input_file); if ( input == NULL ) { ERROR("Problem reading input file %s\n", input_file); @@ -478,7 +485,9 @@ int main(int argc, char *argv[]) STATUS("%i reflections in input.\n", num_reflections(input)); - if ( !config_trimc && check_list_symmetry(input, mero) ) { + if ( (mero != NULL) && !config_trimc + && check_list_symmetry(input, mero) ) + { ERROR("The input reflection list does not appear to" " have symmetry %s\n", symmetry_name(mero)); return 1; |