From 555a6e10a85734fa30bafa8ffada4add91c611e0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 18 Jan 2018 16:53:52 +0100 Subject: Clean up indexing method probes --- libcrystfel/src/dirax.c | 4 +--- libcrystfel/src/felix.c | 2 +- libcrystfel/src/mosflm.c | 4 +--- libcrystfel/src/xds.c | 5 ++--- 4 files changed, 5 insertions(+), 10 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index 512a61e1..885afb97 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -660,9 +660,7 @@ const char *dirax_probe(UnitCell *cell) } fh = fdopen(pty, "r"); - if ( fgets(line, 1024, fh) == NULL ) { - ERROR("Failed to probe for DirAx\n"); - } else { + if ( fgets(line, 1024, fh) != NULL ) { if ( strncmp(line, "dirax", 5) == 0 ) { ok = 1; } diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c index bbd82b0e..e02cfb44 100644 --- a/libcrystfel/src/felix.c +++ b/libcrystfel/src/felix.c @@ -737,7 +737,7 @@ const char *felix_probe(UnitCell *cell) fh = fdopen(pty, "r"); if ( fgets(line, 1024, fh) == NULL ) { - ERROR("Failed to probe for Felix\n"); + ok = 0; } else { if ( strncmp(line, "Felix", 5) == 0 ) { ok = 1; diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 7ebf6e19..e59cf4e2 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -896,9 +896,7 @@ const char *mosflm_probe(UnitCell *cell) for ( l=0; l<10; l++ ) { char *pos; - if ( fgets(line, 1024, fh) == NULL ) { - ERROR("Failed to probe for Mosflm\n"); - } else { + if ( fgets(line, 1024, fh) != NULL ) { pos = strstr(line, "Mosflm version "); if ( pos != NULL ) { char *vers = pos+15; diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c index bfb977ea..b0dd0c47 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/xds.c @@ -679,9 +679,8 @@ const char *xds_probe(UnitCell *cell) for ( l=0; l<10; l++ ) { char *pos; - if ( fgets(line, 1024, fh) == NULL ) { - ERROR("Failed to probe for XDS\n"); - } else { + if ( fgets(line, 1024, fh) != NULL ) { + STATUS("got %s\n", line); pos = strstr(line, "** XDS **"); if ( pos != NULL ) { ok = 1; -- cgit v1.2.3