mojoshader_internal.h
changeset 946 16fec3a3f687
parent 945 f00ea3986db8
child 947 16af6e2b2ada
--- a/mojoshader_internal.h	Tue Nov 09 05:05:41 2010 -0500
+++ b/mojoshader_internal.h	Wed Nov 10 00:52:01 2010 -0500
@@ -214,14 +214,17 @@
 
 typedef struct Buffer Buffer;
 Buffer *buffer_create(size_t blksz,MOJOSHADER_malloc m,MOJOSHADER_free f,void *d);
-int buffer_append(Buffer *buffer, const char *data, size_t len);
+void *buffer_reserve(Buffer *buffer, const size_t len);
+int buffer_append(Buffer *buffer, const void *_data, size_t len);
 int buffer_append_fmt(Buffer *buffer, const char *fmt, ...) ISPRINTF(2,3);
 int buffer_append_va(Buffer *buffer, const char *fmt, va_list va);
 size_t buffer_size(Buffer *buffer);
 void buffer_empty(Buffer *buffer);
-char *buffer_flatten(Buffer *buffer);
-char *buffer_merge(Buffer **buffers, const size_t n, size_t *_len);
+void *buffer_flatten(Buffer *buffer);
+void *buffer_merge(Buffer **buffers, const size_t n, size_t *_len);
 void buffer_destroy(Buffer *buffer);
+ssize_t buffer_find(Buffer *buffer, const size_t start,
+                    const void *data, const size_t len);