summaryrefslogtreecommitdiffhomepage
path: root/src/buffer.h
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-14 00:43:38 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-14 00:43:38 +0000
commitbb9f20652998ec87d364c59de88169b531092558 (patch)
tree7d54387c07768c474a240c75e45f79d2b8a4db02 /src/buffer.h
parentd46cba8a0b4f48aadeb44fd6fd035b03c94e7416 (diff)
Moved the definition of the struct buffer_s into the buffer.c file and out
of the buffer.h file. This also required the removal of the BUFFER_SIZE macro, and replace it with the buffer_size() function.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 0c2506c..c72b92c 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,4 +1,4 @@
-/* $Id: buffer.h,v 1.7 2001-11-25 22:05:42 rjkaes Exp $
+/* $Id: buffer.h,v 1.8 2002-05-14 00:43:38 rjkaes Exp $
*
* See 'buffer.c' for a detailed description.
*
@@ -18,23 +18,12 @@
#ifndef _TINYPROXY_BUFFER_H_
#define _TINYPROXY_BUFFER_H_
-/*
- * This structure contains the total size of a buffer, plus pointers to the
- * head and tail of the buffer.
- */
-struct buffer_s {
- struct bufline_s *head; /* top of the buffer */
- struct bufline_s *tail; /* bottom of the buffer */
- size_t size; /* total size of the buffer */
-};
-
-/*
- * Return the size of a buffer (pass a pointer to a buffer_s structure.)
- */
-#define BUFFER_SIZE(x) (x)->size
+/* Forward declaration */
+struct buffer_s;
extern struct buffer_s *new_buffer(void);
extern void delete_buffer(struct buffer_s *buffptr);
+extern size_t buffer_size(struct buffer_s *buffptr);
/*
* Add a new line to the given buffer. The data IS copied into the structure.