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/partialator.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/partialator.c') diff --git a/src/partialator.c b/src/partialator.c index c1dedad8..e6069057 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -51,6 +51,7 @@ #include #include +#include "version.h" #include "post-refinement.h" #include "hrs-scaling.h" #include "scaling-report.h" @@ -63,6 +64,7 @@ static void show_help(const char *s) "Scaling and post refinement for coherent nanocrystallography.\n" "\n" " -h, --help Display this help message.\n" +" --version Print CrystFEL version number and exit.\n" "\n" " -i, --input= Specify the name of the input 'stream'.\n" " -o, --output= Output filename. Default: partialator.hkl.\n" @@ -353,6 +355,7 @@ int main(int argc, char *argv[]) const struct option longopts[] = { {"help", 0, NULL, 'h'}, + {"version", 0, NULL, 3 }, {"input", 1, NULL, 'i'}, {"output", 1, NULL, 'o'}, {"symmetry", 1, NULL, 'y'}, @@ -388,6 +391,11 @@ int main(int argc, char *argv[]) show_help(argv[0]); return 0; + case 3 : + printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n"); + printf(CRYSTFEL_BOILERPLATE"\n"); + return 0; + case 'i' : infile = strdup(optarg); break; -- cgit v1.2.3