aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-07-06 17:04:40 +0200
committerThomas White <taw@physics.org>2017-07-06 17:17:28 +0200
commitdc3395900fc3ce0d3961757628ff83ad6456be19 (patch)
tree59314c1690fe704dad08df13d9bc9929ee8cff95 /libcrystfel
parentcfb3d2ebc34f526aff4142c0d26e3955bc1ec734 (diff)
Indexing engine private pointers should be void *
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/asdf.c14
-rw-r--r--libcrystfel/src/asdf.h24
-rw-r--r--libcrystfel/src/dirax.c12
-rw-r--r--libcrystfel/src/dirax.h13
-rw-r--r--libcrystfel/src/felix.c9
-rw-r--r--libcrystfel/src/felix.h16
-rw-r--r--libcrystfel/src/mosflm.c8
-rw-r--r--libcrystfel/src/mosflm.h12
-rw-r--r--libcrystfel/src/xds.c14
-rw-r--r--libcrystfel/src/xds.h16
10 files changed, 67 insertions, 71 deletions
diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c
index 033688ba..0c43fe7a 100644
--- a/libcrystfel/src/asdf.c
+++ b/libcrystfel/src/asdf.c
@@ -4,12 +4,12 @@
* Alexandra's Superior Direction Finder, or
* Algorithm Similar to DirAx, FFT-based
*
- * Copyright © 2014-2015 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2014-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
* 2014-2015 Alexandra Tolstikova <alexandra.tolstikova@desy.de>
- * 2015 Thomas White <taw@physics.org>
+ * 2015,2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -1101,7 +1101,7 @@ static int index_refls(gsl_vector **reflections, int N_reflections,
}
-int run_asdf(struct image *image, IndexingPrivate *ipriv)
+int run_asdf(struct image *image, void *ipriv)
{
int i, j;
@@ -1202,8 +1202,8 @@ int run_asdf(struct image *image, IndexingPrivate *ipriv)
}
-IndexingPrivate *asdf_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *asdf_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl)
{
struct asdf_private *dp;
int need_cell = 0;
@@ -1232,11 +1232,11 @@ IndexingPrivate *asdf_prepare(IndexingMethod *indm, UnitCell *cell,
dp->fftw = fftw_vars_new();
- return (IndexingPrivate *)dp;
+ return (void *)dp;
}
-void asdf_cleanup(IndexingPrivate *pp)
+void asdf_cleanup(void *pp)
{
struct asdf_private *p;
p = (struct asdf_private *)pp;
diff --git a/libcrystfel/src/asdf.h b/libcrystfel/src/asdf.h
index 1e492a6f..f130d63d 100644
--- a/libcrystfel/src/asdf.h
+++ b/libcrystfel/src/asdf.h
@@ -4,12 +4,12 @@
* Alexandra's Superior Direction Finder, or
* Algorithm Similar to DirAx, FFT-based
*
- * Copyright © 2014-2015 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2014-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
* 2014-2015 Alexandra Tolstikova <alexandra.tolstikova@desy.de>
- * 2015 Thomas White <taw@physics.org>
+ * 2015,2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -43,33 +43,33 @@ extern "C" {
#ifdef HAVE_FFTW
-extern int run_asdf(struct image *image, IndexingPrivate *ipriv);
+extern int run_asdf(struct image *image, void *ipriv);
-extern IndexingPrivate *asdf_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl);
+extern void *asdf_prepare(IndexingMethod *indm,
+ UnitCell *cell, struct detector *det,
+ float *ltl);
-extern void asdf_cleanup(IndexingPrivate *pp);
+extern void asdf_cleanup(void *pp);
#else /* HAVE_FFTW */
-int run_asdf(struct image *image, IndexingPrivate *ipriv)
+int run_asdf(struct image *image, void *ipriv)
{
ERROR("This copy of CrystFEL was compiled without FFTW support.\n");
return 0;
}
-IndexingPrivate *asdf_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl)
+void *asdf_prepare(IndexingMethod *indm,
+ UnitCell *cell, struct detector *det,
+ float *ltl)
{
ERROR("This copy of CrystFEL was compiled without FFTW support.\n");
ERROR("To use asdf indexing, recompile with FFTW.\n");
return NULL;
}
-void asdf_cleanup(IndexingPrivate *pp)
+void asdf_cleanup(void *pp)
{
}
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index 19f35696..e9466a24 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -3,11 +3,11 @@
*
* Invoke the DirAx auto-indexing program
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2014 Thomas White <taw@physics.org>
+ * 2010-2014,2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -532,7 +532,7 @@ static void write_drx(struct image *image)
}
-int run_dirax(struct image *image, IndexingPrivate *ipriv)
+int run_dirax(struct image *image, void *ipriv)
{
unsigned int opts;
int status;
@@ -638,8 +638,8 @@ int run_dirax(struct image *image, IndexingPrivate *ipriv)
}
-IndexingPrivate *dirax_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *dirax_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl)
{
struct dirax_private *dp;
int need_cell = 0;
@@ -670,7 +670,7 @@ IndexingPrivate *dirax_prepare(IndexingMethod *indm, UnitCell *cell,
}
-void dirax_cleanup(IndexingPrivate *pp)
+void dirax_cleanup(void *pp)
{
struct dirax_private *p;
p = (struct dirax_private *)pp;
diff --git a/libcrystfel/src/dirax.h b/libcrystfel/src/dirax.h
index 9776f3f0..96ba6dbc 100644
--- a/libcrystfel/src/dirax.h
+++ b/libcrystfel/src/dirax.h
@@ -3,11 +3,11 @@
*
* Invoke the DirAx auto-indexing program
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010,2012-2014 Thomas White <taw@physics.org>
+ * 2010,2012-2014,2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -39,13 +39,12 @@
extern "C" {
#endif
-extern int run_dirax(struct image *image, IndexingPrivate *ipriv);
+extern int run_dirax(struct image *image, void *ipriv);
-extern IndexingPrivate *dirax_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl);
+extern void *dirax_prepare(IndexingMethod *indm,
+ UnitCell *cell, struct detector *det, float *ltl);
-extern void dirax_cleanup(IndexingPrivate *pp);
+extern void dirax_cleanup(void *pp);
#ifdef __cplusplus
}
diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c
index 02d523c6..b531e3af 100644
--- a/libcrystfel/src/felix.c
+++ b/libcrystfel/src/felix.c
@@ -3,8 +3,8 @@
*
* Invoke Felix for multi-crystal autoindexing.
*
- * Copyright © 2015 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2015-2017 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
*
* Authors:
* 2015 Thomas White <taw@physics.org>
@@ -658,9 +658,8 @@ static void parse_options(const char *options, struct felix_private *gp)
free(option);
}
-IndexingPrivate *felix_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl,
- const char *options)
+void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl, const char *options)
{
struct felix_private *gp;
diff --git a/libcrystfel/src/felix.h b/libcrystfel/src/felix.h
index 40771933..c06e963a 100644
--- a/libcrystfel/src/felix.h
+++ b/libcrystfel/src/felix.h
@@ -3,12 +3,12 @@
*
* Invoke Felix for multi-crystal autoindexing
*
- * Copyright © 2013 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2013-2017 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2013 Thomas White <taw@physics.org>
- * 2013-2014 Kenneth Beyerlein <kenneth.beyerlein@desy.de>
+ * 2010-2013,2017 Thomas White <taw@physics.org>
+ * 2013-2014 Kenneth Beyerlein <kenneth.beyerlein@desy.de>
*
* This file is part of CrystFEL.
*
@@ -36,11 +36,9 @@
#include "cell.h"
-extern IndexingPrivate *felix_prepare(IndexingMethod *indm,
- UnitCell *cell,
- struct detector *det,
- float *ltl,
- const char *options);
+extern void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl,
+ const char *options);
extern void felix_cleanup(IndexingPrivate *pp);
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 05f853eb..a8e6e119 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -725,7 +725,7 @@ static int mosflm_readable(struct image *image, struct mosflm_data *mosflm)
}
-int run_mosflm(struct image *image, IndexingPrivate *ipriv)
+int run_mosflm(struct image *image, void *ipriv)
{
struct mosflm_data *mosflm;
unsigned int opts;
@@ -843,8 +843,8 @@ int run_mosflm(struct image *image, IndexingPrivate *ipriv)
}
-IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl)
{
struct mosflm_private *mp;
int need_cell = 0;
@@ -911,7 +911,7 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
}
-void mosflm_cleanup(IndexingPrivate *pp)
+void mosflm_cleanup(void *pp)
{
struct mosflm_private *p;
p = (struct mosflm_private *)pp;
diff --git a/libcrystfel/src/mosflm.h b/libcrystfel/src/mosflm.h
index 572741dd..39ec5390 100644
--- a/libcrystfel/src/mosflm.h
+++ b/libcrystfel/src/mosflm.h
@@ -3,13 +3,13 @@
*
* Invoke the DPS auto-indexing algorithm through MOSFLM
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
* Copyright © 2012 Richard Kirian
*
* Authors:
* 2010 Richard Kirian <rkirian@asu.edu>
- * 2012-2014 Thomas White <taw@physics.org>
+ * 2012-2014,2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -41,12 +41,12 @@
extern "C" {
#endif
-extern int run_mosflm(struct image *image, IndexingPrivate *ipriv);
+extern int run_mosflm(struct image *image, void *ipriv);
-extern IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl);
+extern void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl);
-extern void mosflm_cleanup(IndexingPrivate *pp);
+extern void mosflm_cleanup(void *pp);
#ifdef __cplusplus
}
diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c
index 15826760..8a7daab7 100644
--- a/libcrystfel/src/xds.c
+++ b/libcrystfel/src/xds.c
@@ -3,12 +3,12 @@
*
* Invoke xds for crystal autoindexing
*
- * Copyright © 2013-2016 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2013-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
* Copyright © 2013 Cornelius Gati
*
* Authors:
- * 2010-2016 Thomas White <taw@physics.org>
+ * 2010-2017 Thomas White <taw@physics.org>
* 2013 Cornelius Gati <cornelius.gati@cfel.de>
*
* This file is part of CrystFEL.
@@ -498,7 +498,7 @@ static int write_inp(struct image *image, struct xds_private *xp)
}
-int run_xds(struct image *image, IndexingPrivate *priv)
+int run_xds(struct image *image, void *priv)
{
unsigned int opts;
int status;
@@ -619,8 +619,8 @@ int run_xds(struct image *image, IndexingPrivate *priv)
}
-IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *xds_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl)
{
struct xds_private *xp;
int need_cell = 0;
@@ -687,11 +687,11 @@ IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell,
xp->cell = cell;
xp->indm = *indm;
- return (IndexingPrivate *)xp;
+ return xp;
}
-void xds_cleanup(IndexingPrivate *pp)
+void xds_cleanup(void *pp)
{
struct xds_private *xp;
diff --git a/libcrystfel/src/xds.h b/libcrystfel/src/xds.h
index a0db2054..094d6d2f 100644
--- a/libcrystfel/src/xds.h
+++ b/libcrystfel/src/xds.h
@@ -3,13 +3,13 @@
*
* Invoke xds for crystal autoindexing
*
- * Copyright © 2013 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2013-2017 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
* Copyright © 2013 Cornelius Gati
*
* Authors:
- * 2010-2013 Thomas White <taw@physics.org>
- * 2013 Cornelius Gati <cornelius.gati@cfel.de>
+ * 2010-2013,2017 Thomas White <taw@physics.org>
+ * 2013 Cornelius Gati <cornelius.gati@cfel.de>
*
* This file is part of CrystFEL.
*
@@ -42,12 +42,12 @@
extern "C" {
#endif
-extern int run_xds(struct image *image, IndexingPrivate *ipriv);
+extern int run_xds(struct image *image, void *ipriv);
-extern IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl);
+extern void *xds_prepare(IndexingMethod *indm, UnitCell *cell,
+ struct detector *det, float *ltl);
-extern void xds_cleanup(IndexingPrivate *pp);
+extern void xds_cleanup(void *pp);
#ifdef __cplusplus
}