From 36b436334514124e444fc5ccb42e1dc1d1bb25bc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 13 Apr 2011 17:12:00 +0200 Subject: Write stream header in stream.c --- src/indexamajig.c | 10 +--------- src/stream.c | 14 ++++++++++++++ src/stream.h | 2 ++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/indexamajig.c b/src/indexamajig.c index 7f9a1f56..a7565d01 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -494,7 +494,6 @@ int main(int argc, char *argv[]) int cellr; int peaks; int nthreads = 1; - int i; pthread_mutex_t output_mutex = PTHREAD_MUTEX_INITIALIZER; char *prepare_line; char prepare_filename[1024]; @@ -798,14 +797,7 @@ int main(int argc, char *argv[]) } free(pdb); - /* Start by writing the entire command line to stdout */ - fprintf(ofh, "CrystFEL stream format 2.0\n"); - fprintf(ofh, "Command line:"); - for ( i=0; iphoton_energy; diff --git a/src/stream.c b/src/stream.c index 2ca8e3f3..4157e34e 100644 --- a/src/stream.c +++ b/src/stream.c @@ -415,6 +415,20 @@ int read_chunk(FILE *fh, struct image *image) } +void write_stream_header(FILE *ofh, int argc, char *argv[]) +{ + int i; + + fprintf(ofh, "CrystFEL stream format 2.0\n"); + fprintf(ofh, "Command line:"); + for ( i=0; i