diff options
author | Thomas White <taw@physics.org> | 2021-01-14 12:07:17 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-01-14 12:07:17 +0100 |
commit | 0adf5fd72e96e5772288088cac71451a5f898c2e (patch) | |
tree | c68d223c0f8c9688e056d911ede78a9eb98eba3f /libcrystfel | |
parent | 73ebe1960f9a1ba200083ebc0fda8d4bb5b808ff (diff) |
Stream: Remove in_chunk
It's not used any more - nowhere is it set to 1.
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/stream.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index f0f5e2f2..6a1e62eb 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -80,11 +80,6 @@ struct _stream int old_indexers; /* True if the stream reader encountered a deprecated * indexing method */ - int in_chunk; /* True if a chunk start marker has been "accidentally" - * encountered, so stream_read_chunk() should assume a chunk is - * already in progress instead of looking for another - * marker */ - long *chunk_offsets; int n_chunks; }; @@ -683,14 +678,6 @@ static int find_start_of_chunk(Stream *st) char *rval = NULL; char line[1024]; - /* Perhaps read_geometry() encountered a chunk start marker instead of a - * geometry file. In that case, we're already in a chunk, so this is - * easy. */ - if ( st->in_chunk ) { - st->in_chunk = 0; - return 0; - } - do { rval = fgets(line, 1023, st->fh); @@ -1134,7 +1121,6 @@ Stream *stream_open_for_read(const char *filename) st->old_indexers = 0; st->audit_info = NULL; st->geometry_file = NULL; - st->in_chunk = 0; st->n_chunks = 0; st->chunk_offsets = NULL; @@ -1207,7 +1193,6 @@ Stream *stream_open_fd_for_write(int fd, const DataTemplate *dtempl) st->old_indexers = 0; st->audit_info = NULL; st->geometry_file = NULL; - st->in_chunk = 0; st->n_chunks = 0; st->chunk_offsets = NULL; @@ -1260,7 +1245,6 @@ Stream *stream_open_for_write(const char *filename, st->old_indexers = 0; st->audit_info = NULL; st->geometry_file = NULL; - st->in_chunk = 0; st->n_chunks = 0; st->chunk_offsets = NULL; st->dtempl = dtempl; @@ -1448,7 +1432,6 @@ int stream_select_chunk(Stream *st, if ( strcmp(index->keys[i], key) == 0 ) { if ( st != NULL ) { fseek(st->fh, index->ptrs[i], SEEK_SET); - st->in_chunk = 0; } return 0; } |