summaryrefslogtreecommitdiff
path: root/colm/input.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-01-02 20:24:43 +0000
committerAdrian Thurston <thurston@complang.org>2012-01-02 20:24:43 +0000
commit38e5314851fba1e548ea687519044644a8941879 (patch)
tree8f25cc8d3743872aeb163c378b897f9a15fe1f39 /colm/input.h
parentec497371a7fcab2aa2b0bbb21cb4c5064d5970e1 (diff)
downloadcolm-38e5314851fba1e548ea687519044644a8941879.tar.gz
Need symmetrical do/undo for append/prepend to streams. Can't use the consume
functions because in some instances streams are called. The undo of the prepend needs to distinguish between tree and data.
Diffstat (limited to 'colm/input.h')
-rw-r--r--colm/input.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/colm/input.h b/colm/input.h
index 0f43eaaa..773b1bc8 100644
--- a/colm/input.h
+++ b/colm/input.h
@@ -195,13 +195,17 @@ void setEof( InputStream *is );
void unsetEof( InputStream *is );
void prependData( InputStream *in, const char *data, long len );
-struct ColmTree *undoPrependData( InputStream *in, int length );
+int undoPrependData( InputStream *is, int length );
+
+void prependTree( InputStream *is, struct ColmTree *tree, int ignore );
+struct ColmTree *undoPrependTree( InputStream *is );
void appendData( InputStream *in, const char *data, long len );
void appendTree( InputStream *in, struct ColmTree *tree );
void appendStream( InputStream *in, struct ColmTree *tree );
struct ColmTree *undoAppendData( InputStream *in, int length );
struct ColmTree *undoAppendStream( InputStream *in );
+struct ColmTree *undoAppendTree( InputStream *in );
#ifdef __cplusplus
}