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/hdfsee.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/hdfsee.c') diff --git a/src/hdfsee.c b/src/hdfsee.c index ea6de2b2..fa10cfa6 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -37,6 +37,7 @@ #include #include +#include "version.h" #include "dw-hdfsee.h" #include "utils.h" #include "render.h" @@ -54,6 +55,7 @@ static void show_help(const char *s) "Quick HDF5 image viewer.\n" "\n" " -h, --help Display this help message.\n" +" --version Print CrystFEL version number and exit.\n" "\n" " -p, --peak-overlay= Draw circles in positions listed in file.\n" " --ring-size= Set the size for those circles.\n" @@ -131,6 +133,7 @@ int main(int argc, char *argv[]) /* Long options */ const struct option longopts[] = { {"help", 0, NULL, 'h'}, + {"version", 0, NULL, 4 }, {"peak-overlay", 1, NULL, 'p'}, {"int-boost", 1, NULL, 'i'}, {"binning", 1, NULL, 'b'}, @@ -168,6 +171,11 @@ int main(int argc, char *argv[]) show_help(argv[0]); return 0; + case 4 : + printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n"); + printf(CRYSTFEL_BOILERPLATE"\n"); + return 0; + case 'p' : peaks = strdup(optarg); break; -- cgit v1.2.3