aboutsummaryrefslogtreecommitdiff
path: root/buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/buf.c b/buf.c
index 61c0470..67b7b26 100644
--- a/buf.c
+++ b/buf.c
@@ -18,7 +18,7 @@ struct buf{
size_t pop;
}; // a "thick" linked list (buffered for mem efficiency)
-buf_node* newbufnode(size_t cap){
+static buf_node* newbufnode(size_t cap){
buf_node* bufnode = malloc(sizeof(buf_node));
bufnode->text = malloc(sizeof(char)*cap);
return bufnode;
@@ -42,13 +42,13 @@ size_t buflen(buf* buffer){
return size;
}
-void extendbuf(buf* buffer){
+static void extendbuf(buf* buffer){
buffer->head->next = newbufnode(buffer->cap);
buffer->head = buffer->head->next;
// buffer->ins = 0 is taken care of in the function that uses this.
}
-void shortenbuf(buf* buffer){
+static void shortenbuf(buf* buffer){
buf_node* tmp = buffer->tail;
buffer->tail = buffer->tail->next;
free(tmp->text);