summaryrefslogtreecommitdiff
path: root/src/input.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-07-12 17:33:23 +0800
committerAdrian Thurston <thurston@colm.net>2018-07-12 17:40:38 +0800
commit6cd5ad2ab54bfef99a8372c8de34a58ea5184754 (patch)
tree27ef9ee32a61d9fb987c01516bed7d8aaefb99f4 /src/input.h
parentbaae619bd8a3be8251bde5a2049c1c1dd3df0e44 (diff)
downloadcolm-6cd5ad2ab54bfef99a8372c8de34a58ea5184754.tar.gz
various input cleanup, removed line info from input_impl_seq
Diffstat (limited to 'src/input.h')
-rw-r--r--src/input.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/input.h b/src/input.h
index 43962553..e4cfbde4 100644
--- a/src/input.h
+++ b/src/input.h
@@ -151,17 +151,13 @@ struct input_impl_seq
char eof_mark;
char eof_sent;
- struct seq_buf *queue;
- struct seq_buf *queue_tail;
+ struct {
+ struct seq_buf *head;
+ struct seq_buf *tail;
+ } queue;
struct seq_buf *stash;
- long line;
- long column;
- long byte;
-
- char *name;
-
int consumed;
};
@@ -171,8 +167,10 @@ struct stream_impl_data
struct stream_funcs *funcs;
char type;
- struct run_buf *queue;
- struct run_buf *queue_tail;
+ struct {
+ struct run_buf *head;
+ struct run_buf *tail;
+ } queue;
const char *data;
long dlen;
@@ -204,9 +202,10 @@ struct stream_impl *colm_stream_impl( struct colm_struct *s );
struct colm_str *collect_string( struct colm_program *prg, struct colm_stream *s );
struct colm_stream *colm_stream_open_collect( struct colm_program *prg );
-void colm_close_stream_file( FILE *file );
char *colm_filename_add( struct colm_program *prg, const char *fn );
struct stream_impl *colm_impl_new_accum( char *name );
+struct stream_impl *colm_impl_consumed( char *name, int len );
+struct stream_impl *colm_impl_new_text( char *name, const char *data, int len );
#ifdef __cplusplus
}