From 8c212e3abb7f4343affeb5e9e1092b59d3b74075 Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Tue, 6 May 2014 17:51:47 +0200 Subject: Added reporting of version number to all program and stream file --- src/partial_sim.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/partial_sim.c') 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 #include +#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= Read reflections from .\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; -- cgit v1.2.3