Preparatory work for allowing PSCP to work over SFTP as well as old-
[u/mdw/putty] / misc.h
diff --git a/misc.h b/misc.h
index 37b7311..d9b3811 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -3,6 +3,18 @@
 
 #include "puttymem.h"
 
+struct bufchain_granule;
+typedef struct bufchain_tag {
+    struct bufchain_granule *head, *tail;
+    int buffersize;                   /* current amount of buffered data */
+} bufchain;
+
+void bufchain_init(bufchain *ch);
+void bufchain_clear(bufchain *ch);
+int bufchain_size(bufchain *ch);
+void bufchain_add(bufchain *ch, void *data, int len);
+void bufchain_prefix(bufchain *ch, void **data, int *len);
+void bufchain_consume(bufchain *ch, int len);
 
 /*
  * Debugging functions.
@@ -19,7 +31,7 @@
 
 #ifdef DEBUG
 void dprintf(char *fmt, ...);
-void debug_memdump (void *buf, int len, int L);
+void debug_memdump(void *buf, int len, int L);
 #define debug(x) (dprintf x)
 #define dmemdump(buf,len) debug_memdump (buf, len, 0);
 #define dmemdumpl(buf,len) debug_memdump (buf, len, 1);