summaryrefslogtreecommitdiff
path: root/src/input.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-06-17 12:05:27 +0700
committerAdrian Thurston <thurston@colm.net>2018-06-17 12:05:27 +0700
commita52b5348f2a62d85e03e1fe24c67a9388aa29ab9 (patch)
tree2b6c415756ca3fc9f71c85a3bd10a0502c19f6fd /src/input.h
parentc441b29caba87edfa6953a72a64d0b90c68cf220 (diff)
downloadcolm-a52b5348f2a62d85e03e1fe24c67a9388aa29ab9.tar.gz
some cleanup of types and names in the input subsystem
Diffstat (limited to 'src/input.h')
-rw-r--r--src/input.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/input.h b/src/input.h
index c03902e8..1cb46646 100644
--- a/src/input.h
+++ b/src/input.h
@@ -57,10 +57,10 @@ struct colm_stream;
struct stream_impl;
enum run_buf_type {
- RunBufDataType = 0,
- RunBufTokenType,
- RunBufIgnoreType,
- RunBufSourceType
+ RUN_BUF_DATA_TYPE = 0,
+ RUN_BUF_TOKEN_TYPE,
+ RUN_BUF_IGNORE_TYPE,
+ RUN_BUF_SOURCE_TYPE
};
struct run_buf
@@ -68,6 +68,7 @@ struct run_buf
enum run_buf_type type;
long length;
struct colm_tree *tree;
+ struct colm_stream *stream;
struct stream_impl *si;
long offset;
struct run_buf *next, *prev;
@@ -107,7 +108,8 @@ struct stream_funcs
/* Prepending to a stream. */
void (*prepend_data)( struct stream_impl *in, const char *data, long len );
void (*prepend_tree)( struct stream_impl *is, struct colm_tree *tree, int ignore );
- void (*prepend_stream)( struct stream_impl *in, struct colm_tree *tree );
+ void (*prepend_stream)( struct stream_impl *in, struct colm_stream *stream );
+
int (*undo_prepend_data)( struct stream_impl *is, int length );
struct colm_tree *(*undo_prepend_tree)( struct stream_impl *is );
struct colm_tree *(*undo_prepend_stream)( struct stream_impl *in );
@@ -115,7 +117,8 @@ struct stream_funcs
/* Appending to a stream. */
void (*append_data)( struct stream_impl *in, const char *data, long len );
void (*append_tree)( struct stream_impl *in, struct colm_tree *tree );
- void (*append_stream)( struct stream_impl *in, struct colm_tree *tree );
+ void (*append_stream)( struct stream_impl *in, struct colm_stream *stream );
+
struct colm_tree *(*undo_append_data)( struct stream_impl *in, int length );
struct colm_tree *(*undo_append_tree)( struct stream_impl *in );
struct colm_tree *(*undo_append_stream)( struct stream_impl *in );