aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-10-17 15:29:31 -0700
committerThomas White <taw@physics.org>2012-10-17 15:29:31 -0700
commitf544a0f2334e84585db745d200c6b188b2dcd3aa (patch)
treed6bf2f0969c8fbe60c11c69e574424c7e6a9447c
parentf90404e85f5dcdbe9022b0a058412812ddea5f44 (diff)
describe_symmetry: Improve padding
-rw-r--r--libcrystfel/src/symmetry.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c
index 5cc073b4..f9d9314c 100644
--- a/libcrystfel/src/symmetry.c
+++ b/libcrystfel/src/symmetry.c
@@ -1688,8 +1688,25 @@ void describe_symmetry(const SymOpList *s)
STATUS("%15s :", symmetry_name(s));
for ( i=0; i<n; i++ ) {
+ size_t len;
char *name = name_equiv(&s->ops[i]);
- STATUS(" %6s", name);
+ len = strlen(name);
+ if ( len > max_len ) max_len = len;
+ free(name);
+ }
+
+ for ( i=0; i<n; i++ ) {
+
+ char *name;
+ size_t n, j;
+
+ name = name_equiv(&s->ops[i]);
+ n = max_len - strlen(j) + 1;
+
+ for ( j=0; j<n; j++ ) {
+ STATUS(" ");
+ }
+ STATUS("%s", name);
free(name);
if ( (i!=0) && (i%8==0) ) STATUS("\n%15s ", "");
}