diff options
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/symmetry.c | 15 | ||||
-rw-r--r-- | libcrystfel/src/symmetry.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index eb6a9dfb..4fdc13c6 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -1690,3 +1690,18 @@ const char *symmetry_name(const SymOpList *ops) { return ops->name; } + + +/** + * set_symmetry_name: + * @ops: A %SymOpList + * @name: New name for the %SymOpList + * + * Sets the text description of @ops to @name. See symmetry_name(). + * @name will be copied, so you can safely free it after calling this function, + * if that's otherwise appropriate. + */ +void set_symmetry_name(SymOpList *ops, const char *name) +{ + ops->name = strdup(name); +} diff --git a/libcrystfel/src/symmetry.h b/libcrystfel/src/symmetry.h index 7c80522a..68f17991 100644 --- a/libcrystfel/src/symmetry.h +++ b/libcrystfel/src/symmetry.h @@ -77,6 +77,7 @@ extern int is_subgroup(const SymOpList *source, const SymOpList *target); extern int is_centrosymmetric(const SymOpList *s); extern const char *symmetry_name(const SymOpList *ops); +extern void set_symmetry_name(SymOpList *ops, const char *name); extern void describe_symmetry(const SymOpList *s); extern void add_symop(SymOpList *ops, IntegerMatrix *m); |