diff options
author | Thomas White <taw@physics.org> | 2020-07-29 15:44:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | 42898f7d59e215434fa2aead84223f64b30fcee8 (patch) | |
tree | 5cdfb4c0c279c766efcbbc6c455ee58a5c8741f1 /libcrystfel/src/reflist-utils.c | |
parent | 6105a7797b96418d940ced7d88c6cf2b308b9711 (diff) |
New way of injecting version information
Also, this fixes some incorrect headers and adds --version flags to
programs which didn't yet have them.
Diffstat (limited to 'libcrystfel/src/reflist-utils.c')
-rw-r--r-- | libcrystfel/src/reflist-utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcrystfel/src/reflist-utils.c b/libcrystfel/src/reflist-utils.c index 7a41f335..467a3007 100644 --- a/libcrystfel/src/reflist-utils.c +++ b/libcrystfel/src/reflist-utils.c @@ -41,6 +41,7 @@ #include "utils.h" #include "reflist-utils.h" #include "symmetry.h" +#include "libcrystfel-version.h" /** \file reflist-utils.h @@ -698,9 +699,8 @@ void reflist_add_command_and_version(RefList *list, int argc, char *argv[]) char *tmp; char vers[128]; - vers[0] = '\0'; - strcat(vers, "Generated by CrystFEL "); - strncat(vers, CRYSTFEL_VERSIONSTRING, 100); + snprintf(vers, 128, "Generated by CrystFEL %s", + libcrystfel_version_string()); reflist_add_notes(list, vers); tmp = full_command_line(argc, argv); |