aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-08 12:36:39 -0800
committerThomas White <taw@physics.org>2013-02-08 12:36:39 -0800
commitd8ff3bdfcc020ec296d2ad81209fce744343ad57 (patch)
treea660283cc4c4070bdfc2b55ec83bf8c093be684a /libcrystfel/src/stream.c
parentdac436f21df140b6bf0796f6f9cbb6fcb6c03e2d (diff)
Put the command line back in the stream
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 877a1824..a9e6a441 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -557,6 +557,24 @@ int is_stream(const char *filename)
}
+void write_line(Stream *st, const char *line)
+{
+ fprintf(st->fh, "%s\n", line);
+}
+
+
+void write_command(Stream *st, int argc, char *argv[])
+{
+ int i;
+
+ for ( i=0; i<argc; i++ ) {
+ if ( i > 0 ) fprintf(st->fh, " ");
+ fprintf(st->fh, "%s", argv[i]);
+ }
+ fprintf(st->fh, "\n");
+}
+
+
/**
* rewind_stream:
* @st: A %Stream