aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent2658f7ca3fbdd0f037b9286812e6967b42517c0d (diff)
Added reporting of version number to all program and stream file
Diffstat (limited to 'src')
-rw-r--r--src/ambigator.c8
-rw-r--r--src/cell_explorer.c9
-rw-r--r--src/check_hkl.c8
-rw-r--r--src/compare_hkl.c9
-rw-r--r--src/get_hkl.c8
-rw-r--r--src/hdfsee.c8
-rw-r--r--src/indexamajig.c8
-rw-r--r--src/partial_sim.c10
-rw-r--r--src/partialator.c8
-rw-r--r--src/pattern_sim.c8
-rw-r--r--src/process_hkl.c8
-rw-r--r--src/render_hkl.c8
12 files changed, 98 insertions, 2 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index bbc89c32..1c11578d 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -44,6 +44,7 @@
#include <gsl/gsl_permutation.h>
#include <gsl/gsl_randist.h>
+#include "version.h"
#include <image.h>
#include <utils.h>
#include <symmetry.h>
@@ -63,6 +64,7 @@ static void show_help(const char *s)
"\n"
" -h, --help Display this help message.\n"
"\n"
+" --version Print CrystFEL version number and exit.\n"
" -o, --output=<filename> Output stream.\n"
" -y, --symmetry=<sym> Actual (\"target\") symmetry.\n"
" -w <sym> Apparent (\"source\" or \"twinned\") symmetry.\n"
@@ -824,6 +826,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 10 },
{"output", 1, NULL, 'o'},
{"symmetry", 1, NULL, 'y'},
{"iterations", 1, NULL, 'n'},
@@ -852,6 +855,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 10 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'o' :
outfile = strdup(optarg);
break;
diff --git a/src/cell_explorer.c b/src/cell_explorer.c
index 1087ce54..0df5032c 100644
--- a/src/cell_explorer.c
+++ b/src/cell_explorer.c
@@ -40,6 +40,7 @@
#include <gdk/gdkkeysyms.h>
#include <gsl/gsl_multifit_nlin.h>
+#include "version.h"
#include "stream.h"
#include "image.h"
#include "utils.h"
@@ -55,6 +56,8 @@ static void show_help(const char *s)
"Examine cell parameter histograms.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
+
);
}
@@ -1214,6 +1217,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 1 },
{0, 0, NULL, 0}
};
@@ -1227,6 +1231,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 1 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
default :
return 1;
diff --git a/src/check_hkl.c b/src/check_hkl.c
index 1ba55313..dc376779 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -39,6 +39,7 @@
#include <getopt.h>
#include <gsl/gsl_fit.h>
+#include "version.h"
#include "utils.h"
#include "statistics.h"
#include "symmetry.h"
@@ -54,6 +55,7 @@ static void show_help(const char *s)
"Characterise an intensity list.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
" -y, --symmetry=<sym> The symmetry of the input file.\n"
" -p, --pdb=<filename> PDB file to use.\n"
" --rmin=<res> Low resolution cutoff (1/d in m^-1).\n"
@@ -710,6 +712,7 @@ int main(int argc, char *argv[])
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 9 },
{"symmetry", 1, NULL, 'y'},
{"pdb", 1, NULL, 'p'},
@@ -738,6 +741,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 9 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'y' :
sym_str = strdup(optarg);
break;
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index d2173aff..e10b93aa 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -42,13 +42,13 @@
#include <gsl/gsl_errno.h>
#include <gsl/gsl_statistics.h>
+#include "version.h"
#include "utils.h"
#include "statistics.h"
#include "symmetry.h"
#include "reflist-utils.h"
#include "cell-utils.h"
-
enum fom
{
FOM_R1I,
@@ -109,6 +109,7 @@ static void show_help(const char *s)
" --intensity-shells Use shells of intensity instead of resolution.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
);
}
@@ -935,6 +936,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 10 },
{"symmetry", 1, NULL, 'y'},
{"pdb", 1, NULL, 'p'},
{"rmin", 1, NULL, 2},
@@ -962,6 +964,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 10 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'y' :
sym_str = strdup(optarg);
break;
diff --git a/src/get_hkl.c b/src/get_hkl.c
index ae82858c..caeccd60 100644
--- a/src/get_hkl.c
+++ b/src/get_hkl.c
@@ -38,6 +38,7 @@
#include <unistd.h>
#include <getopt.h>
+#include "version.h"
#include "utils.h"
#include "reflist-utils.h"
#include "symmetry.h"
@@ -53,6 +54,7 @@ static void show_help(const char *s)
"Manipulate reflection lists.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
"\n"
" -i, --input=<file> Read reflections from <file>.\n"
" -y, --symmetry=<sym> The symmetry of the input reflection list.\n"
@@ -418,6 +420,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 5 },
{"template", 1, NULL, 't'},
{"poisson", 0, &config_poisson, 1},
{"noise", 0, &config_noise, 1},
@@ -446,6 +449,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 5 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 't' :
template = strdup(optarg);
break;
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 <gtk/gtk.h>
#include <getopt.h>
+#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=<filename> Draw circles in positions listed in file.\n"
" --ring-size=<n> 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;
diff --git a/src/indexamajig.c b/src/indexamajig.c
index c41b1487..143a0d82 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -54,6 +54,7 @@
#include <sys/time.h>
#endif
+#include "version.h"
#include "utils.h"
#include "hdf5-file.h"
#include "index.h"
@@ -78,6 +79,7 @@ static void show_help(const char *s)
"Process and index FEL diffraction images.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
"\n"
" -i, --input=<filename> Specify file containing list of images to process.\n"
" '-' means stdin, which is the default.\n"
@@ -247,6 +249,7 @@ int main(int argc, char *argv[])
{"image", 1, NULL, 'e'},
/* Long-only options with no arguments */
+ {"version", 0, NULL, 20},
{"filter-noise", 0, &iargs.noisefilter, 1},
{"no-check-prefix", 0, &config_checkprefix, 0},
{"basename", 0, &config_basename, 1},
@@ -296,6 +299,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 20 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'i' :
filename = strdup(optarg);
break;
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;
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 <reflist.h>
#include <reflist-utils.h>
+#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=<filename> Specify the name of the input 'stream'.\n"
" -o, --output=<filename> 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;
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index b8cc1c68..fca12bab 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -40,6 +40,7 @@
#include <unistd.h>
#include <getopt.h>
+#include "version.h"
#include "image.h"
#include "diffraction.h"
#include "diffraction-gpu.h"
@@ -65,6 +66,7 @@ static void show_help(const char *s)
"pulses of X-rays from a free electron laser.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
"\n"
" -p, --pdb=<file> PDB file from which to get the unit cell.\n"
" (The actual Bragg intensities come from the\n"
@@ -261,6 +263,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 7 },
{"gpu", 0, &config_gpu, 1},
{"random-orientation", 0, NULL, 'r'},
{"number", 1, NULL, 'n'},
@@ -297,6 +300,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 7 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'r' :
config_randomquat = 1;
break;
diff --git a/src/process_hkl.c b/src/process_hkl.c
index d5fba397..1916a1ae 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -41,6 +41,7 @@
#include <unistd.h>
#include <getopt.h>
+#include "version.h"
#include "utils.h"
#include "statistics.h"
#include "reflist-utils.h"
@@ -61,6 +62,7 @@ static void show_help(const char *s)
"Assemble and process FEL Bragg intensities.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version number and exit.\n"
" -i, --input=<filename> Specify input filename (\"-\" for stdin).\n"
" -o, --output=<filename> Specify output filename for merged intensities\n"
" Default: processed.hkl).\n"
@@ -452,6 +454,7 @@ int main(int argc, char *argv[])
{"min-res", 1, NULL, 5},
{"push-res", 1, NULL, 6},
{"res-push", 1, NULL, 6}, /* compat */
+ {"version", 0, NULL, 7},
{0, 0, NULL, 0}
};
@@ -554,6 +557,11 @@ int main(int argc, char *argv[])
push_res = push_res*1e9;
break;
+ case 7 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case '?' :
break;
diff --git a/src/render_hkl.c b/src/render_hkl.c
index 2eb9ef9a..bdf1bbe6 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -45,6 +45,7 @@
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_blas.h>
+#include "version.h"
#include "utils.h"
#include "symmetry.h"
#include "render.h"
@@ -96,6 +97,7 @@ static void show_help(const char *s)
" current directory.\n"
"\n"
" -h, --help Display this help message.\n"
+" --version Print CrystFEL version and exit.\n"
);
}
@@ -764,6 +766,7 @@ int main(int argc, char *argv[])
/* Long options */
const struct option longopts[] = {
{"help", 0, NULL, 'h'},
+ {"version", 0, NULL, 5 },
{"zone-axis", 0, &config_zawhinge, 1},
{"output", 1, NULL, 'o'},
{"pdb", 1, NULL, 'p'},
@@ -791,6 +794,11 @@ int main(int argc, char *argv[])
show_help(argv[0]);
return 0;
+ case 5 :
+ printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n");
+ printf(CRYSTFEL_BOILERPLATE"\n");
+ return 0;
+
case 'p' :
pdb = strdup(optarg);
break;