aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2014-05-06 17:51:47 +0200
committerThomas White <taw@physics.org>2014-05-21 16:04:23 +0200
commit8c212e3abb7f4343affeb5e9e1092b59d3b74075 (patch)
treefd6629a34ebe77b2fc0ac9afc77eb5ffff77c9af /src/partial_sim.c
parent2658f7ca3fbdd0f037b9286812e6967b42517c0d (diff)
Added reporting of version number to all program and stream file
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index e1e0a4b4..17603d70 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -41,6 +41,7 @@
#include <pthread.h>
#include <gsl/gsl_rng.h>
+#include "version.h"
#include "image.h"
#include "utils.h"
#include "reflist-utils.h"
@@ -214,7 +215,8 @@ static void show_help(const char *s)
printf(
"Generate a stream containing partials from a reflection list.\n"
"\n"
-" -h, --help Display this help message.\n"
+" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
"\n"
"You need to provide the following basic options:\n"
" -i, --input=<file> Read reflections from <file>.\n"
@@ -440,6 +442,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 8 },
{"output", 1, NULL, 'o'},
{"input", 1, NULL, 'i'},
{"beam", 1, NULL, 'b'},
@@ -471,6 +474,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 8 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'i' :
input_file = strdup(optarg);
break;