5 Commits

Author SHA1 Message Date
Graeme Winter 6ec2cd7437 First cut: use H5_USE_110_API
For #18 - compile against 1.10 API (may need to do more work to make sure this
does what we actually want)
2020-06-08 10:43:06 +01:00
Graeme Winter f25a73c667 Set to NULL after free; though fixes nothing 2020-04-02 14:21:52 +01:00
Tom Schoonjans 6165d14c31 Force linking against HDF5 shared library (#16) 2020-01-22 06:40:22 +00:00
Tom Schoonjans 19b16ad2a1 Fix sprintf usage (#15) 2020-01-21 10:52:49 +00:00
Graeme Winter 4e2b0c7506 Point at release 2019-05-08 09:28:59 +01:00
4 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ BSLZ4_BUILD_DIR = ./bslz4/build
BSLZ4_INC_DIR = $(BSLZ4_SRC_DIR)
CC=h5cc
CFLAGS=-Wall -g -O2 -fpic -I$(INC_DIR) -I$(BSLZ4_INC_DIR) -std=c89
CFLAGS=-DH5_USE_110_API -Wall -g -O2 -fpic -I$(INC_DIR) -I$(BSLZ4_INC_DIR) -std=c89 -shlib
.PHONY: plugin
plugin: $(BUILD_DIR)/durin-plugin.so
+3
View File
@@ -8,6 +8,9 @@ See:
* https://www.dectris.com/features/features-eiger-x/hdf5-and-nexus
* https://strucbio.biologie.uni-konstanz.de/xdswiki
## Get Durin
Latest release at https://github.com/DiamondLightSource/durin/releases/tag/2019v1
## Usage
In your XDS.INP add:
+5 -5
View File
@@ -339,7 +339,7 @@ int get_dectris_eiger_dataset_dims(struct ds_desc_t *desc) {
ds_id = H5Dopen2(desc->data_g_id, ds_name, H5P_DEFAULT);
if (ds_id < 0) {
char message[64];
sprintf("Unable to open dataset %.16s", ds_name);
sprintf(message, "Unable to open dataset %.16s", ds_name);
ERROR_JUMP(-1, loop_end, message);
}
t_id = H5Dget_type(ds_id);
@@ -410,14 +410,14 @@ int read_pixel_info(hid_t g_id, const char *path, double *size) {
ds_id = H5Dopen2(g_id, path, H5P_DEFAULT);
if (ds_id < 0) {
char message[64];
sprintf("Error opening dataset %.32s", path);
sprintf(message, "Error opening dataset %.32s", path);
ERROR_JUMP(-1, done, message);
}
err = H5Dread(ds_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, &value);
if (err < 0) {
char message[64];
sprintf("Error reading dataset %.32s", path);
sprintf(message, "Error reading dataset %.32s", path);
ERROR_JUMP(-1, close_dataset, message);
}
@@ -429,8 +429,8 @@ int read_pixel_info(hid_t g_id, const char *path, double *size) {
double scale = 1;
a_id = H5Aopen(ds_id, "units", H5P_DEFAULT);
if (a_id < 0) {
char message[64];
sprintf("Error openeing units attribute for %.32s after existence check", path);
char message[100];
sprintf(message, "Error openeing units attribute for %.32s after existence check", path);
ERROR_JUMP(-1, close_dataset, message);
}
+4 -1
View File
@@ -238,7 +238,10 @@ void plugin_close(int *error_flag) {
}
file_id = 0;
if (mask_buffer) free(mask_buffer);
if (mask_buffer) {
free(mask_buffer);
mask_buffer = NULL;
}
if (data_desc->free_desc) {
data_desc->free_desc(data_desc);
data_desc = NULL;