aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-01-18 16:53:52 +0100
committerThomas White <taw@physics.org>2018-01-19 10:48:51 +0100
commit555a6e10a85734fa30bafa8ffada4add91c611e0 (patch)
treead36a69a7f3c330b1d9c9c8e2aa6e40f2b20bab6 /libcrystfel/src
parent5e33ce8a33c0e4b69adef9bdfc31aec3d2b5593b (diff)
Clean up indexing method probes
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/dirax.c4
-rw-r--r--libcrystfel/src/felix.c2
-rw-r--r--libcrystfel/src/mosflm.c4
-rw-r--r--libcrystfel/src/xds.c5
4 files changed, 5 insertions, 10 deletions
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;