aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-10-17 15:49:03 -0700
committerThomas White <taw@bitwiz.org.uk>2012-10-17 15:49:03 -0700
commita5930e658811badd3953e1cced25da2a55ab5bbb (patch)
tree2afcbea1655b29598b9b3d1e5d36e2266d887ac6 /libcrystfel/src
parent7be8e22b41477178af57e0116ab097873b4d0145 (diff)
describe_symmetry(): More faff
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/symmetry.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c
index f9d9314c..584a79e5 100644
--- a/libcrystfel/src/symmetry.c
+++ b/libcrystfel/src/symmetry.c
@@ -1682,10 +1682,11 @@ static char *name_equiv(const struct sym_op *op)
void describe_symmetry(const SymOpList *s)
{
int i, n;
+ size_t max_len = 0;
n = num_equivs(s, NULL);
- STATUS("%15s :", symmetry_name(s));
+ STATUS("%15s : ", symmetry_name(s));
for ( i=0; i<n; i++ ) {
size_t len;
@@ -1698,17 +1699,17 @@ void describe_symmetry(const SymOpList *s)
for ( i=0; i<n; i++ ) {
char *name;
- size_t n, j;
+ size_t m, j;
name = name_equiv(&s->ops[i]);
- n = max_len - strlen(j) + 1;
+ m = (max_len - strlen(name)) + 3;
- for ( j=0; j<n; j++ ) {
+ STATUS("%s", name);
+ for ( j=0; j<m; j++ ) {
STATUS(" ");
}
- STATUS("%s", name);
free(name);
- if ( (i!=0) && (i%8==0) ) STATUS("\n%15s ", "");
+ if ( (i!=0) && (i%8==0) ) STATUS("\n%15s ", "");
}
STATUS("\n");
}