From d8e17d6154ce644449ad5979eb6846e9e9816f6e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 5 May 2023 11:36:22 +0200 Subject: Move is_{hdf5,cbf,cbfgz}_file() to image.c This also improves is_hdf5_file() to use the proper file signature, not just the extension. See 9040220452a9cc02706159c21c78e43b374446cf. --- libcrystfel/src/image-hdf5.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'libcrystfel/src/image-hdf5.c') diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index c7c75903..dd9aecee 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -1993,17 +1993,4 @@ char **image_hdf5_expand_frames(const DataTemplate *dtempl, } -int is_hdf5_file(const char *filename) -{ - const char *ext = NULL; - - ext = filename_extension(filename, NULL); - if ( ext == NULL ) return 0; - - return ( (strcmp(ext, ".h5") == 0) - || (strcmp(ext, ".cxi") == 0) - || (strcmp(ext, ".nx5") == 0) ); -} - - #endif /* HAVE_HDF5 */ -- cgit v1.2.3