summaryrefslogtreecommitdiff
path: root/colm/tree.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2010-04-24 17:32:42 +0000
committerAdrian Thurston <thurston@complang.org>2010-04-24 17:32:42 +0000
commit47b94563aecdf163b3277929da20327fa7d3c835 (patch)
tree904a12efd0fb2d7d9229847c25b22044655fb65e /colm/tree.h
parent2fa30043cac4748bf2c0eb0eac891b01dbafa54a (diff)
downloadcolm-47b94563aecdf163b3277929da20327fa7d3c835.tar.gz
more C porting
Diffstat (limited to 'colm/tree.h')
-rw-r--r--colm/tree.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/colm/tree.h b/colm/tree.h
index c6535b68..6e61ec14 100644
--- a/colm/tree.h
+++ b/colm/tree.h
@@ -91,6 +91,25 @@ Tree *treeRevIterPrevChild( Program *prg, Tree ***psp, RevTreeIter *iter );
Tree *treeIterNextRepeat( Program *prg, Tree ***psp, TreeIter *iter );
Tree *treeIterPrevRepeat( Program *prg, Tree ***psp, TreeIter *iter );
+void printXmlTree( Tree **sp, Program *prg, Tree *tree, int commAttr );
+
+
+/* An automatically grown buffer for collecting tokens. Always reuses space;
+ * never down resizes. */
+typedef struct _StrCollect
+{
+
+ char *data;
+ int allocated;
+ int length;
+} StrCollect;
+
+void initStrCollect( StrCollect *collect );
+void strCollectDestroy( StrCollect *collect );
+void strCollectAppend( StrCollect *collect, char *data, long len );
+void strCollectClear( StrCollect *collect );
+
+
#if defined(__cplusplus)
}
#endif