aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-12-01 16:19:18 +0100
committerThomas White <taw@physics.org>2014-12-01 16:20:18 +0100
commite3e8f041e2e541d8e20cab7c755f2ad03873df54 (patch)
treeda3438b43a85cf0f0853ece358952f1a556bbd66 /libcrystfel/src/mosflm.c
parentd735a2006af314298e7bf826876334c52a6b4ccc (diff)
Improve MOSFLM feedback
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r--libcrystfel/src/mosflm.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index dd865570..a6cc5974 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -200,18 +200,18 @@ static int check_cell(struct mosflm_private *mp, struct image *image,
static void mosflm_parseline(const char *line, struct image *image,
struct mosflm_data *dirax)
{
- #if MOSFLM_VERBOSE
- char *copy;
- int i;
+ if ( MOSFLM_VERBOSE || (strncmp(line, "Invocation:", 11) == 0) ) {
+ char *copy;
+ int i;
- copy = strdup(line);
- for ( i=0; i<strlen(copy); i++ ) {
- if ( copy[i] == '\r' ) copy[i]='r';
- if ( copy[i] == '\n' ) copy[i]='\0';
+ copy = strdup(line);
+ for ( i=0; i<strlen(copy); i++ ) {
+ if ( copy[i] == '\r' ) copy[i]='r';
+ if ( copy[i] == '\n' ) copy[i]='\0';
+ }
+ STATUS("MOSFLM: %s\n", copy);
+ free(copy);
}
- STATUS("MOSFLM: %s\n", copy);
- free(copy);
- #endif
}
@@ -754,7 +754,8 @@ int run_mosflm(struct image *image, IndexingPrivate *ipriv)
tcsetattr(STDIN_FILENO, TCSANOW, &t);
execlp("ipmosflm", "", (char *)NULL);
- ERROR("Failed to invoke MOSFLM.\n");
+ ERROR("Invocation: Failed to invoke MOSFLM: %s\n",
+ strerror(errno));
_exit(0);
}