From 6e1a971e9d0ed372a2c6066d84b90f4a61ee88b5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 Jul 2020 16:34:59 +0200 Subject: Factorise num_path_placeholders --- libcrystfel/src/image-hdf5.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c index 767ef6ab..3e2b17fb 100644 --- a/libcrystfel/src/image-hdf5.c +++ b/libcrystfel/src/image-hdf5.c @@ -204,6 +204,19 @@ int *read_dim_parts(const char *ev_orig, int *pn_dvals) } +static int num_path_placeholders(const char *pattern) +{ + size_t l, i; + int n_pl_exp = 0; + + l = strlen(pattern); + for ( i=0; i