diff options
author | Thomas White <taw@physics.org> | 2015-03-18 11:16:44 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-03-18 14:54:58 +0100 |
commit | 10e50c61ecbc07e58639f28339dfa10ac22218ce (patch) | |
tree | 12560e779aa207805ae9032191a2b31d72828276 /libcrystfel/src/crystal.c | |
parent | 27da60fe69a1a755226f11607003aa9d7ae059c9 (diff) |
Add crystal_{get,set}_notes()
Diffstat (limited to 'libcrystfel/src/crystal.c')
-rw-r--r-- | libcrystfel/src/crystal.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c index e1ad5dfe..91c3fd52 100644 --- a/libcrystfel/src/crystal.c +++ b/libcrystfel/src/crystal.c @@ -69,6 +69,9 @@ struct _crystal /* User flag, e.g. for "this is a bad crystal". */ int user_flag; + + /* Text notes, which go in the stream */ + char *notes; }; @@ -95,6 +98,7 @@ Crystal *crystal_new() cryst->resolution_limit = 0.0; cryst->n_saturated = 0; cryst->n_implausible = 0; + cryst->notes = NULL; return cryst; } @@ -207,6 +211,12 @@ double crystal_get_mosaicity(Crystal *cryst) } +const char *crystal_get_notes(Crystal *cryst) +{ + return cryst->notes; +} + + /********************************** Setters ***********************************/ @@ -274,3 +284,10 @@ void crystal_set_mosaicity(Crystal *cryst, double m) { cryst->m = m; } + + +void crystal_set_notes(Crystal *cryst, const char *notes) +{ + free(cryst->notes); /* free(NULL) is OK */ + cryst->notes = strdup(notes); +} |