diff options
-rw-r--r-- | libcrystfel/src/image.c | 32 | ||||
-rw-r--r-- | libcrystfel/src/image.h | 12 | ||||
-rw-r--r-- | libcrystfel/src/stream.c | 2 | ||||
-rw-r--r-- | src/process_image.c | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index a71c0b97..74e6d8d3 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -371,19 +371,19 @@ static int read_header_to_cache(struct image *image, const char *from) { switch ( image->data_source_type ) { - case DST_NONE: + case DATA_SOURCE_TYPE_NONE: ERROR("No data source for %s %s - not loading header\n", image->filename, image->ev); return 1; - case DST_HDF5: + case DATA_SOURCE_TYPE_HDF5: return image_hdf5_read_header_to_cache(image, from); - case DST_CBF: - case DST_CBFGZ: + case DATA_SOURCE_TYPE_CBF: + case DATA_SOURCE_TYPE_CBFGZ: return image_cbf_read_header_to_cache(image, from); - case DST_MSGPACK: + case DATA_SOURCE_TYPE_MSGPACK: return image_msgpack_read_header_to_cache(image, from); default: @@ -454,21 +454,21 @@ static DataSourceType file_type(const char *filename) { if ( !file_exists(filename) ) { ERROR("File not found: %s (file_type)\n", filename); - return DST_NONE; + return DATA_SOURCE_TYPE_NONE; } if ( is_hdf5_file(filename) ) { - return DST_HDF5; + return DATA_SOURCE_TYPE_HDF5; } else if ( is_cbf_file(filename) ) { - return DST_CBF; + return DATA_SOURCE_TYPE_CBF; } else if ( is_cbfgz_file(filename) ) { - return DST_CBFGZ; + return DATA_SOURCE_TYPE_CBFGZ; } else { ERROR("Unrecognised file type: %s (file_type)\n", filename); - return DST_UNKNOWN; + return DATA_SOURCE_TYPE_UNKNOWN; } } @@ -767,26 +767,26 @@ static int image_read_image_data(struct image *image, switch ( image->data_source_type ) { - case DST_NONE: + case DATA_SOURCE_TYPE_NONE: STATUS("No data source for %s %s - not loading.\n", image->filename, image->ev); return 1; - case DST_HDF5: + case DATA_SOURCE_TYPE_HDF5: return image_hdf5_read(image, dtempl, image->filename, image->ev); - case DST_CBF: + case DATA_SOURCE_TYPE_CBF: return image_cbf_read(image, dtempl, image->filename, image->ev, 0); - case DST_CBFGZ: + case DATA_SOURCE_TYPE_CBFGZ: return image_cbf_read(image, dtempl, image->filename, image->ev, 1); - case DST_MSGPACK: + case DATA_SOURCE_TYPE_MSGPACK: return image_msgpack_read(image, dtempl, image->data_block, image->data_block_size); @@ -1406,7 +1406,7 @@ struct image *image_new() image->ev = NULL; image->data_block = NULL; image->data_block_size = 0; - image->data_source_type = DST_UNKNOWN; + image->data_source_type = DATA_SOURCE_TYPE_UNKNOWN; image->n_cached_headers = 0; image->id = 0; diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h index 1aabeccc..43d0ed45 100644 --- a/libcrystfel/src/image.h +++ b/libcrystfel/src/image.h @@ -98,12 +98,12 @@ struct header_cache_entry { typedef enum { - DST_UNKNOWN, - DST_NONE, - DST_HDF5, - DST_CBF, - DST_CBFGZ, - DST_MSGPACK + DATA_SOURCE_TYPE_UNKNOWN, + DATA_SOURCE_TYPE_NONE, + DATA_SOURCE_TYPE_HDF5, + DATA_SOURCE_TYPE_CBF, + DATA_SOURCE_TYPE_CBFGZ, + DATA_SOURCE_TYPE_MSGPACK } DataSourceType; diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 09a505a7..cd64a485 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -985,7 +985,7 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf) image = image_new(); if ( image == NULL ) return NULL; - image->data_source_type = DST_NONE; + image->data_source_type = DATA_SOURCE_TYPE_NONE; do { int ser; diff --git a/src/process_image.c b/src/process_image.c index 935ef93d..fa017710 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -198,7 +198,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, image = image_read_data_block(iargs->dtempl, pargs->zmq_data, pargs->zmq_data_size, - DST_MSGPACK, + DATA_SOURCE_TYPE_MSGPACK, serial, iargs->no_image_data, iargs->no_mask_data); |