aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-18 18:19:29 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:33 +0100
commit8e9f89cb00f783b23b3c004976fb08b56819fe64 (patch)
treef95a0f7bb17632d238139502a321f9e8cc74038f /src/partial_sim.c
parent599c277480ee1d3d5a1a2ffb486e855b845c0dbe (diff)
Finish fixing compiler warnings
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 6dafc4ba..04838552 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -63,7 +63,7 @@ static void mess_up_cell(UnitCell *cell)
/* For each reflection in "partial", fill in what the intensity would be
* according to "full" */
static void calculate_partials(RefList *partial, double osf,
- RefList *full, const char *sym,
+ RefList *full, const SymOpList *sym,
int random_intensities)
{
Reflection *refl;
@@ -78,7 +78,7 @@ static void calculate_partials(RefList *partial, double osf,
double p, Ip, If;
get_indices(refl, &h, &k, &l);
- get_asymm(h, k, l, &h, &k, &l, sym);
+ get_asymm(sym, h, k, l, &h, &k, &l);
p = get_partiality(refl);
rfull = find_refl(full, h, k, l);
@@ -143,7 +143,8 @@ int main(int argc, char *argv[])
struct detector *det = NULL;
struct beam_params *beam = NULL;
RefList *full = NULL;
- char *sym = NULL;
+ char *sym_str = NULL;
+ SymOpList *sym;
UnitCell *cell = NULL;
struct quaternion orientation;
struct image image;
@@ -194,7 +195,7 @@ int main(int argc, char *argv[])
break;
case 'y' :
- sym = strdup(optarg);
+ sym_str = strdup(optarg);
break;
case 'n' :
@@ -246,6 +247,10 @@ int main(int argc, char *argv[])
}
free(geomfile);
+ if ( sym_str == NULL ) sym_str = strdup("1");
+ sym = get_pointgroup(sym_str);
+ free(sym_str);
+
/* Load (full) reflections */
if ( input_file != NULL ) {
@@ -258,7 +263,7 @@ int main(int argc, char *argv[])
free(input_file);
if ( check_list_symmetry(full, sym) ) {
ERROR("The input reflection list does not appear to"
- " have symmetry %s\n", sym);
+ " have symmetry %s\n", symmetry_name(sym));
return 1;
}
@@ -339,7 +344,7 @@ int main(int argc, char *argv[])
cell_free(cell);
free_detector_geometry(det);
free(beam);
- free(sym);
+ free_symoplist(sym);
reflist_free(full);
free(image.filename);