aboutsummaryrefslogtreecommitdiff
path: root/buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'buf.h')
-rw-r--r--buf.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/buf.h b/buf.h
index 7323b83..808cd3f 100644
--- a/buf.h
+++ b/buf.h
@@ -6,16 +6,14 @@ typedef struct buf buf;
buf* newbuf(size_t cap);
-void addchrbuf(buf* buffer, char chr); // front
-void addstrbuf(buf* buffer, char* str);
-char remchrbuf(buf* buffer);
-char* remstrbuf(buf* buffer, int ct);
+size_t buflen(buf* buffer);
-void prechrbuf(buf* buffer, char chr); // back
-void prestrbuf(buf* buffer, char* str);
-char shfchrbuf(buf* buffer);
-char* shfstrbuf(buf* buffer, int ct);
+char popchrbuf(buf* buffer);
+char* popstrbuf(buf* buffer, size_t ct);
-char* strpeekbuf(buf* buffer, int loc);
+void inschrbuf(buf* buffer, char chr);
+void insstrbuf(buf* buffer, char* str);
+
+char* strpeekbuf(buf* buffer, size_t loc, size_t len);
#endif